mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-02-01 10:42:03 +03:00
Textboxes: Don't use separate RGB variables
Text boxes have `r`, `g`, and `b`, and `tr`, `tg`, and `tb`. `tr`, `tg`, and `tb` are the real colors of the text box, and `r`, `g`, and `b` are merely the colors of the text box as the text box's alpha value is applied to them. Compare this with, say, activity zones (which are drawn like text boxes but aren't text boxes): There is `activity_r`, `activity_g`, and `activity_b`, and when they're drawn they're all multiplied by `act_alpha`. So just do the same thing here. Ditch the `tr`, `tg`, and `tb` variables, and make `r`, `g`, and `b` the new `tr`, `tg`, and `tb` variables. That way, there's simply less state to have to update separately. So we can get rid of `textboxclass::setcol()` as well.
This commit is contained in:
@@ -17,8 +17,6 @@ public:
|
||||
|
||||
void initcol(int rr, int gg, int bb);
|
||||
|
||||
void setcol(int rr, int gg, int bb);
|
||||
|
||||
void update(void);
|
||||
|
||||
void remove(void);
|
||||
@@ -33,7 +31,6 @@ public:
|
||||
std::vector<std::string> line;
|
||||
int xp, yp, w, h;
|
||||
int r,g,b;
|
||||
int tr,tg,tb;
|
||||
int timer;
|
||||
|
||||
float tl;
|
||||
|
||||
Reference in New Issue
Block a user