1
0
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:
Maarten ter Huurne
2011-05-10 00:31:45 +02:00
parent 492a36b9df
commit e4b71138b9
8 changed files with 12 additions and 27 deletions

View File

@@ -63,10 +63,10 @@ void MenuSettingRGBA::draw(int y) {
MenuSetting::draw(y);
gmenu2x->s->rectangle( 153, y+1, 11, 11, 0,0,0,255 );
gmenu2x->s->box( 154, y+2, 9, 9, value() );
gmenu2x->s->write( gmenu2x->font, "R: "+strR, 169, y+gmenu2x->font->getHalfHeight(), ASFont::HAlignLeft, ASFont::VAlignMiddle );
gmenu2x->s->write( gmenu2x->font, "G: "+strG, 205, y+gmenu2x->font->getHalfHeight(), ASFont::HAlignLeft, ASFont::VAlignMiddle );
gmenu2x->s->write( gmenu2x->font, "B: "+strB, 241, y+gmenu2x->font->getHalfHeight(), ASFont::HAlignLeft, ASFont::VAlignMiddle );
gmenu2x->s->write( gmenu2x->font, "A: "+strA, 277, y+gmenu2x->font->getHalfHeight(), ASFont::HAlignLeft, ASFont::VAlignMiddle );
gmenu2x->s->write( gmenu2x->font, "R: "+strR, 169, y, ASFont::HAlignLeft, ASFont::VAlignTop );
gmenu2x->s->write( gmenu2x->font, "G: "+strG, 205, y, ASFont::HAlignLeft, ASFont::VAlignTop );
gmenu2x->s->write( gmenu2x->font, "B: "+strB, 241, y, ASFont::HAlignLeft, ASFont::VAlignTop );
gmenu2x->s->write( gmenu2x->font, "A: "+strA, 277, y, ASFont::HAlignLeft, ASFont::VAlignTop );
}
void MenuSettingRGBA::handleTS() {