mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-19 17:59:16 +01:00
-edited new exit menu a bit
This commit is contained in:
parent
df6b771d28
commit
6538947fef
@ -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;
|
||||||
|
|
||||||
|
BIN
source/images/closebutton.png
Normal file
BIN
source/images/closebutton.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 3.2 KiB |
Binary file not shown.
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 3.4 KiB |
@ -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);
|
||||||
|
|
||||||
@ -875,6 +885,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
|||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user