From 464856b95ada4e933aaf5564c6c147bcc94eba22 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 3 Feb 2013 19:58:13 +0000 Subject: [PATCH] Reduce contrast of output taps. Allow scaled UI. --- ptap/ptapui.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ptap/ptapui.cpp b/ptap/ptapui.cpp index ae8c229..4069551 100644 --- a/ptap/ptapui.cpp +++ b/ptap/ptapui.cpp @@ -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;