mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +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:
@@ -21,10 +21,6 @@ textboxclass::textboxclass(void)
|
||||
tg = 0;
|
||||
tb = 0;
|
||||
max = 0;
|
||||
textrect.x = 0;
|
||||
textrect.y = 0;
|
||||
textrect.w = 0;
|
||||
textrect.h = 0;
|
||||
}
|
||||
|
||||
void textboxclass::centerx(void)
|
||||
@@ -121,10 +117,6 @@ void textboxclass::resize(void)
|
||||
lw = max;
|
||||
w = (max +2) * 8;
|
||||
h = (line.size() + 2) * 8;
|
||||
textrect.x = xp;
|
||||
textrect.y = yp;
|
||||
textrect.w = w;
|
||||
textrect.h = h;
|
||||
}
|
||||
|
||||
void textboxclass::addline(std::string t)
|
||||
|
||||
Reference in New Issue
Block a user