-edited new exit menu a bit

This commit is contained in:
mauricewoelk 2009-05-19 18:12:35 +00:00
parent df6b771d28
commit 6538947fef
5 changed files with 22 additions and 7 deletions

View File

@ -17,6 +17,9 @@ extern const u32 font_ttf_size;
extern const u8 clock_ttf[]; extern const u8 clock_ttf[];
extern const u32 clock_ttf_size; extern const u32 clock_ttf_size;
extern const u8 closebutton_png[];
extern const u32 closebutton_png_size;
extern const u8 sdcard_png[]; extern const u8 sdcard_png[];
extern const u32 sdcard_png_size; extern const u32 sdcard_png_size;

Binary file not shown.

After

(image error) Size: 4.7 KiB

Binary file not shown.

Before

(image error) Size: 9.7 KiB

After

(image error) Size: 3.2 KiB

Binary file not shown.

Before

(image error) Size: 6.3 KiB

After

(image error) Size: 3.4 KiB

View File

@ -684,6 +684,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
GuiImageData bottomOver(exit_bottom_over_png); GuiImageData bottomOver(exit_bottom_over_png);
GuiImageData button(exit_button_png); GuiImageData button(exit_button_png);
GuiImageData wiimote(wiimote_png); GuiImageData wiimote(wiimote_png);
GuiImageData close(closebutton_png);
snprintf(imgPath, sizeof(imgPath), "%sbattery_white.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbattery_white.png", CFG.theme_path);
GuiImageData battery(imgPath, battery_white_png); GuiImageData battery(imgPath, battery_white_png);
@ -742,17 +743,25 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0); trigHome.SetButtonOnlyTrigger(-1, WPAD_BUTTON_HOME | WPAD_CLASSIC_BUTTON_HOME, 0);
GuiText titleTxt("HOME Menu", 36, (GXColor){255, 255, 255, 255}); GuiText titleTxt("HOME Menu", 36, (GXColor){255, 255, 255, 255});
titleTxt.SetAlignment(ALIGN_LEFT, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(50,40); titleTxt.SetPosition(-180,40);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50); titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
GuiText btn1Txt("Close", 28, (GXColor){0, 0, 0, 255}); GuiText btn1Txt(" Close", 28, (GXColor){0, 0, 0, 255});
btn1Txt.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE); GuiImage closeImg(&close);
btn1Txt.SetPosition(214,17); if (Settings.wsprompt == yes){
closeImg.SetWidescreen(CFG.widescreen);}///////////
GuiButton closeBtn(close.GetWidth(), close.GetHeight());
closeBtn.SetImage(&closeImg);
closeBtn.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
closeBtn.SetPosition(205,42);
closeBtn.SetLabel(&btn1Txt);
closeBtn.SetRumble(false);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 50);
GuiImage btn1Img(&top); GuiImage btn1Img(&top);
GuiImage btn1OverImg(&topOver); GuiImage btn1OverImg(&topOver);
GuiButton btn1(top.GetWidth(), top.GetHeight()); GuiButton btn1(top.GetWidth(), top.GetHeight());
btn1.SetLabel(&btn1Txt);
btn1.SetImage(&btn1Img); btn1.SetImage(&btn1Img);
btn1.SetImageOver(&btn1OverImg); btn1.SetImageOver(&btn1OverImg);
btn1.SetSoundOver(&btnSoundOver); btn1.SetSoundOver(&btnSoundOver);
@ -819,6 +828,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
promptWindow.Append(&btn3); promptWindow.Append(&btn3);
promptWindow.Append(&btn4); promptWindow.Append(&btn4);
promptWindow.Append(&btn1); promptWindow.Append(&btn1);
promptWindow.Append(&closeBtn);
promptWindow.Append(&titleTxt); promptWindow.Append(&titleTxt);
promptWindow.Append(&wiimoteImg); promptWindow.Append(&wiimoteImg);
@ -874,7 +884,8 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
Sys_Reboot(); Sys_Reboot();
if(btn1.GetState() == STATE_CLICKED) { if(btn1.GetState() == STATE_CLICKED) {
choice = 1; choice = 1;
btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50); btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50); btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
@ -915,6 +926,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
} }
else if(btn4.GetState() == STATE_CLICKED) { else if(btn4.GetState() == STATE_CLICKED) {
btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50); btn1.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
closeBtn.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50); btn4.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50); btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50); btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);