mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-19 00:11:55 +01:00
* added two new wrapmodes for gui_text "DOTTED" & "SCROLL"
- DOTTED: cuts the text and appends "..." - SCROLL: scrolls the text * added dotted/scrolled text for gamebrowser, gamepromt and so on (more will come later) * remove CFG.maxcharacters and THEME.maxcharacters (no more needed)
This commit is contained in:
parent
ccc2b7215a
commit
5cf5cd6ae7
@ -246,7 +246,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
|||||||
sprintf(CFG.ogg_path, "notset");
|
sprintf(CFG.ogg_path, "notset");
|
||||||
|
|
||||||
CFG.parentalcontrol = 0;
|
CFG.parentalcontrol = 0;
|
||||||
CFG.maxcharacters = 38;
|
// CFG.maxcharacters = 38;
|
||||||
CFG.godmode = 0;
|
CFG.godmode = 0;
|
||||||
CFG.xflip = 0;
|
CFG.xflip = 0;
|
||||||
CFG.wsprompt = 0;
|
CFG.wsprompt = 0;
|
||||||
@ -260,7 +260,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
|||||||
THEME.cover_x = 26;
|
THEME.cover_x = 26;
|
||||||
THEME.cover_y = 55;
|
THEME.cover_y = 55;
|
||||||
THEME.showID = 1;
|
THEME.showID = 1;
|
||||||
THEME.maxcharacters = 36;
|
// THEME.maxcharacters = 36;
|
||||||
THEME.id_x = 68;
|
THEME.id_x = 68;
|
||||||
THEME.id_y = 305;
|
THEME.id_y = 305;
|
||||||
THEME.region_x = 68;
|
THEME.region_x = 68;
|
||||||
@ -689,13 +689,14 @@ void theme_set(char *name, char *val)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
else if (strcmp(cfg_name, "maxcharacters") == 0) {
|
else if (strcmp(cfg_name, "maxcharacters") == 0) {
|
||||||
short x;
|
short x;
|
||||||
if (sscanf(val, "%hd", &x) == 1) {
|
if (sscanf(val, "%hd", &x) == 1) {
|
||||||
THEME.maxcharacters = x;
|
THEME.maxcharacters = x;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ struct CFG
|
|||||||
// short savesettings;
|
// short savesettings;
|
||||||
short widescreen;
|
short widescreen;
|
||||||
short parentalcontrol;
|
short parentalcontrol;
|
||||||
short maxcharacters;
|
// short maxcharacters;
|
||||||
short godmode;
|
short godmode;
|
||||||
short xflip;
|
short xflip;
|
||||||
short wsprompt;
|
short wsprompt;
|
||||||
@ -85,7 +85,7 @@ struct THEME
|
|||||||
short cover_x;
|
short cover_x;
|
||||||
short cover_y;
|
short cover_y;
|
||||||
short showID;
|
short showID;
|
||||||
short maxcharacters;
|
// short maxcharacters;
|
||||||
short batteryUnused;
|
short batteryUnused;
|
||||||
short id_x;
|
short id_x;
|
||||||
short id_y;
|
short id_y;
|
||||||
|
@ -641,7 +641,7 @@ class GuiText : public GuiElement
|
|||||||
//!Sets the maximum width of the drawn texture image
|
//!Sets the maximum width of the drawn texture image
|
||||||
//!If the text exceeds this, it is wrapped to the next line
|
//!If the text exceeds this, it is wrapped to the next line
|
||||||
//!\param w Maximum width
|
//!\param w Maximum width
|
||||||
void SetMaxWidth(int w);
|
void SetMaxWidth(int w, short m=GuiText::WRAP);
|
||||||
//!Sets the font color
|
//!Sets the font color
|
||||||
//!\param c Font color
|
//!\param c Font color
|
||||||
void SetColor(GXColor c);
|
void SetColor(GXColor c);
|
||||||
@ -661,10 +661,19 @@ class GuiText : public GuiElement
|
|||||||
void SetWidescreen(bool w);
|
void SetWidescreen(bool w);
|
||||||
//!Constantly called to draw the text
|
//!Constantly called to draw the text
|
||||||
void Draw();
|
void Draw();
|
||||||
|
enum {
|
||||||
|
WRAP,
|
||||||
|
DOTTED,
|
||||||
|
SCROLL
|
||||||
|
};
|
||||||
protected:
|
protected:
|
||||||
wchar_t* text; //!< Unicode text value
|
wchar_t* text; //!< Unicode text value
|
||||||
int size; //!< Font size
|
int size; //!< Font size
|
||||||
int maxWidth; //!< Maximum width of the generated text object (for text wrapping)
|
int maxWidth; //!< Maximum width of the generated text object (for text wrapping)
|
||||||
|
short wrapMode;
|
||||||
|
short scrollPos1;
|
||||||
|
short scrollPos2;
|
||||||
|
u32 scrollDelay;
|
||||||
u16 style; //!< FreeTypeGX style attributes
|
u16 style; //!< FreeTypeGX style attributes
|
||||||
GXColor color; //!< Font color
|
GXColor color; //!< Font color
|
||||||
FreeTypeGX *font;
|
FreeTypeGX *font;
|
||||||
|
@ -49,6 +49,8 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
|||||||
bgGameImg->SetParent(this);
|
bgGameImg->SetParent(this);
|
||||||
bgGameImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
bgGameImg->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
|
|
||||||
|
maxTextWidth = bgGameImg->GetWidth() - 24 - 4;
|
||||||
|
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sbg_options_entry.png", themePath);
|
snprintf(imgPath, sizeof(imgPath), "%sbg_options_entry.png", themePath);
|
||||||
bgGamesEntry = new GuiImageData(imgPath, bg_options_entry_png);
|
bgGamesEntry = new GuiImageData(imgPath, bg_options_entry_png);
|
||||||
|
|
||||||
@ -59,6 +61,8 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
|||||||
scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
scrollbarImg->SetAlignment(ALIGN_RIGHT, ALIGN_TOP);
|
||||||
scrollbarImg->SetPosition(0, 4);
|
scrollbarImg->SetPosition(0, 4);
|
||||||
|
|
||||||
|
maxTextWidth -= scrollbarImg->GetWidth() + 4;
|
||||||
|
|
||||||
snprintf(imgPath, sizeof(imgPath), "%sscrollbar_arrowdown.png", themePath);
|
snprintf(imgPath, sizeof(imgPath), "%sscrollbar_arrowdown.png", themePath);
|
||||||
arrowDown = new GuiImageData(imgPath, scrollbar_arrowdown_png);
|
arrowDown = new GuiImageData(imgPath, scrollbar_arrowdown_png);
|
||||||
arrowDownImg = new GuiImage(arrowDown);
|
arrowDownImg = new GuiImage(arrowDown);
|
||||||
@ -115,37 +119,35 @@ GuiGameBrowser::GuiGameBrowser(int w, int h, struct discHdr * l, int gameCnt, co
|
|||||||
gameIndex = new int[pagesize];
|
gameIndex = new int[pagesize];
|
||||||
game = new GuiButton * [pagesize];
|
game = new GuiButton * [pagesize];
|
||||||
gameTxt = new GuiText * [pagesize];
|
gameTxt = new GuiText * [pagesize];
|
||||||
|
gameTxtOver = new GuiText * [pagesize];
|
||||||
gameBg = new GuiImage * [pagesize];
|
gameBg = new GuiImage * [pagesize];
|
||||||
|
|
||||||
char buffer[THEME.maxcharacters + 4];
|
|
||||||
|
|
||||||
for(int i=0; i < pagesize; i++)
|
for(int i=0; i < pagesize; i++)
|
||||||
{
|
{
|
||||||
if (strlen(get_title(&gameList[i])) < (u32)(THEME.maxcharacters + 3))
|
gameTxt[i] = new GuiText(get_title(&gameList[i]), 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
|
||||||
{
|
|
||||||
sprintf(buffer, "%s", get_title(&gameList[i]));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(buffer, get_title(&gameList[i]), THEME.maxcharacters);
|
|
||||||
buffer[THEME.maxcharacters] = '\0';
|
|
||||||
strncat(buffer, "...", 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
gameTxt[i] = new GuiText(buffer, 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
|
|
||||||
gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
gameTxt[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
gameTxt[i]->SetPosition(24,0);
|
gameTxt[i]->SetPosition(24,0);
|
||||||
|
gameTxt[i]->SetMaxWidth(maxTextWidth, GuiText::DOTTED);
|
||||||
|
|
||||||
|
|
||||||
|
gameTxtOver[i] = new GuiText(get_title(&gameList[i]), 20, (GXColor){THEME.gameText_r, THEME.gameText_g, THEME.gameText_b, 0xff});
|
||||||
|
gameTxtOver[i]->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
|
||||||
|
gameTxtOver[i]->SetPosition(24,0);
|
||||||
|
gameTxtOver[i]->SetMaxWidth(maxTextWidth, GuiText::SCROLL);
|
||||||
|
|
||||||
gameBg[i] = new GuiImage(bgGamesEntry);
|
gameBg[i] = new GuiImage(bgGamesEntry);
|
||||||
|
|
||||||
game[i] = new GuiButton(width-28,GAMESELECTSIZE);
|
game[i] = new GuiButton(width-28,GAMESELECTSIZE);
|
||||||
game[i]->SetParent(this);
|
game[i]->SetParent(this);
|
||||||
game[i]->SetLabel(gameTxt[i]);
|
game[i]->SetLabel(gameTxt[i]);
|
||||||
|
game[i]->SetLabelOver(gameTxtOver[i]);
|
||||||
game[i]->SetImageOver(gameBg[i]);
|
game[i]->SetImageOver(gameBg[i]);
|
||||||
game[i]->SetPosition(5,GAMESELECTSIZE*i+4);
|
game[i]->SetPosition(5,GAMESELECTSIZE*i+4);
|
||||||
game[i]->SetRumble(false);
|
game[i]->SetRumble(false);
|
||||||
game[i]->SetTrigger(trigA);
|
game[i]->SetTrigger(trigA);
|
||||||
game[i]->SetSoundClick(btnSoundClick);
|
game[i]->SetSoundClick(btnSoundClick);
|
||||||
|
|
||||||
|
gameIndex[i] = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,12 +184,14 @@ GuiGameBrowser::~GuiGameBrowser()
|
|||||||
for(int i=0; i<pagesize; i++)
|
for(int i=0; i<pagesize; i++)
|
||||||
{
|
{
|
||||||
delete gameTxt[i];
|
delete gameTxt[i];
|
||||||
|
delete gameTxtOver[i];
|
||||||
delete gameBg[i];
|
delete gameBg[i];
|
||||||
delete game[i];
|
delete game[i];
|
||||||
}
|
}
|
||||||
delete [] gameIndex;
|
delete [] gameIndex;
|
||||||
delete [] game;
|
delete [] game;
|
||||||
delete [] gameTxt;
|
delete [] gameTxt;
|
||||||
|
delete [] gameTxtOver;
|
||||||
delete [] gameBg;
|
delete [] gameBg;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,6 +307,34 @@ void GuiGameBrowser::Draw()
|
|||||||
}
|
}
|
||||||
this->UpdateEffects();
|
this->UpdateEffects();
|
||||||
}
|
}
|
||||||
|
void GuiGameBrowser::UpdateListEntries()
|
||||||
|
{
|
||||||
|
int next = listOffset;
|
||||||
|
for(int i=0; i<pagesize; i++)
|
||||||
|
{
|
||||||
|
if(next >= 0)
|
||||||
|
{
|
||||||
|
if(game[i]->GetState() == STATE_DISABLED)
|
||||||
|
{
|
||||||
|
game[i]->SetVisible(true);
|
||||||
|
game[i]->SetState(STATE_DEFAULT);
|
||||||
|
}
|
||||||
|
gameTxt[i]->SetText(get_title(&gameList[next]));
|
||||||
|
gameTxt[i]->SetPosition(24, 0);
|
||||||
|
gameTxtOver[i]->SetText(get_title(&gameList[next]));
|
||||||
|
gameTxtOver[i]->SetPosition(24, 0);
|
||||||
|
|
||||||
|
gameIndex[i] = next;
|
||||||
|
next = this->FindMenuItem(next, 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
game[i]->SetVisible(false);
|
||||||
|
game[i]->SetState(STATE_DISABLED);
|
||||||
|
}
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void GuiGameBrowser::Update(GuiTrigger * t)
|
void GuiGameBrowser::Update(GuiTrigger * t)
|
||||||
{
|
{
|
||||||
@ -311,6 +343,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
int next, prev;
|
int next, prev;
|
||||||
|
int old_listOffset = listOffset;
|
||||||
static int position2;
|
static int position2;
|
||||||
// scrolldelay affects how fast the list scrolls
|
// scrolldelay affects how fast the list scrolls
|
||||||
// when the arrows are clicked
|
// when the arrows are clicked
|
||||||
@ -324,40 +357,11 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
next = listOffset;
|
next = listOffset;
|
||||||
char buffer[THEME.maxcharacters + 4];
|
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++)
|
for(int i=0; i<pagesize; i++)
|
||||||
{
|
{
|
||||||
if(next >= 0)
|
if(next >= 0)
|
||||||
{
|
|
||||||
if(game[i]->GetState() == STATE_DISABLED)
|
|
||||||
{
|
|
||||||
game[i]->SetVisible(true);
|
|
||||||
game[i]->SetState(STATE_DEFAULT);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strlen(get_title(&gameList[next])) < (u32)(THEME.maxcharacters + 3))
|
|
||||||
{
|
|
||||||
sprintf(buffer, "%s", get_title(&gameList[next]));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
sprintf(buffer, get_title(&gameList[next]), THEME.maxcharacters);
|
|
||||||
buffer[THEME.maxcharacters] = '\0';
|
|
||||||
strncat(buffer, "...", 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
gameTxt[i]->SetText(buffer);
|
|
||||||
gameTxt[i]->SetPosition(24, 0);
|
|
||||||
|
|
||||||
gameIndex[i] = next;
|
|
||||||
next = this->FindMenuItem(next, 1);
|
next = this->FindMenuItem(next, 1);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
game[i]->SetVisible(false);
|
|
||||||
game[i]->SetState(STATE_DISABLED);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(focus)
|
if(focus)
|
||||||
{
|
{
|
||||||
@ -379,7 +383,8 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
if(!focus)
|
if(!focus)
|
||||||
return; // skip navigation
|
return; // skip navigation
|
||||||
|
|
||||||
if (scrollbaron == 1) {
|
if (scrollbaron == 1)
|
||||||
|
{
|
||||||
|
|
||||||
if (t->Down() ||
|
if (t->Down() ||
|
||||||
arrowDownBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////down
|
arrowDownBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////down
|
||||||
@ -395,6 +400,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list down by 1
|
// move list down by 1
|
||||||
listOffset = this->FindMenuItem(listOffset, 1);
|
listOffset = this->FindMenuItem(listOffset, 1);
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else if(game[selectedItem+1]->IsVisible())
|
else if(game[selectedItem+1]->IsVisible())
|
||||||
{
|
{
|
||||||
@ -404,20 +410,19 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
scrollbarBoxBtn->Draw();
|
scrollbarBoxBtn->Draw();
|
||||||
usleep(10000 * scrolldelay);
|
usleep(10000 * scrolldelay);
|
||||||
|
}
|
||||||
|
WPAD_ScanPads();
|
||||||
}WPAD_ScanPads();
|
|
||||||
u8 cnt, buttons = NULL;
|
u8 cnt, buttons = NULL;
|
||||||
/* Get pressed buttons */
|
/* Get pressed buttons */
|
||||||
for (cnt = 0; cnt < 4; cnt++)
|
for (cnt = 0; cnt < 4; cnt++)
|
||||||
buttons |= WPAD_ButtonsHeld(cnt);
|
buttons |= WPAD_ButtonsHeld(cnt);
|
||||||
if (buttons == WPAD_BUTTON_A) {
|
if (buttons == WPAD_BUTTON_A)
|
||||||
|
{
|
||||||
} else {
|
}
|
||||||
arrowDownBtn->ResetState();
|
else
|
||||||
|
{
|
||||||
|
arrowDownBtn->ResetState();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if(t->Up() ||
|
else if(t->Up() ||
|
||||||
arrowUpBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////up
|
arrowUpBtn->GetState() == STATE_CLICKED || ////////////////////////////////////////////up
|
||||||
@ -431,6 +436,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list up by 1
|
// move list up by 1
|
||||||
listOffset = prev;
|
listOffset = prev;
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -440,23 +446,20 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
scrollbarBoxBtn->Draw();
|
scrollbarBoxBtn->Draw();
|
||||||
usleep(10000 * scrolldelay);
|
usleep(10000 * scrolldelay);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
u8 cnt, buttons = NULL;
|
u8 cnt, buttons = NULL;
|
||||||
/* Get pressed buttons */
|
/* Get pressed buttons */
|
||||||
for (cnt = 0; cnt < 4; cnt++)
|
for (cnt = 0; cnt < 4; cnt++)
|
||||||
buttons |= WPAD_ButtonsHeld(cnt);
|
buttons |= WPAD_ButtonsHeld(cnt);
|
||||||
if (buttons == WPAD_BUTTON_A) {
|
if (buttons == WPAD_BUTTON_A)
|
||||||
|
{
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
arrowUpBtn->ResetState();
|
arrowUpBtn->ResetState();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
u8 cnt, buttons = NULL;/////////////////////////////////////////////////////scroll by holding B and tilt wiimote
|
u8 cnt, buttons = NULL;/////////////////////////////////////////////////////scroll by holding B and tilt wiimote
|
||||||
int position1 = 0;
|
int position1 = 0;
|
||||||
@ -464,16 +467,19 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
position1 = t->wpad.ir.y;
|
position1 = t->wpad.ir.y;
|
||||||
|
|
||||||
if (position2 == 0 && position1 > 0) {
|
if (position2 == 0 && position1 > 0)
|
||||||
|
{
|
||||||
position2 = position1;
|
position2 = position1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (cnt = 0; cnt < 4; cnt++)
|
for (cnt = 0; cnt < 4; cnt++)
|
||||||
buttons |= WPAD_ButtonsHeld(cnt);
|
buttons |= WPAD_ButtonsHeld(cnt);
|
||||||
|
|
||||||
if (buttons == WPAD_BUTTON_B && position1 > 0) {
|
if (buttons == WPAD_BUTTON_B && position1 > 0)
|
||||||
|
{
|
||||||
scrollbarBoxBtn->ScrollIsOn(1);
|
scrollbarBoxBtn->ScrollIsOn(1);
|
||||||
if (position2 > position1) {
|
if (position2 > position1)
|
||||||
|
{
|
||||||
|
|
||||||
prev = this->FindMenuItem(gameIndex[selectedItem], -1);
|
prev = this->FindMenuItem(gameIndex[selectedItem], -1);
|
||||||
|
|
||||||
@ -483,6 +489,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list up by 1
|
// move list up by 1
|
||||||
listOffset = prev;
|
listOffset = prev;
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -496,9 +503,9 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (position2 < position1) {
|
}
|
||||||
|
else if (position2 < position1)
|
||||||
|
{
|
||||||
next = this->FindMenuItem(gameIndex[selectedItem], 1);
|
next = this->FindMenuItem(gameIndex[selectedItem], 1);
|
||||||
|
|
||||||
if(next >= 0)
|
if(next >= 0)
|
||||||
@ -507,6 +514,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list down by 1
|
// move list down by 1
|
||||||
listOffset = this->FindMenuItem(listOffset, 1);
|
listOffset = this->FindMenuItem(listOffset, 1);
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else if(game[selectedItem+1]->IsVisible())
|
else if(game[selectedItem+1]->IsVisible())
|
||||||
{
|
{
|
||||||
@ -516,12 +524,12 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
scrollbarBoxBtn->Draw();
|
scrollbarBoxBtn->Draw();
|
||||||
usleep(10000 * scrolldelay);
|
usleep(10000 * scrolldelay);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (!buttons) {
|
}
|
||||||
|
else if (!buttons)
|
||||||
|
{
|
||||||
scrollbarBoxBtn->ScrollIsOn(0);
|
scrollbarBoxBtn->ScrollIsOn(0);
|
||||||
position2 = 0;
|
position2 = 0;
|
||||||
}
|
}
|
||||||
@ -536,15 +544,18 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
|
|
||||||
//listOffset = (position * gameCnt)/237 - selectedItem;
|
//listOffset = (position * gameCnt)/237 - selectedItem;
|
||||||
listOffset = (position * gameCnt)/(25.2 * pagesize) - selectedItem;
|
listOffset = (position * gameCnt)/(25.2 * pagesize) - selectedItem;
|
||||||
|
// UpdateEntries();
|
||||||
|
|
||||||
if(listOffset <= 0)
|
if(listOffset <= 0)
|
||||||
{
|
{
|
||||||
listOffset = 0;
|
listOffset = 0;
|
||||||
|
// UpdateEntries();
|
||||||
selectedItem = 0;
|
selectedItem = 0;
|
||||||
}
|
}
|
||||||
else if(listOffset+pagesize >= gameCnt)
|
else if(listOffset+pagesize >= gameCnt)
|
||||||
{
|
{
|
||||||
listOffset = gameCnt - pagesize;
|
listOffset = gameCnt - pagesize;
|
||||||
|
// UpdateEntries();
|
||||||
selectedItem = pagesize-1;
|
selectedItem = pagesize-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,6 +575,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
listOffset =listOffset+ pagesize;
|
listOffset =listOffset+ pagesize;
|
||||||
if(listOffset+pagesize >= gameCnt)
|
if(listOffset+pagesize >= gameCnt)
|
||||||
listOffset = gameCnt-pagesize;
|
listOffset = gameCnt-pagesize;
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(t->Left())
|
else if(t->Left())
|
||||||
@ -573,12 +585,13 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
listOffset =listOffset- pagesize;
|
listOffset =listOffset- pagesize;
|
||||||
if(listOffset < 0)
|
if(listOffset < 0)
|
||||||
listOffset = 0;
|
listOffset = 0;
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if(t->Down())/////////////////////////////////////////////////////if there isn't a scrollbar and down is pressed
|
if(t->Down())/////////////////////////////////////////////////////if there isn't a scrollbar and down is pressed
|
||||||
{
|
{
|
||||||
next = this->FindMenuItem(gameIndex[selectedItem], 1);
|
next = this->FindMenuItem(gameIndex[selectedItem], 1);
|
||||||
@ -589,6 +602,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list down by 1
|
// move list down by 1
|
||||||
listOffset = this->FindMenuItem(listOffset, 1);
|
listOffset = this->FindMenuItem(listOffset, 1);
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else if(game[selectedItem+1]->IsVisible())
|
else if(game[selectedItem+1]->IsVisible())
|
||||||
{
|
{
|
||||||
@ -608,6 +622,7 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
{
|
{
|
||||||
// move list up by 1
|
// move list up by 1
|
||||||
listOffset = prev;
|
listOffset = prev;
|
||||||
|
// UpdateEntries();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -618,6 +633,8 @@ void GuiGameBrowser::Update(GuiTrigger * t)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(old_listOffset != listOffset)
|
||||||
|
UpdateListEntries();
|
||||||
|
|
||||||
if(updateCB)
|
if(updateCB)
|
||||||
updateCB(this);
|
updateCB(this);
|
||||||
@ -631,6 +648,7 @@ void GuiGameBrowser::Reload(struct discHdr * l, int count)
|
|||||||
scrollbaron = (gameCnt > pagesize) ? 1 : 0;
|
scrollbaron = (gameCnt > pagesize) ? 1 : 0;
|
||||||
selectedItem = 0;
|
selectedItem = 0;
|
||||||
listOffset = 0;
|
listOffset = 0;
|
||||||
|
UpdateListEntries();
|
||||||
|
|
||||||
for(int i=0; i<pagesize; i++)
|
for(int i=0; i<pagesize; i++)
|
||||||
game[i]->ResetState();
|
game[i]->ResetState();
|
||||||
|
@ -45,10 +45,12 @@ class GuiGameBrowser : public GuiElement
|
|||||||
void Reload(struct discHdr * l, int count);
|
void Reload(struct discHdr * l, int count);
|
||||||
//GuiText * optionVal[PAGESIZE];
|
//GuiText * optionVal[PAGESIZE];
|
||||||
protected:
|
protected:
|
||||||
|
void UpdateListEntries();
|
||||||
int selectedItem;
|
int selectedItem;
|
||||||
int listOffset;
|
int listOffset;
|
||||||
int scrollbaron;
|
int scrollbaron;
|
||||||
int pagesize;
|
int pagesize;
|
||||||
|
int maxTextWidth;
|
||||||
|
|
||||||
struct discHdr * gameList;
|
struct discHdr * gameList;
|
||||||
int gameCnt;
|
int gameCnt;
|
||||||
@ -56,6 +58,7 @@ class GuiGameBrowser : public GuiElement
|
|||||||
int * gameIndex;
|
int * gameIndex;
|
||||||
GuiButton ** game;
|
GuiButton ** game;
|
||||||
GuiText ** gameTxt;
|
GuiText ** gameTxt;
|
||||||
|
GuiText ** gameTxtOver;
|
||||||
GuiImage ** gameBg;
|
GuiImage ** gameBg;
|
||||||
|
|
||||||
GuiButton * arrowUpBtn;
|
GuiButton * arrowUpBtn;
|
||||||
|
@ -14,6 +14,7 @@ static int currentSize = 0;
|
|||||||
static int currentWidescreen = 0;
|
static int currentWidescreen = 0;
|
||||||
static int presetSize = 0;
|
static int presetSize = 0;
|
||||||
static int presetMaxWidth = 0;
|
static int presetMaxWidth = 0;
|
||||||
|
static int presetWrapMode = GuiText::WRAP;
|
||||||
static int presetAlignmentHor = 0;
|
static int presetAlignmentHor = 0;
|
||||||
static int presetAlignmentVert = 0;
|
static int presetAlignmentVert = 0;
|
||||||
static u16 presetStyle = 0;
|
static u16 presetStyle = 0;
|
||||||
@ -30,6 +31,10 @@ GuiText::GuiText(const char * t, int s, GXColor c)
|
|||||||
alpha = c.a;
|
alpha = c.a;
|
||||||
style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE;
|
style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE;
|
||||||
maxWidth = 0;
|
maxWidth = 0;
|
||||||
|
wrapMode = GuiText::WRAP;
|
||||||
|
scrollPos1 = 0;
|
||||||
|
scrollPos2 = 0;
|
||||||
|
scrollDelay = 0;
|
||||||
font = NULL;
|
font = NULL;
|
||||||
widescreen = 0; //added
|
widescreen = 0; //added
|
||||||
|
|
||||||
@ -51,6 +56,10 @@ GuiText::GuiText(const char * t)
|
|||||||
alpha = presetColor.a;
|
alpha = presetColor.a;
|
||||||
style = presetStyle;
|
style = presetStyle;
|
||||||
maxWidth = presetMaxWidth;
|
maxWidth = presetMaxWidth;
|
||||||
|
wrapMode = presetWrapMode;
|
||||||
|
scrollPos1 = 0;
|
||||||
|
scrollPos2 = 0;
|
||||||
|
scrollDelay = 0;
|
||||||
font = NULL;
|
font = NULL;
|
||||||
widescreen = 0; //added
|
widescreen = 0; //added
|
||||||
|
|
||||||
@ -82,6 +91,8 @@ void GuiText::SetText(const char * t)
|
|||||||
|
|
||||||
if(t)
|
if(t)
|
||||||
text = fontSystem->charToWideChar((char *)t);
|
text = fontSystem->charToWideChar((char *)t);
|
||||||
|
scrollPos2 = 0;
|
||||||
|
scrollDelay = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiText::SetPresets(int sz, GXColor c, int w, u16 s, int h, int v)
|
void GuiText::SetPresets(int sz, GXColor c, int w, u16 s, int h, int v)
|
||||||
@ -100,10 +111,11 @@ void GuiText::SetFontSize(int s)
|
|||||||
size = s;
|
size = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiText::SetMaxWidth(int w)
|
void GuiText::SetMaxWidth(int w, short m/*=GuiText::WRAP*/)
|
||||||
{
|
{
|
||||||
LOCK(this);
|
LOCK(this);
|
||||||
maxWidth = w;
|
maxWidth = w;
|
||||||
|
wrapMode = m;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GuiText::SetColor(GXColor c)
|
void GuiText::SetColor(GXColor c)
|
||||||
@ -211,7 +223,9 @@ void GuiText::Draw()
|
|||||||
if(alignmentVert == ALIGN_MIDDLE)
|
if(alignmentVert == ALIGN_MIDDLE)
|
||||||
voffset = -newSize/2 + 2;
|
voffset = -newSize/2 + 2;
|
||||||
|
|
||||||
if(maxWidth > 0) // text wrapping
|
if(maxWidth > 0 && (font ? font : fontSystem)->getWidth(text) > maxWidth)
|
||||||
|
{
|
||||||
|
if(wrapMode == GuiText::WRAP) // text wrapping
|
||||||
{
|
{
|
||||||
int lineheight = newSize + 6;
|
int lineheight = newSize + 6;
|
||||||
int strlen = wcslen(text);
|
int strlen = wcslen(text);
|
||||||
@ -265,14 +279,108 @@ void GuiText::Draw()
|
|||||||
for(i=0; i < linenum; i++)
|
for(i=0; i < linenum; i++)
|
||||||
{
|
{
|
||||||
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style);
|
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style);
|
||||||
//fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset+i*lineheight, tmptext[i], c, style);
|
|
||||||
delete tmptext[i];
|
delete tmptext[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(wrapMode == GuiText::DOTTED) // text dotted
|
||||||
|
{
|
||||||
|
wchar_t save[4];
|
||||||
|
int strlen = wcslen(text);
|
||||||
|
int dotPos=strlen-3;
|
||||||
|
int i;
|
||||||
|
bool drawed = false;
|
||||||
|
while(dotPos > 0 && drawed == false)
|
||||||
|
{
|
||||||
|
for(i=0; i<4; i++) // save Text for "..."
|
||||||
|
{
|
||||||
|
save[i] = text[dotPos+i];
|
||||||
|
text[dotPos+i] = (i != 3 ? _TEXT('.') : 0);
|
||||||
|
}
|
||||||
|
if(((font ? font : fontSystem)->getWidth(text)) <= maxWidth)
|
||||||
|
{
|
||||||
|
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
|
||||||
|
drawed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(i=0; i<4; i++) // write saved Text back
|
||||||
|
text[dotPos+i] = save[i];
|
||||||
|
dotPos--;
|
||||||
|
}
|
||||||
|
if(!drawed)
|
||||||
|
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
|
||||||
|
}
|
||||||
|
else if(wrapMode == GuiText::SCROLL) // text scroller
|
||||||
|
{
|
||||||
|
wchar_t save;
|
||||||
|
|
||||||
|
if(scrollPos2 == 0 || frameCount > scrollDelay+5)
|
||||||
|
{
|
||||||
|
scrollPos1 = 0;
|
||||||
|
for(scrollPos2 = wcslen(text); scrollPos2 > 1; scrollPos2--)
|
||||||
|
{
|
||||||
|
save = text[scrollPos2]; // save Pos2
|
||||||
|
text[scrollPos2] = 0;
|
||||||
|
int textWidth = (font ? font : fontSystem)->getWidth(text);
|
||||||
|
text[scrollPos2] = save; // restore Pos2
|
||||||
|
if(textWidth <= maxWidth)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
scrollDelay = frameCount+50; // wait 50 Frames before beginning with scrolling
|
||||||
|
}
|
||||||
|
else if(scrollPos2 > 0 && frameCount >= scrollDelay)
|
||||||
|
{
|
||||||
|
scrollPos1++;
|
||||||
|
int strlen = wcslen(text);
|
||||||
|
for(; scrollPos2 < strlen; scrollPos2++)
|
||||||
|
{
|
||||||
|
save = text[scrollPos2+1]; // save Pos2
|
||||||
|
text[scrollPos2+1] = 0;
|
||||||
|
int textWidth = (font ? font : fontSystem)->getWidth(&text[scrollPos1]);
|
||||||
|
text[scrollPos2+1] = save; // restore Pos2
|
||||||
|
if(textWidth > maxWidth)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(scrollPos2 == strlen)
|
||||||
|
{
|
||||||
|
scrollPos2 = -scrollPos2;
|
||||||
|
scrollDelay = frameCount+25; // when dir-change wait 25 Frames
|
||||||
|
}
|
||||||
|
else
|
||||||
|
scrollDelay = frameCount+10; // wait 10 Frames
|
||||||
|
}
|
||||||
|
else if(frameCount >= scrollDelay)
|
||||||
|
{
|
||||||
|
scrollPos2 = -scrollPos2;
|
||||||
|
|
||||||
|
scrollPos1--;
|
||||||
|
for(; scrollPos2 > scrollPos1; scrollPos2--)
|
||||||
|
{
|
||||||
|
save = text[scrollPos2]; // save Pos2
|
||||||
|
text[scrollPos2] = 0;
|
||||||
|
int textWidth = (font ? font : fontSystem)->getWidth(&text[scrollPos1]);
|
||||||
|
text[scrollPos2] = save; // restore Pos2
|
||||||
|
if(textWidth <= maxWidth)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(scrollPos1 == 0)
|
||||||
|
{
|
||||||
|
scrollPos2 = -scrollPos2;
|
||||||
|
scrollDelay = frameCount+25; // when dir-change wait 25 Frames
|
||||||
|
}
|
||||||
|
else
|
||||||
|
scrollDelay = frameCount+10; // wait 10 Frames
|
||||||
|
|
||||||
|
scrollPos2 = -scrollPos2;
|
||||||
|
}
|
||||||
|
save = text[abs(scrollPos2)]; // save Pos2
|
||||||
|
text[abs(scrollPos2)] = 0;
|
||||||
|
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, &text[scrollPos1], c, style);
|
||||||
|
text[abs(scrollPos2)] = save; // restore Pos2
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
|
(font ? font : fontSystem)->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
|
||||||
//fontSystem->drawText(this->GetLeft(), this->GetTop()+voffset, text, c, style);
|
|
||||||
}
|
}
|
||||||
this->UpdateEffects();
|
this->UpdateEffects();
|
||||||
}
|
}
|
||||||
|
@ -979,7 +979,6 @@ int GameWindowPrompt()
|
|||||||
f32 size = 0.0;
|
f32 size = 0.0;
|
||||||
char ID[4];
|
char ID[4];
|
||||||
char IDFull[7];
|
char IDFull[7];
|
||||||
char gameName[CFG.maxcharacters + 4];
|
|
||||||
u8 faveChoice = 0;
|
u8 faveChoice = 0;
|
||||||
u16 playCount = 0;
|
u16 playCount = 0;
|
||||||
|
|
||||||
@ -1030,6 +1029,7 @@ int GameWindowPrompt()
|
|||||||
GuiText nameTxt("", 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); //{50, 50, 50, 255});
|
GuiText nameTxt("", 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); //{50, 50, 50, 255});
|
||||||
if (Settings.wsprompt == yes)
|
if (Settings.wsprompt == yes)
|
||||||
nameTxt.SetWidescreen(CFG.widescreen);
|
nameTxt.SetWidescreen(CFG.widescreen);
|
||||||
|
nameTxt.SetMaxWidth(350, GuiText::SCROLL);
|
||||||
GuiButton nameBtn(120,50);
|
GuiButton nameBtn(120,50);
|
||||||
nameBtn.SetLabel(&nameTxt);
|
nameBtn.SetLabel(&nameTxt);
|
||||||
// nameBtn.SetLabelOver(&nameTxt);
|
// nameBtn.SetLabelOver(&nameTxt);
|
||||||
@ -1193,7 +1193,6 @@ int GameWindowPrompt()
|
|||||||
diskCover = NULL;
|
diskCover = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// changed = 0;
|
|
||||||
//load disc image based or what game is seleted
|
//load disc image based or what game is seleted
|
||||||
struct discHdr * header = &gameList[gameSelected];
|
struct discHdr * header = &gameList[gameSelected];
|
||||||
WBFS_GameSize(header->id, &size);
|
WBFS_GameSize(header->id, &size);
|
||||||
@ -1203,17 +1202,6 @@ int GameWindowPrompt()
|
|||||||
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
|
snprintf (ID,sizeof(ID),"%c%c%c", header->id[0], header->id[1], header->id[2]);
|
||||||
snprintf (IDFull,sizeof(IDFull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
snprintf (IDFull,sizeof(IDFull),"%c%c%c%c%c%c", header->id[0], header->id[1], header->id[2],header->id[3], header->id[4], header->id[5]);
|
||||||
|
|
||||||
//set name
|
|
||||||
if (strlen(get_title(header)) < (u32)(CFG.maxcharacters + 3)) {
|
|
||||||
sprintf(gameName, "%s", get_title(header));
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
strncpy(gameName, get_title(header), CFG.maxcharacters);
|
|
||||||
gameName[CFG.maxcharacters] = '\0';
|
|
||||||
strncat(gameName, "...", 3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (diskCover)
|
if (diskCover)
|
||||||
delete diskCover;
|
delete diskCover;
|
||||||
|
|
||||||
@ -1282,7 +1270,7 @@ int GameWindowPrompt()
|
|||||||
else
|
else
|
||||||
diskImg.SetImage(diskCover);
|
diskImg.SetImage(diskCover);
|
||||||
sizeTxt.SetText(sizeText);
|
sizeTxt.SetText(sizeText);
|
||||||
nameTxt.SetText(gameName);
|
nameTxt.SetText(get_title(header));
|
||||||
|
|
||||||
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
struct Game_NUM* game_num = CFG_get_game_num(header->id);
|
||||||
if (game_num) {
|
if (game_num) {
|
||||||
@ -2616,11 +2604,12 @@ static int MenuInstall()
|
|||||||
|
|
||||||
Disc_ReadHeader(&headerdisc);
|
Disc_ReadHeader(&headerdisc);
|
||||||
name = headerdisc.title;
|
name = headerdisc.title;
|
||||||
if (strlen(name) < (34 + 3)) {
|
if (strlen(name) < (MAX_CHARACTERS + 3)) {
|
||||||
memset(buffer, 0, sizeof(buffer));
|
memset(buffer, 0, sizeof(buffer));
|
||||||
sprintf(name, "%s", name);
|
sprintf(name, "%s", name);
|
||||||
} else {
|
} else {
|
||||||
strncpy(buffer, name, 34);
|
strncpy(buffer, name, MAX_CHARACTERS);
|
||||||
|
buffer[MAX_CHARACTERS] = '\0';
|
||||||
strncat(buffer, "...", 3);
|
strncat(buffer, "...", 3);
|
||||||
sprintf(name, "%s", buffer);
|
sprintf(name, "%s", buffer);
|
||||||
}
|
}
|
||||||
@ -4855,9 +4844,10 @@ int GameSettings(struct discHdr * header)
|
|||||||
GuiTrigger trigB;
|
GuiTrigger trigB;
|
||||||
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
trigB.SetButtonOnlyTrigger(-1, WPAD_BUTTON_B | WPAD_CLASSIC_BUTTON_B, PAD_BUTTON_B);
|
||||||
|
|
||||||
GuiText titleTxt(gameName, 28, (GXColor){0, 0, 0, 255});
|
GuiText titleTxt(get_title(header), 28, (GXColor){0, 0, 0, 255});
|
||||||
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
|
||||||
titleTxt.SetPosition(0,40);
|
titleTxt.SetPosition(12,40);
|
||||||
|
titleTxt.SetMaxWidth(356, GuiText::SCROLL);
|
||||||
|
|
||||||
GuiImage settingsbackground(&settingsbg);
|
GuiImage settingsbackground(&settingsbg);
|
||||||
GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight());
|
GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight());
|
||||||
|
@ -27,6 +27,7 @@ static unsigned char gp_fifo[DEFAULT_FIFO_SIZE] ATTRIBUTE_ALIGN (32);
|
|||||||
static Mtx GXmodelView2D;
|
static Mtx GXmodelView2D;
|
||||||
int screenheight;
|
int screenheight;
|
||||||
int screenwidth;
|
int screenwidth;
|
||||||
|
u32 frameCount = 0;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* UpdatePadsCB
|
* UpdatePadsCB
|
||||||
@ -36,6 +37,7 @@ int screenwidth;
|
|||||||
static void
|
static void
|
||||||
UpdatePadsCB ()
|
UpdatePadsCB ()
|
||||||
{
|
{
|
||||||
|
frameCount++;
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
WPAD_ScanPads();
|
WPAD_ScanPads();
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,5 +20,6 @@ void Menu_DrawRectangle(f32 x, f32 y, f32 width, f32 height, GXColor color, u8 f
|
|||||||
|
|
||||||
extern int screenheight;
|
extern int screenheight;
|
||||||
extern int screenwidth;
|
extern int screenwidth;
|
||||||
|
extern u32 frameCount;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user