|
@@ -39,7 +39,7 @@ public: |
|
|
std::memset(fParamGrid, 0, sizeof(bool)*9); |
|
|
std::memset(fParamGrid, 0, sizeof(bool)*9); |
|
|
|
|
|
|
|
|
// TODO explain why this is here |
|
|
// TODO explain why this is here |
|
|
setGeometryConstraints(128, 128, true); |
|
|
|
|
|
|
|
|
setGeometryConstraints(128, 128, true, false); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
protected: |
|
|
protected: |
|
@@ -104,16 +104,17 @@ protected: |
|
|
{ |
|
|
{ |
|
|
const uint width = getWidth(); |
|
|
const uint width = getWidth(); |
|
|
const uint height = getHeight(); |
|
|
const uint height = getHeight(); |
|
|
|
|
|
const uint minwh = std::min(width, height); |
|
|
|
|
|
|
|
|
Rectangle<int> r; |
|
|
Rectangle<int> r; |
|
|
|
|
|
|
|
|
r.setWidth(width/3 - 6); |
|
|
|
|
|
r.setHeight(height/3 - 6); |
|
|
|
|
|
|
|
|
r.setWidth(minwh/3 - 6); |
|
|
|
|
|
r.setHeight(minwh/3 - 6); |
|
|
|
|
|
|
|
|
// draw left, center and right columns |
|
|
// draw left, center and right columns |
|
|
for (int i=0; i<3; ++i) |
|
|
for (int i=0; i<3; ++i) |
|
|
{ |
|
|
{ |
|
|
r.setX(3 + i*width/3); |
|
|
|
|
|
|
|
|
r.setX(3 + i*minwh/3); |
|
|
|
|
|
|
|
|
// top |
|
|
// top |
|
|
r.setY(3); |
|
|
r.setY(3); |
|
@@ -126,7 +127,7 @@ protected: |
|
|
r.draw(); |
|
|
r.draw(); |
|
|
|
|
|
|
|
|
// middle |
|
|
// middle |
|
|
r.setY(3 + height/3); |
|
|
|
|
|
|
|
|
r.setY(3 + minwh/3); |
|
|
|
|
|
|
|
|
if (fParamGrid[3+i]) |
|
|
if (fParamGrid[3+i]) |
|
|
glColor3f(0.8f, 0.5f, 0.3f); |
|
|
glColor3f(0.8f, 0.5f, 0.3f); |
|
@@ -136,7 +137,7 @@ protected: |
|
|
r.draw(); |
|
|
r.draw(); |
|
|
|
|
|
|
|
|
// bottom |
|
|
// bottom |
|
|
r.setY(3 + height*2/3); |
|
|
|
|
|
|
|
|
r.setY(3 + minwh*2/3); |
|
|
|
|
|
|
|
|
if (fParamGrid[6+i]) |
|
|
if (fParamGrid[6+i]) |
|
|
glColor3f(0.8f, 0.5f, 0.3f); |
|
|
glColor3f(0.8f, 0.5f, 0.3f); |
|
@@ -159,16 +160,17 @@ protected: |
|
|
|
|
|
|
|
|
const uint width = getWidth(); |
|
|
const uint width = getWidth(); |
|
|
const uint height = getHeight(); |
|
|
const uint height = getHeight(); |
|
|
|
|
|
const uint minwh = std::min(width, height); |
|
|
|
|
|
|
|
|
Rectangle<int> r; |
|
|
Rectangle<int> r; |
|
|
|
|
|
|
|
|
r.setWidth(width/3 - 6); |
|
|
|
|
|
r.setHeight(height/3 - 6); |
|
|
|
|
|
|
|
|
r.setWidth(minwh/3 - 6); |
|
|
|
|
|
r.setHeight(minwh/3 - 6); |
|
|
|
|
|
|
|
|
// handle left, center and right columns |
|
|
// handle left, center and right columns |
|
|
for (int i=0; i<3; ++i) |
|
|
for (int i=0; i<3; ++i) |
|
|
{ |
|
|
{ |
|
|
r.setX(3 + i*width/3); |
|
|
|
|
|
|
|
|
r.setX(3 + i*minwh/3); |
|
|
|
|
|
|
|
|
// top |
|
|
// top |
|
|
r.setY(3); |
|
|
r.setY(3); |
|
@@ -190,7 +192,7 @@ protected: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// middle |
|
|
// middle |
|
|
r.setY(3 + height/3); |
|
|
|
|
|
|
|
|
r.setY(3 + minwh/3); |
|
|
|
|
|
|
|
|
if (r.contains(ev.pos)) |
|
|
if (r.contains(ev.pos)) |
|
|
{ |
|
|
{ |
|
@@ -203,7 +205,7 @@ protected: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// bottom |
|
|
// bottom |
|
|
r.setY(3 + height*2/3); |
|
|
|
|
|
|
|
|
r.setY(3 + minwh*2/3); |
|
|
|
|
|
|
|
|
if (r.contains(ev.pos)) |
|
|
if (r.contains(ev.pos)) |
|
|
{ |
|
|
{ |
|
|