Reduce contrast of output taps. Allow scaled UI.

master
Peter Nelson 2013-02-03 19:58:13 +00:00
parent 8740ac4fbf
commit 464856b95a
1 changed files with 10 additions and 7 deletions

View File

@ -51,23 +51,26 @@ struct PTapUI : PUi {
void PTapUI::InitWidgets()
{
scale = 1.0f;
widget = new Container();
widget->tex = this;
widget->back = true;
widget->colour = Colour(1, 1, 1, 1);
widget->w = this->width;
widget->h = this->height;
widget->w = this->width * scale;
widget->h = this->height * scale;
int padding = 4;
int c_w = (this->width - padding * 3) * 0.5f;
int c_h = (this->height - padding * 5) * 0.25f;
int c_w = (widget->w - padding * 3) * 0.5f;
int c_h = (widget->h - padding * 5) * 0.25f;
int slide_w = 25;
int slide_h = c_h - 25;
for (int i = 0; i < TAPS + 2; i++) {
Container *c = new Container();
if (i < TAPS) c->frame = Colour(0, 0, 0, .15f);
c->x = (i & 1) * (c_w + padding) + padding;
c->y = (i >> 1) * (c_h + padding) + padding;
c->w = c_w;
@ -84,7 +87,7 @@ void PTapUI::InitWidgets()
c->children.push_back(c3);
*/
Container *c2 = new Container();
if (i >= TAPS) c2->colour = Colour(1, 1, 1, 0.2f);
if (i >= TAPS) c2->colour = Colour(1, 1, 1, 0.15f);
c2->x = c->x;
// c2->x = c3->x + c3->w + padding;
c2->y = c->y + 25;
@ -93,7 +96,7 @@ void PTapUI::InitWidgets()
c->children.push_back(c2);
Container *c3 = new Container();
if (i >= TAPS) c3->colour = Colour(1, 1, 1, 0.2f);
if (i >= TAPS) c3->colour = Colour(1, 1, 1, 0.15f);
// c3->colour = Colour(0, 0, 0, 0.2f);
c3->x = c2->x + c2->w + padding;
c3->y = c->y + 25;
@ -102,7 +105,7 @@ void PTapUI::InitWidgets()
c->children.push_back(c3);
Container *c4 = new Container();
if (i >= TAPS) c4->colour = Colour(1, 1, 1, 0.2f);
if (i >= TAPS) c4->colour = Colour(1, 1, 1, 0.15f);
c4->x = c3->x + c3->w + padding;
// c4->x = c2->x + c2->w + padding;
c4->y = c->y + 25;