mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-18 16:01:58 +01:00
just added a wiimote to the Exit Menu (maybe some wiimote-function menu will come later)
This commit is contained in:
parent
15f5905b1a
commit
df6b771d28
@ -20,6 +20,9 @@ extern const u32 clock_ttf_size;
|
||||
extern const u8 sdcard_png[];
|
||||
extern const u32 sdcard_png_size;
|
||||
|
||||
extern const u8 wiimote_png[];
|
||||
extern const u32 wiimote_png_size;
|
||||
|
||||
extern const u8 bg_music_ogg[];
|
||||
extern const u32 bg_music_ogg_size;
|
||||
|
||||
|
BIN
source/images/wiimote.png
Normal file
BIN
source/images/wiimote.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
@ -683,6 +683,7 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
||||
GuiImageData bottom(exit_bottom_png);
|
||||
GuiImageData bottomOver(exit_bottom_over_png);
|
||||
GuiImageData button(exit_button_png);
|
||||
GuiImageData wiimote(wiimote_png);
|
||||
|
||||
snprintf(imgPath, sizeof(imgPath), "%sbattery_white.png", CFG.theme_path);
|
||||
GuiImageData battery(imgPath, battery_white_png);
|
||||
@ -807,12 +808,19 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
||||
|
||||
btn2Txt.SetFontSize(22);
|
||||
btn3Txt.SetFontSize(22);
|
||||
|
||||
GuiImage wiimoteImg(&wiimote);
|
||||
if (Settings.wsprompt == yes){wiimoteImg.SetWidescreen(CFG.widescreen);}
|
||||
wiimoteImg.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
|
||||
wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 50);
|
||||
wiimoteImg.SetPosition(50,210);
|
||||
|
||||
promptWindow.Append(&btn2);
|
||||
promptWindow.Append(&btn3);
|
||||
promptWindow.Append(&btn4);
|
||||
promptWindow.Append(&btn1);
|
||||
promptWindow.Append(&titleTxt);
|
||||
promptWindow.Append(&wiimoteImg);
|
||||
|
||||
#ifdef HW_RVL
|
||||
promptWindow.Append(batteryBtn[0]);
|
||||
@ -871,11 +879,16 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
||||
btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
|
||||
btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
|
||||
wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
|
||||
#ifdef HW_RVL
|
||||
for (int i = 0; i < 4; i++)
|
||||
batteryBtn[i]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
|
||||
#endif
|
||||
}
|
||||
else if(btn4.GetState() == STATE_SELECTED)
|
||||
{
|
||||
wiimoteImg.SetPosition(50,165);
|
||||
}
|
||||
else if(btn2.GetState() == STATE_CLICKED) {
|
||||
ret = WindowPrompt(LANGUAGE.Areyousure, 0, LANGUAGE.Yes, LANGUAGE.No, 0, 0);
|
||||
if (ret == 1) {
|
||||
@ -906,12 +919,17 @@ WindowExitPrompt(const char *title, const char *msg, const char *btn1Label,
|
||||
btn2.SetEffect(EFFECT_SLIDE_LEFT | EFFECT_SLIDE_OUT, 50);
|
||||
btn3.SetEffect(EFFECT_SLIDE_RIGHT | EFFECT_SLIDE_OUT, 50);
|
||||
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_OUT, 50);
|
||||
wiimoteImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
|
||||
#ifdef HW_RVL
|
||||
for (int i = 0; i < 4; i++)
|
||||
batteryBtn[i]->SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_OUT, 50);
|
||||
#endif
|
||||
choice = 0;
|
||||
}
|
||||
else if(btn4.GetState() != STATE_SELECTED)
|
||||
{
|
||||
wiimoteImg.SetPosition(50,210);
|
||||
}
|
||||
}
|
||||
homeout->Play();
|
||||
while(btn1.GetEffect() > 0) usleep(50);
|
||||
|
Loading…
Reference in New Issue
Block a user