mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
ASFont: removed precalculation of half heights.
There is no point in precalculating something so cheap to recalculate. Also, the majority of uses was to compensate for passing the wrong alignment argument.
This commit is contained in:
1 parent
492a36b9df
commit
e4b71138b9
8 files changed
+12
-27
No files matched your search
+1
-2
@@ -1333,7 +1333,6 @@ void GMenu2X::contextMenu() {
|
||||
uint i, sel=0, fadeAlpha=0;
|
||||
|
||||
int h = font->getHeight();
|
||||
int h2 = font->getHalfHeight();
|
||||
SDL_Rect box;
|
||||
box.h = (h+2)*voices.size()+8;
|
||||
box.w = 0;
|
||||
@@ -1370,7 +1369,7 @@ void GMenu2X::contextMenu() {
|
||||
//draw selection rect
|
||||
s->box( selbox.x, selbox.y, selbox.w, selbox.h, skinConfColors[COLOR_MESSAGE_BOX_SELECTION] );
|
||||
for (i=0; i<voices.size(); i++)
|
||||
s->write( font, voices[i].text, box.x+12, box.y+h2+5+(h+2)*i, ASFont::HAlignLeft, ASFont::VAlignMiddle );
|
||||
s->write( font, voices[i].text, box.x+12, box.y+5+(h+2)*i, ASFont::HAlignLeft, ASFont::VAlignTop );
|
||||
s->flip();
|
||||
|
||||
//touchscreen
|
||||
|
||||
Reference in new issue
Block a user