mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-12-27 13:14:36 +02:00
MessageBox: minor cleanup.
Declare local variables where they are used, not way in advance.
This commit is contained in:
parent
ccf55e5d61
commit
40fd35d764
@ -64,8 +64,6 @@ void MessageBox::setButton(int action, const string &btn) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int MessageBox::exec() {
|
int MessageBox::exec() {
|
||||||
int result = -1;
|
|
||||||
|
|
||||||
Surface bg(gmenu2x->s);
|
Surface bg(gmenu2x->s);
|
||||||
//Darken background
|
//Darken background
|
||||||
bg.box(0, 0, gmenu2x->resX, gmenu2x->resY, 0,0,0,200);
|
bg.box(0, 0, gmenu2x->resX, gmenu2x->resY, 0,0,0,200);
|
||||||
@ -103,7 +101,7 @@ int MessageBox::exec() {
|
|||||||
bg.blit(gmenu2x->s,0,0);
|
bg.blit(gmenu2x->s,0,0);
|
||||||
gmenu2x->s->flip();
|
gmenu2x->s->flip();
|
||||||
|
|
||||||
InputManager::ButtonEvent event;
|
int result = -1;
|
||||||
while (result < 0) {
|
while (result < 0) {
|
||||||
|
|
||||||
#ifdef PLATFORM_GP2X
|
#ifdef PLATFORM_GP2X
|
||||||
@ -119,6 +117,7 @@ int MessageBox::exec() {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
InputManager::ButtonEvent event;
|
||||||
if (gmenu2x->input.pollEvent(&event)
|
if (gmenu2x->input.pollEvent(&event)
|
||||||
&& (event.state == InputManager::PRESSED)
|
&& (event.state == InputManager::PRESSED)
|
||||||
&& (buttons[event.button] != "")) {
|
&& (buttons[event.button] != "")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user