imported rev0

parent 0fd4e0a3
......@@ -228,6 +228,8 @@ int BootGameCubeHomebrew()
ES_GetTicketViews(BC, &view, 1);
int ret = ES_LaunchTitle(BC, &view);
if(ret < 0)
LoadHBC();
return ret;
}
This diff is collapsed.
This diff is collapsed.
......@@ -46,7 +46,7 @@ int MenuSettingsFont()
DIR *dirHandle;
struct dirent * dirEntry;
dirHandle = opendir(check_path(Settings.device_dat + ":/config/HBF/Fonts").c_str());
dirHandle = opendir(check_path(Settings.device_dat + ":/config/Homebrew Filter/Fonts").c_str());
if (dirHandle) {
while (0 != (dirEntry = readdir(dirHandle)))
{
......
......@@ -46,7 +46,7 @@ int MenuSettingsLanguage()
DIR *dirHandle;
struct dirent * dirEntry;
dirHandle = opendir(check_path(Settings.device_dat + ":/config/HBF/Languages").c_str());
dirHandle = opendir(check_path(Settings.device_dat + ":/config/Homebrew Filter/Languages").c_str());
if (dirHandle)
{
while (0 != (dirEntry = readdir(dirHandle)))
......
......@@ -46,7 +46,7 @@ int MenuSettingsTheme()
DIR *dirHandle;
struct dirent * dirEntry;
dirHandle = opendir(check_path(Settings.device_dat + ":/config/HBF/Themes").c_str());
dirHandle = opendir(check_path(Settings.device_dat + ":/config/Homebrew Filter/Themes").c_str());
if (dirHandle) {
while (0 != (dirEntry = readdir(dirHandle)))
{
......
......@@ -21,12 +21,12 @@ enum
THEME,
LANGUAGE,
FONT,
STORAGE_DEVICE,
SLIDE_EFFECT,
CATEGORY_REMEMBER,
NUMBER_OF_APPS,
QUICK_START,
SHOW_ALL,
STORAGE_DEVICE,
DEVICE_ICON,
CHILDLOCK,
NAVIGATION,
......@@ -41,4 +41,4 @@ enum
DISPLAY_BOTTOM,
DISPLAY_LEFT,
DISPLAY_RIGHT
};
};
\ No newline at end of file
......@@ -20,7 +20,7 @@ void Category_rename_move(string button)
Settings.unassigned = false;
else
Settings.unassigned = true;
Settings.current_page = 1;
}
// Kategorie umbenennen
......@@ -29,7 +29,7 @@ void Category_rename_move(string button)
char new_category_name[256];
sprintf (new_category_name, Settings.category_name.c_str());
OnScreenKeyboard(new_category_name, 256, false);
if(strcasecmp(new_category_name,"NULL") != 0 )
KategorieUmbenennen(Settings.category_name, new_category_name);
}
......@@ -55,29 +55,22 @@ void Category_rename_move(string button)
void Next_Category()
{
int prev_cat = Settings.current_category;
Settings.current_category++;
if(Settings.current_category > (signed)AvailableCategory.categories.size() -1)
Settings.current_category = 0;
// Kategorie Alle nur anzeigen, wenn aktiviert oder keine andere vorhanden ist
if(!Options.show_all && Settings.current_category == 0 && AvailableCategory.categories.size() -1 > 0)
Settings.current_category++;
if(Settings.current_category != prev_cat)
{
if(Settings.current_category > (signed)AvailableCategory.categories.size() -1)
Settings.current_category = 0;
// Kategorie Alle nur anzeigen, wenn aktiviert oder keine andere vorhanden ist
if(!Options.show_all && Settings.current_category == 0 && AvailableCategory.categories.size() -1 > 0)
Settings.current_category++;
Settings.current_page = 1;
Settings.unassigned = false;
if(Settings.current_category != 0)
copy_app_in_category();
Settings.Apps_from = EFFECT_SLIDE_RIGHT;
Settings.Apps_to = EFFECT_SLIDE_LEFT;
}
Settings.current_page = 1;
Settings.unassigned = false;
if(Settings.current_category != 0)
copy_app_in_category();
Settings.Apps_from = EFFECT_SLIDE_RIGHT;
Settings.Apps_to = EFFECT_SLIDE_LEFT;
}
void Previous_Category()
......@@ -87,16 +80,16 @@ void Previous_Category()
// Kategorie Alle nur anzeigen, wenn aktiviert oder keine andere vorhanden ist
if(!Options.show_all && Settings.current_category == 0)
Settings.current_category--;
if(Settings.current_category < 0)
Settings.current_category = AvailableCategory.categories.size() -1;
Settings.current_page = 1;
Settings.unassigned = false;
if(Settings.current_category != 0)
copy_app_in_category();
Settings.Apps_from = EFFECT_SLIDE_LEFT;
Settings.Apps_to = EFFECT_SLIDE_RIGHT;
}
......@@ -116,9 +109,9 @@ void AppEraseDelate(int choice, const char* name, const char* foldername)
if( eraseDir(name) )
{
DeleteDir(foldername);
app_list();
if(Settings.current_category != 0)
copy_app_in_category();
else
......
......@@ -54,7 +54,7 @@ void CheckVersion(void)
{
if(Settings.checkrev == -1)
{
struct block file = downloadfile("http://download.tuxfamily.org/hbf/DOL/revisions");
struct block file = downloadfile("http://hamachi-mp.bplaced.net/Downloads/wii/Homebrew_Filter/version.txt");
if (file.data != NULL)
{
revs = (char*)file.data;
......
......@@ -16,7 +16,6 @@ u8 *data = (u8 *)0x92000000;
/*** Extern variables ***/
extern GuiWindow * mainWindow;
extern bool boot_buffer;
extern bool wiiload;
/*** Extern functions ***/
extern void ResumeGui();
......@@ -114,7 +113,7 @@ void HaltTcpThread()
static void * tcp_callback(void *arg)
{
u32 offset, read, size, client, uncfilesize;
u32 offset, read, size, ip, client, uncfilesize;
u8 *bfr[READ_SIZE];
bool compress = false;
struct sockaddr_in addr;
......@@ -207,14 +206,16 @@ static void * tcp_callback(void *arg)
Percent = 100.0f * offset/size;
progressbarImg->SetSize(Percent*3.27f, 38);
char buffer[6];
char buffer[7];
sprintf(buffer, "%i %%", (int)Percent);
PercentTxt->SetText(buffer);
}
usleep(100000);
net_close(client);
net_close(listen);
// retry:
if(compress)
{
u8 *zdata = (u8 *) malloc(uncfilesize);
......@@ -222,14 +223,17 @@ static void * tcp_callback(void *arg)
return NULL;
uLongf zdatalen = uncfilesize;
int res = uncompress (zdata, &zdatalen, data, (uLongf)size);
if (res != Z_OK)
{
free(zdata);
// fprintf (stderr, "error decompressing data: %d\n", res);
return NULL;
// debug("error");
// PercentTxt->SetText("error");
// return NULL;
// goto retry;
// fprintf (stderr, "error decompressing data: %d\n", res);
// return NULL;
}
else
{
......@@ -252,7 +256,6 @@ static void * tcp_callback(void *arg)
ResumeGui();
boot_buffer = true;
wiiload = true;
break;
}
}
......
......@@ -12,7 +12,7 @@ bool readrev = true;
string CheckNewVersions()
{
string revs = "error";
struct block file = downloadfile("http://download.tuxfamily.org/hbf/DOL/revisions");
struct block file = downloadfile("http://hamachi-mp.bplaced.net/Downloads/wii/Homebrew_Filter/version.txt");
if (file.data != NULL)
{
revs = (char*)file.data;
......@@ -24,7 +24,7 @@ string CheckNewVersions()
string NewVersionsText()
{
string text = "error";
struct block file = downloadfile("http://download.tuxfamily.org/hbf/DOL/updates");
struct block file = downloadfile("http://hamachi-mp.bplaced.net/Downloads/wii/Homebrew_Filter/version_text.txt");
if (file.data != NULL)
{
text = (char*)file.data;
......@@ -38,9 +38,9 @@ string new_update(string rev, string filename)
{
char url[100];
if(rev == "Beta")
sprintf(url, "http://download.tuxfamily.org/hbf/DOL/Beta/%s", filename.c_str());
sprintf(url, "http://hamachi-mp.bplaced.net/Downloads/wii/Homebrew_Filter/Beta/%s", filename.c_str());
else
sprintf(url, "http://download.tuxfamily.org/hbf/DOL/rev%s/%s", rev.c_str(), filename.c_str());
sprintf(url, "http://hamachi-mp.bplaced.net/Downloads/wii/Homebrew_Filter/rev%s/%s", rev.c_str(), filename.c_str());
file = downloadfile(url);
if (file.data && file.size > 0)
......@@ -56,7 +56,7 @@ string new_update(string rev, string filename)
string new_theme(string themename, string filename)
{
char url[100];
sprintf(url, "http://www.nanolx.org/hbf/Themes/%s/%s", themename.c_str(), filename.c_str());
sprintf(url, "http://hbf.hamachi-mp.bplaced.net/Themes/%s/%s", themename.c_str(), filename.c_str());
file = downloadfile(url);
if (file.data && file.size > 0)
......@@ -73,7 +73,7 @@ void update(string filename)
{
if (file.data && file.size > 0)
{
FILE * data = fopen((Settings.device_dat + ":/config/HBF/"+ filename).c_str(), "wb");
FILE * data = fopen((Settings.device_dat + ":/config/Homebrew Filter/"+ filename).c_str(), "wb");
if(data)
{
fwrite(file.data, 1, file.size, data);
......
......@@ -3,20 +3,67 @@
#include <fstream>
#include "libwiigui/gui.h"
#include "main.h"
#include "menu.h"
#include "Menus/menus_command.h"
#include "Tools/copy_app_in_category.h"
#include "Tools/parser.h"
#include "Tools/textline.h"
#include "Tools/load_channel.h"
#include "Tools/SelectIos.h"
#include "Prompts/prompts.h"
#include "prompts.h"
/*** Extern variables ***/
extern GuiWindow * mainWindow;
extern bool boothomebrew;
/*** Extern functions ***/
extern void ResumeGui();
extern void HaltGui();
extern void HaltResumeGui();
int ChoiceAppInfo(vector<homebrew_list> list, int i)
{
int menu = MENU_NONE;
again:
int choice;
if(Options.quick_start == 0)
choice = AppInfo(list[i].name.c_str(), list[i].foldername, list[i].icon);
else
choice = 1;
if(choice == 1) // App starten
{
Settings.forwarder_path = list[i].pathboot;
Settings.forwarder_arg = list[i].arg.c_str();
boothomebrew = true;
menu = MENU_EXIT;
}
else if(choice == 2) // App Einfgen
{
string app_in_kategorie = AddApp(list[i].name.c_str());
if( app_in_kategorie != "NULL" )
{
AppEinfuegen(app_in_kategorie, list[i].foldername.c_str());
copy_app_in_unassigned();
// temp_slide = false;
menu = MENU_MAIN;
}
}
else if(choice == 3 || choice == 4)
{
AppEraseDelate(choice, list[i].name.c_str(), list[i].foldername.c_str());
// temp_slide = false;
menu = MENU_MAIN;
}
else if(choice == 5)
{
MetaEdit(list[i].foldername);
// temp_slide = false;
goto again;
}
return menu;
}
/****************************************************************************
* AppInfo
*
......@@ -31,16 +78,26 @@ AppInfo(const char *title, string dir, u8* icon)
dir += "meta.xml";
string line, quelltext = "", version, coder, descriptionTxt;
ifstream in(dir.c_str());
while(getline(in, line))
quelltext = quelltext + line + "\n";
string space = " ";
version = tr("Version:") + space + parser(quelltext, "<version>", "</version>");
coder = tr("Coder:") + space + parser(quelltext, "<coder>", "</coder>");
descriptionTxt = parser(quelltext, "<long_description>", "</long_description>");
if(strcasecmp(title, "the homebrew channel") == 0)
{
string space = " ";
version = tr("Version:") + space + HBC_version;
coder = tr("Coder:") + space + "HBC Team";
descriptionTxt = "The Homebrew Channel is a channel for launching Wii homebrew applications. It will list homebrew applications stored and organised on an SD card or USB mass storage device in a nice little GUI, which you can very easily customise with descriptions and shiny little icons all by yourself. You can also launch applications via TCP (with a correctly configured PC) or a USBGecko. Both of those built in options make it extremely convenient for testing out new code, as well as a general purpose homebrew launcher.";
}
else
{
ifstream in(dir.c_str());
while(getline(in, line))
quelltext = quelltext + line + "\n";
string space = " ";
version = tr("Version:") + space + parser(quelltext, "<version>", "</version>");
coder = tr("Coder:") + space + parser(quelltext, "<coder>", "</coder>");
descriptionTxt = parser(quelltext, "<long_description>", "</long_description>");
}
GuiWindow promptWindow(520, 360);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
promptWindow.SetPosition(0, -10);
......@@ -57,10 +114,10 @@ AppInfo(const char *title, string dir, u8* icon)
GuiImage viewicon(&icon_data);
viewicon.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
viewicon.SetPosition(40, 54);
GuiImage * viewdevice = NULL;
if((Options.device_icon == 2 || Options.device_icon == 3) && (Settings.device == "sd_usb" || Settings.device == "all"))
if((Options.device_icon == 2 || Options.device_icon == 3) && Settings.device == "sd_usb")
{
bool icon = false;
if(strncmp(dir.c_str(), "sd", 2) == 0)
......@@ -73,12 +130,7 @@ AppInfo(const char *title, string dir, u8* icon)
viewdevice = new GuiImage(new GuiImageData(Theme.usb_inactive));
icon = true;
}
else if(strncmp(dir.c_str(), "dvd", 3) == 0)
{
viewdevice = new GuiImage(new GuiImageData(Theme.dvd_inactive));
icon = true;
}
if(icon)
{
viewdevice->SetAlignment(ALIGN_LEFT, ALIGN_TOP);
......@@ -86,7 +138,7 @@ AppInfo(const char *title, string dir, u8* icon)
viewdevice->SetScale(0.8);
}
}
GuiText titleTxt(title, 26, (GXColor){Theme.text_1, Theme.text_2, Theme.text_3, 255});
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(0, 20);
......@@ -105,19 +157,19 @@ AppInfo(const char *title, string dir, u8* icon)
int i = 0;
int y = 125;
int place = 25;
int number = 5;
GuiText upTxt("c", 22, (GXColor){Theme.text_1, Theme.text_2, Theme.text_3, 255});
upTxt.SetFont(symbol_ttf, symbol_ttf_size);
upTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
upTxt.SetPosition(0, y -20);
GuiText downTxt("d", 22, (GXColor){Theme.text_1, Theme.text_2, Theme.text_3, 255});
downTxt.SetFont(symbol_ttf, symbol_ttf_size);
downTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
downTxt.SetPosition(0, y + (place * (number-1)) + 15);
GuiText * Entrie[number];
for(i=0; i < number && i < (signed)description.line.size(); i++)
{
......@@ -138,7 +190,7 @@ AppInfo(const char *title, string dir, u8* icon)
GuiImage btn1Img(&btn);
GuiImage btn2Img(&btn);
GuiImage eraseImg(&btn);
// image over
GuiImageData cancelBtn_over(Theme.cancel_active);
GuiImage cancelBtnImgOver(&cancelBtn_over);
......@@ -150,18 +202,15 @@ AppInfo(const char *title, string dir, u8* icon)
GuiImage btn1ImgOver(&btn_over);
GuiImage btn2ImgOver(&btn_over);
GuiImage eraseImgOver(&btn_over);
// Edit
GuiButton edit(editBtn.GetWidth(), editBtn.GetHeight());
edit.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
if((Options.device_icon == 2 || Options.device_icon == 3) && (Settings.device == "sd_usb" || Settings.device == "all"))
edit.SetPosition(48, 15);
else
edit.SetPosition(10, 10);
edit.SetPosition(10, 10);
edit.SetImage(&editBtnImg);
edit.SetImageOver(&editBtnImgOver);
edit.SetTrigger(&trigA);
// Cancel
GuiButton cancel(cancelBtn.GetWidth(), cancelBtn.GetHeight());
cancel.SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
......@@ -171,7 +220,7 @@ AppInfo(const char *title, string dir, u8* icon)
cancel.SetTrigger(&trigA);
cancel.SetTrigger(&trigB);
// cancel.SetState(STATE_SELECTED);
// Laden
GuiButton btn1(btn.GetWidth(), btn.GetHeight());
GuiText btn1Txt(tr("Loading"), 22, (GXColor){Theme.button_tiny_text_1, Theme.button_tiny_text_2, Theme.button_tiny_text_3, 255});
......@@ -229,7 +278,7 @@ AppInfo(const char *title, string dir, u8* icon)
startingAppName.erase(startingAppName.rfind("/"));
startingAppName.erase(0, startingAppName.rfind("/") +1);
sprintf(SelectIos, tr("Start with IOS %i (-/+)"), SearchAppIOS(startingAppName));
GuiText SelectIosTxt(SelectIos, 18, (GXColor){Theme.text_1, Theme.text_2, Theme.text_3, 255});
SelectIosTxt.SetAlignment(ALIGN_CENTRE, ALIGN_BOTTOM);
SelectIosTxt.SetPosition(0, -15);
......@@ -239,20 +288,20 @@ AppInfo(const char *title, string dir, u8* icon)
promptWindow.Append(&versionTxt);
promptWindow.Append(&coderTxt);
promptWindow.Append(viewdevice);
for(int x=0; x < i; x++)
promptWindow.Append(Entrie[x]);
if((signed)description.line.size() >= number)
{
promptWindow.Append(&upTxt);
promptWindow.Append(&downTxt);
}
if(quelltext != "")
promptWindow.Append(&edit);
promptWindow.Append(&btn1);
if(strcasecmp(Settings.code,"NULL") == 0 && strncmp(dir.c_str(), "dvd", 3) != 0)
if(strcasecmp(title, "the homebrew channel") != 0 && strcasecmp(Settings.code,"NULL") == 0)
promptWindow.Append(&erase);
if(AvailableCategory.categories.size() != 1 && strcasecmp(Settings.code,"NULL") == 0)
promptWindow.Append(&btn2);
......@@ -276,14 +325,14 @@ AppInfo(const char *title, string dir, u8* icon)
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_UP | WPAD_CLASSIC_BUTTON_UP) || PAD_ButtonsDown(0) & PAD_BUTTON_UP)
{
int z = description.text_up();
for(int x=0; x < i; x++)
Entrie[x]->SetText(description.line[x + z].c_str());
HaltResumeGui();
}
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_DOWN | WPAD_CLASSIC_BUTTON_DOWN) || PAD_ButtonsDown(0) & PAD_BUTTON_DOWN)
{
int z = description.text_down(number);
......@@ -291,7 +340,6 @@ AppInfo(const char *title, string dir, u8* icon)
for(int x=0; x < i; x++)
Entrie[x]->SetText(description.line[x + z].c_str());
HaltResumeGui();
}
......@@ -301,15 +349,14 @@ AppInfo(const char *title, string dir, u8* icon)
SelectIosTxt.SetText(SelectIos);
HaltResumeGui();
}
if(WPAD_ButtonsDown(0) & (WPAD_BUTTON_MINUS | WPAD_CLASSIC_BUTTON_MINUS) || PAD_ButtonsDown(0) & PAD_TRIGGER_L)
{
sprintf(SelectIos, tr("Start with IOS %i (-/+)"), previousIos());
SelectIosTxt.SetText(SelectIos);
HaltResumeGui();
}
if(cancel.GetState() == STATE_CLICKED) // Zurck
choice = 0;
else if(btn1.GetState() == STATE_CLICKED) // Laden
......
......@@ -22,16 +22,18 @@ int devicePrompt()
bool stop = false;
int device = -1;
GuiWindow promptWindow(232,64);
GuiWindow promptWindow(144,64);
promptWindow.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
promptWindow.SetPosition(-135, 280);
if(Options.apps == 5)
promptWindow.SetPosition(-135, 307);
GuiTrigger trigA;
GuiTrigger trigB;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
// Hintergrund
GuiImageData dialogBox(Theme.choice_large);
GuiImageData dialogBox(Theme.choice);
GuiImage dialogBoxImg(&dialogBox);
// button data
......@@ -41,60 +43,38 @@ int devicePrompt()
GuiImageData usb_BtnImgDataOver(Theme.usb_active);
GuiImageData sd_usb_BtnImgData(Theme.sd_usb_inactive);
GuiImageData sd_usb_BtnImgDataOver(Theme.sd_usb_active);
GuiImageData dvd_BtnImgData(Theme.dvd_inactive);
GuiImageData dvd_BtnImgDataOver(Theme.dvd_active);
GuiImageData all_BtnImgData(Theme.all_inactive);
GuiImageData all_BtnImgDataOver(Theme.all_active);
// button
GuiImage sd_BtnImg(&sd_BtnImgData);
GuiImage usb_BtnImg(&usb_BtnImgData);
GuiImage sd_usb_BtnImg(&sd_usb_BtnImgData);
GuiImage dvd_BtnImg(&dvd_BtnImgData);
GuiImage all_BtnImg(&all_BtnImgData);
// button over
GuiImage sd_BtnImgOver(&sd_BtnImgDataOver);
GuiImage usb_BtnImgOver(&usb_BtnImgDataOver);
GuiImage sd_usb_BtnImgOver(&sd_usb_BtnImgDataOver);
GuiImage dvd_BtnImgOver(&dvd_BtnImgDataOver);
GuiImage all_BtnImgOver(&all_BtnImgDataOver);
GuiButton sd_Btn(sd_BtnImgData.GetWidth(), sd_BtnImgData.GetHeight());
sd_Btn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
sd_Btn.SetPosition(8, 0);
sd_Btn.SetImage(&sd_BtnImg);
sd_Btn.SetImageOver(&sd_BtnImgOver);
sd_Btn.SetTrigger(&trigA);
GuiButton usb_Btn(usb_BtnImgData.GetWidth(), usb_BtnImgData.GetHeight());
usb_Btn.SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
usb_Btn.SetPosition(52, 0);
usb_Btn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
usb_Btn.SetPosition(0, 0);
usb_Btn.SetImage(&usb_BtnImg);
usb_Btn.SetImageOver(&usb_BtnImgOver);
usb_Btn.SetTrigger(&trigA);
GuiButton sd_usb_Btn(sd_usb_BtnImgData.GetWidth(), sd_usb_BtnImgData.GetHeight());
sd_usb_Btn.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
sd_usb_Btn.SetPosition(0, 0);
sd_usb_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
sd_usb_Btn.SetPosition(-8, 0);
sd_usb_Btn.SetImage(&sd_usb_BtnImg);
sd_usb_Btn.SetImageOver(&sd_usb_BtnImgOver);
sd_usb_Btn.SetTrigger(&trigA);
GuiButton dvd_Btn(dvd_BtnImgData.GetWidth(), dvd_BtnImgData.GetHeight());
dvd_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
dvd_Btn.SetPosition(-52, 0);
dvd_Btn.SetImage(&dvd_BtnImg);
dvd_Btn.SetImageOver(&dvd_BtnImgOver);
dvd_Btn.SetTrigger(&trigA);
GuiButton all_Btn(all_BtnImgData.GetWidth(), all_BtnImgData.GetHeight());
all_Btn.SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);
all_Btn.SetPosition(-8, 0);
all_Btn.SetImage(&all_BtnImg);
all_Btn.SetImageOver(&all_BtnImgOver);
all_Btn.SetTrigger(&trigA);
GuiButton back(0, 0);
back.SetTrigger(&trigB);
......@@ -102,8 +82,6 @@ int devicePrompt()
promptWindow.Append(&sd_Btn);
promptWindow.Append(&usb_Btn);
promptWindow.Append(&sd_usb_Btn);
promptWindow.Append(&dvd_Btn);
promptWindow.Append(&all_Btn);
promptWindow.Append(&back);
HaltGui();
......@@ -121,31 +99,19 @@ int devicePrompt()
device = 1;
stop = true;
}
if(usb_Btn.GetState() == STATE_CLICKED)
{
device = 2;
stop = true;
}
if(sd_usb_Btn.GetState() == STATE_CLICKED)
{
device = 3;
stop = true;
}
if(dvd_Btn.GetState() == STATE_CLICKED)
{
device = 4;
stop = true;
}
if(all_Btn.GetState() == STATE_CLICKED)
{
device = 5;
stop = true;
}
if(back.GetState() == STATE_CLICKED)
stop = true;
}
......@@ -154,7 +120,7 @@ int devicePrompt()
mainWindow->Remove(&promptWindow);
mainWindow->SetState(STATE_DEFAULT);
ResumeGui();
return device;
}
......@@ -43,7 +43,7 @@ endPrompt()
GuiImage bootmiiImg(&btn);
GuiImage shutdownImg(&btn);
GuiImage backImg(&btn);
// Buttons over data
GuiImageData btn_over(Theme.button_focus);
GuiImage bootmiiImgOver(&btn_over);
......@@ -59,7 +59,7 @@ endPrompt()
bootmii.SetImage(&bootmiiImg);
bootmii.SetImageOver(&bootmiiImgOver);
bootmii.SetTrigger(&trigA);
GuiText systemmenuTxt(tr("Exit to System Menu"), 22, (GXColor){Theme.button_small_text_1, Theme.button_small_text_2, Theme.button_small_text_3