1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-06-28 12:39:50 +03:00

Rearrange calls to GMenu2X::drawButton from left to right

This breaks up large reversed call chains in a few places.
This commit is contained in:
Nebuleon Fumika 2014-08-15 22:23:57 +00:00 committed by Maarten ter Huurne
parent fe0db484ec
commit 9b583f9b38
3 changed files with 17 additions and 14 deletions

View File

@ -471,10 +471,11 @@ void LinkApp::showManual() {
pngman->blit(s, -page*320, 0);
gmenu2x->drawBottomBar(s);
gmenu2x->drawButton(s, "start", gmenu2x->tr["Exit"],
gmenu2x->drawButton(s, "cancel", "",
gmenu2x->drawButton(s, "right", gmenu2x->tr["Change page"],
gmenu2x->drawButton(s, "left", "", 5))));
int x = 5;
x = gmenu2x->drawButton(s, "left", "", x);
x = gmenu2x->drawButton(s, "right", gmenu2x->tr["Change page"], x);
x = gmenu2x->drawButton(s, "cancel", "", x);
x = gmenu2x->drawButton(s, "start", gmenu2x->tr["Exit"], x);
ss.clear();
ss << page+1;

View File

@ -70,10 +70,11 @@ void TextDialog::exec() {
writeTitle(bg, title);
writeSubTitle(bg, description);
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
gmenu2x->drawButton(bg, "cancel", "",
gmenu2x->drawButton(bg, "down", gmenu2x->tr["Scroll"],
gmenu2x->drawButton(bg, "up", "", 5))));
int x = 5;
x = gmenu2x->drawButton(bg, "up", "", x);
x = gmenu2x->drawButton(bg, "down", gmenu2x->tr["Scroll"], x);
x = gmenu2x->drawButton(bg, "cancel", "", x);
x = gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"], x);
bg.convertToDisplayFormat();

View File

@ -77,12 +77,13 @@ void TextManualDialog::exec() {
drawTitleIcon(bg, icon, false);
writeTitle(bg, title+(description.empty() ? "" : ": "+description));
gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"],
gmenu2x->drawButton(bg, "cancel", "",
gmenu2x->drawButton(bg, "right", gmenu2x->tr["Change page"],
gmenu2x->drawButton(bg, "left", "",
gmenu2x->drawButton(bg, "down", gmenu2x->tr["Scroll"],
gmenu2x->drawButton(bg, "up", "", 5))))));
int x = 5;
x = gmenu2x->drawButton(bg, "up", "", x);
x = gmenu2x->drawButton(bg, "down", gmenu2x->tr["Scroll"], x);
x = gmenu2x->drawButton(bg, "left", "", x);
x = gmenu2x->drawButton(bg, "right", gmenu2x->tr["Change page"], x);
x = gmenu2x->drawButton(bg, "cancel", "", x);
x = gmenu2x->drawButton(bg, "start", gmenu2x->tr["Exit"], x);
bg.convertToDisplayFormat();