aabb block shape WIP + common refactor
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
#include "../../window/input.h"
|
||||
#include "../../window/Camera.h"
|
||||
|
||||
using glm::vec2;
|
||||
using glm::vec3;
|
||||
using std::string;
|
||||
using std::shared_ptr;
|
||||
using namespace gui;
|
||||
|
||||
@@ -11,6 +11,8 @@ using std::string;
|
||||
using std::wstring;
|
||||
using std::shared_ptr;
|
||||
using glm::vec2;
|
||||
using glm::vec3;
|
||||
using glm::vec4;
|
||||
|
||||
#define KEY_ESCAPE 256
|
||||
#define KEY_ENTER 257
|
||||
|
||||
@@ -171,7 +171,7 @@ void Panel::refresh() {
|
||||
}
|
||||
if (resizing_) {
|
||||
if (maxLength_)
|
||||
this->size(vec2(size.x, min(maxLength_, (int)(y+padding.w))));
|
||||
this->size(vec2(size.x, glm::min(maxLength_, (int)(y+padding.w))));
|
||||
else
|
||||
this->size(vec2(size.x, y+padding.w));
|
||||
}
|
||||
@@ -193,7 +193,7 @@ void Panel::refresh() {
|
||||
bool increased = maxh > size.y;
|
||||
if (resizing_) {
|
||||
if (maxLength_)
|
||||
this->size(vec2(min(maxLength_, (int)(x+padding.z)), size.y));
|
||||
this->size(vec2(glm::min(maxLength_, (int)(x+padding.z)), size.y));
|
||||
else
|
||||
this->size(vec2(x+padding.z, size.y));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user