909 |
//---------------------------------------------------------------------- |
//---------------------------------------------------------------------- |
910 |
// Options menu |
// Options menu |
911 |
//---------------------------------------------------------------------- |
//---------------------------------------------------------------------- |
912 |
OptionsMenu::OptionsMenu() |
OptionsMenu::OptionsMenu(px::Surface *background_) |
913 |
: back(new TextButton("Back", this)), |
: back(new TextButton("Back", this)), |
914 |
fullscreen(new FullscreenButton), |
fullscreen(new FullscreenButton), |
915 |
m_restartinfo (new Label("")) |
m_restartinfo (new Label("")), |
916 |
|
background(background_) |
917 |
{ |
{ |
918 |
const int spacing = 5; |
const int spacing = 5; |
919 |
const int big_spacing = 60; |
const int big_spacing = 60; |
993 |
void OptionsMenu::draw_background(px::GC &gc) |
void OptionsMenu::draw_background(px::GC &gc) |
994 |
{ |
{ |
995 |
video::SetCaption("Enigma - Options Menu"); |
video::SetCaption("Enigma - Options Menu"); |
996 |
blit(gc, 0,0, enigma::GetImage("menu_bg")); |
// blit(gc, 0,0, enigma::GetImage("menu_bg")); |
997 |
|
blit(gc, 0,0, background); |
998 |
} |
} |
999 |
|
|
1000 |
|
|
1225 |
} else if (w == credits) { |
} else if (w == credits) { |
1226 |
show_credits (); |
show_credits (); |
1227 |
} else if (w == options) { |
} else if (w == options) { |
1228 |
GUI_OptionsMenu(); |
GUI_OptionsMenu(enigma::GetImage("menu_bg")); |
1229 |
} else if (w == leveled) { |
} else if (w == leveled) { |
1230 |
editor::Run(); |
editor::Run(); |
1231 |
} else if (w == quit) { |
} else if (w == quit) { |
1232 |
Menu::quit(); |
Menu::quit(); |
1233 |
} else |
} else |
1234 |
return; |
return; |
1235 |
invalidate_all(); |
invalidate_all(); |
1236 |
} |
} |
1237 |
|
|
1371 |
} |
} |
1372 |
|
|
1373 |
void |
void |
1374 |
enigma::GUI_OptionsMenu() |
enigma::GUI_OptionsMenu(Surface *background) |
1375 |
{ |
{ |
1376 |
Screen *scr = video::GetScreen(); |
Screen *scr = video::GetScreen(); |
1377 |
OptionsMenu m; |
OptionsMenu m(background); |
1378 |
m.center(scr); |
m.center(scr); |
1379 |
m.manage(scr); |
m.manage(scr); |
1380 |
} |
} |