mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Remove textrect attribute from textboxclass
Instead of duplicating the same variables over and over again, Graphics::drawgui() can just make its own SDL_Rect. It's not that hard. As far as I can tell, textrect was always being properly kept up to date by the time Graphics::drawgui() got around to rendering (textboxclass::resize() keeps being called a LOT), so this shouldn't be a noticeable change from the user perspective.
This commit is contained in:
@@ -855,8 +855,9 @@ void Graphics::drawgui(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_Rect textrect = {textbox[i].xp, textbox[i].yp, textbox[i].w, textbox[i].h};
|
||||
|
||||
FillRect(backBuffer,textbox[i].textrect, textbox[i].r/6, textbox[i].g/6, textbox[i].b / 6 );
|
||||
FillRect(backBuffer, textrect, textbox[i].r/6, textbox[i].g/6, textbox[i].b / 6 );
|
||||
|
||||
drawcoloredtile(textbox[i].xp, textbox[i].yp, 40, textbox[i].r, textbox[i].g, textbox[i].b);
|
||||
drawcoloredtile(textbox[i].xp+textbox[i].w-8, textbox[i].yp, 42, textbox[i].r, textbox[i].g, textbox[i].b);
|
||||
|
||||
Reference in New Issue
Block a user