mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-23 10:21:55 +01:00
fix underscore bug in keyboard and mp3 list.
This commit is contained in:
parent
0a11579c18
commit
9ee6729e7f
@ -16,12 +16,13 @@
|
||||
#define GAMESELECTSIZE 30
|
||||
|
||||
static int scrollbaron = 0;
|
||||
int coL2;
|
||||
//int vol;
|
||||
extern const int vol;
|
||||
/**
|
||||
* Constructor for the GuiCustomOptionBrowser class.
|
||||
*/
|
||||
GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, customOptionList * l, const char *themePath, const char *custombg, const u8 *imagebg, int scrollon)
|
||||
GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, customOptionList * l, const char *themePath, const char *custombg, const u8 *imagebg, int scrollon,int col2)
|
||||
{
|
||||
width = w;
|
||||
height = h;
|
||||
@ -32,6 +33,7 @@ GuiCustomOptionBrowser::GuiCustomOptionBrowser(int w, int h, customOptionList *
|
||||
listOffset = this->FindMenuItem(-1, 1);
|
||||
selectedItem = 0;
|
||||
focus = 1; // allow focus
|
||||
coL2 = col2;
|
||||
char imgPath[100];
|
||||
|
||||
trigA = new GuiTrigger;
|
||||
@ -339,6 +341,13 @@ void GuiCustomOptionBrowser::Update(GuiTrigger * t)
|
||||
|
||||
optionTxt[i]->SetText(options->name[next]);
|
||||
optionVal[i]->SetText(options->value[next]);
|
||||
char* pch;
|
||||
|
||||
pch=strrchr((options->value[next]),'_');
|
||||
|
||||
if (pch!=NULL){optionVal[i]->SetPosition(coL2, 15);}
|
||||
else {optionVal[i]->SetPosition(coL2, 0);}
|
||||
|
||||
optionIndex[i] = next;
|
||||
next = this->FindMenuItem(next, 1);
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class customOptionList {
|
||||
class GuiCustomOptionBrowser : public GuiElement
|
||||
{
|
||||
public:
|
||||
GuiCustomOptionBrowser(int w, int h, customOptionList * l, const char * themePath, const char *custombg, const u8 *imagebg, int scrollbar);
|
||||
GuiCustomOptionBrowser(int w, int h, customOptionList * l, const char * themePath, const char *custombg, const u8 *imagebg, int scrollbar, int col2);
|
||||
~GuiCustomOptionBrowser();
|
||||
void SetCol2Position(int x);
|
||||
int FindMenuItem(int c, int d);
|
||||
|
@ -9,6 +9,8 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "gui.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
/**
|
||||
* Constructor for the GuiKeyboard class.
|
||||
*/
|
||||
@ -338,6 +340,12 @@ void GuiKeyboard::Update(GuiTrigger * t)
|
||||
}
|
||||
}
|
||||
}
|
||||
char* pch;
|
||||
|
||||
pch=strrchr(kbtextstr,'_');
|
||||
|
||||
if (pch!=NULL){kbText->SetPosition(0, 68);}
|
||||
else {kbText->SetPosition(0, 53);}
|
||||
|
||||
this->ToggleFocus(t);
|
||||
|
||||
|
@ -3494,7 +3494,7 @@ static int MenuSettings()
|
||||
btnLogo->SetUpdateCallback(WindowCredits);
|
||||
|
||||
customOptionList options2(9);
|
||||
GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, CFG.theme_path, "bg_options_settings", bg_options_settings_png, 0);
|
||||
GuiCustomOptionBrowser optionBrowser2(396, 280, &options2, CFG.theme_path, "bg_options_settings", bg_options_settings_png, 0, 200);
|
||||
optionBrowser2.SetPosition(0, 90);
|
||||
optionBrowser2.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
optionBrowser2.SetCol2Position(200);
|
||||
@ -4224,7 +4224,7 @@ int GameSettings(struct discHdr * header)
|
||||
deleteBtn.SetTrigger(&trigA);
|
||||
deleteBtn.SetEffectGrow();
|
||||
|
||||
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings", bg_options_settings_png, 0);
|
||||
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings", bg_options_settings_png, 0, 150);
|
||||
optionBrowser3.SetPosition(0, 90);
|
||||
optionBrowser3.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
optionBrowser3.SetCol2Position(150);
|
||||
@ -4536,7 +4536,7 @@ int MenuMp3()
|
||||
} else {
|
||||
scrollon = 1;
|
||||
}
|
||||
GuiCustomOptionBrowser optionBrowser4(396, 280, &options2, CFG.theme_path, "bg_options_settings", bg_options_settings_png, scrollon);
|
||||
GuiCustomOptionBrowser optionBrowser4(396, 280, &options2, CFG.theme_path, "bg_options_settings", bg_options_settings_png, scrollon, 50);
|
||||
optionBrowser4.SetPosition(0, 90);
|
||||
optionBrowser4.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||
optionBrowser4.SetCol2Position(65);
|
||||
|
Loading…
Reference in New Issue
Block a user