mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-12-18 16:01:58 +01:00
new Tooltip-Handling, change Widescreen-sizing to mathematically correct value (0.75 alias 1.333), new Clock-Font
This commit is contained in:
parent
29f0691a08
commit
6e3f50efeb
@ -205,10 +205,10 @@ void FreeTypeGX::unloadFont() {
|
||||
this->fontData.clear();
|
||||
}
|
||||
|
||||
void FreeTypeGX::changeSize(FT_UInt pointSize) {
|
||||
void FreeTypeGX::changeSize(FT_UInt vPointSize, FT_UInt hPointSize/*=0*/) {
|
||||
this->unloadFont();
|
||||
this->ftPointSize = pointSize;
|
||||
FT_Set_Pixel_Sizes(this->ftFace, 0, this->ftPointSize);
|
||||
this->ftPointSize = vPointSize;
|
||||
FT_Set_Pixel_Sizes(this->ftFace, hPointSize, this->ftPointSize);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -270,7 +270,7 @@ class FreeTypeGX {
|
||||
|
||||
uint16_t loadFont(uint8_t* fontBuffer, FT_Long bufferSize, FT_UInt pointSize, bool cacheAll = false);
|
||||
uint16_t loadFont(const uint8_t* fontBuffer, FT_Long bufferSize, FT_UInt pointSize, bool cacheAll = false);
|
||||
void changeSize(FT_UInt pointSize);
|
||||
void changeSize(FT_UInt vPointSize, FT_UInt hPointSize=0);
|
||||
|
||||
uint16_t drawText(int16_t x, int16_t y, wchar_t *text, GXColor color = ftgxWhite, uint16_t textStyling = FTGX_NULL);
|
||||
uint16_t drawText(int16_t x, int16_t y, wchar_t const *text, GXColor color = ftgxWhite, uint16_t textStyling = FTGX_NULL);
|
||||
|
@ -248,7 +248,7 @@ void CFG_Default(int widescreen) // -1 = non forced Mode
|
||||
THEME.info_g = 154;
|
||||
THEME.info_b = 192;
|
||||
THEME.clock_x = 0;
|
||||
THEME.clock_y = -128;
|
||||
THEME.clock_y = 330;
|
||||
THEME.clockAlign = CFG_ALIGN_CENTRE;
|
||||
THEME.sdcard_x = 160;
|
||||
THEME.sdcard_y = 390;
|
||||
|
@ -53,8 +53,17 @@ extern const u32 button_click_pcm_size;
|
||||
extern const u8 button_click2_pcm[];
|
||||
extern const u32 button_click2_pcm_size;
|
||||
|
||||
extern const u8 tooltip_png[];
|
||||
extern const u32 tooltip_png_size;
|
||||
///extern const u8 tooltip_png[];
|
||||
///extern const u32 tooltip_png_size;
|
||||
|
||||
extern const u8 tooltip_left_png[];
|
||||
extern const u32 tooltip_left_png_size;
|
||||
|
||||
extern const u8 tooltip_tile_png[];
|
||||
extern const u32 tooltip_tile_png_size;
|
||||
|
||||
extern const u8 tooltip_right_png[];
|
||||
extern const u32 tooltip_right_png_size;
|
||||
|
||||
extern const u8 startgame_arrow_left_png[];
|
||||
extern const u32 startgame_arrow_left_png_size;
|
||||
@ -62,11 +71,11 @@ extern const u32 startgame_arrow_left_png_size;
|
||||
extern const u8 startgame_arrow_right_png[];
|
||||
extern const u32 startgame_arrow_right_png_size;
|
||||
|
||||
extern const u8 tooltip_medium_png[];
|
||||
extern const u32 tooltip_medium_png_size;
|
||||
///extern const u8 tooltip_medium_png[];
|
||||
///extern const u32 tooltip_medium_png_size;
|
||||
|
||||
extern const u8 tooltip_large_png[];
|
||||
extern const u32 tooltip_large_png_size;
|
||||
///extern const u8 tooltip_large_png[];
|
||||
///extern const u32 tooltip_large_png_size;
|
||||
|
||||
extern const u8 credits_bg_png[];
|
||||
extern const u32 credits_bg_png_size;
|
||||
|
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1.6 KiB |
BIN
source/images/tooltip_left.png
Normal file
BIN
source/images/tooltip_left.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 676 B |
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
BIN
source/images/tooltip_right.png
Normal file
BIN
source/images/tooltip_right.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 896 B |
BIN
source/images/tooltip_tile.png
Normal file
BIN
source/images/tooltip_tile.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 148 B |
@ -301,7 +301,7 @@ class GuiElement
|
||||
void SetScale(float s);
|
||||
//!Gets the element's current scale
|
||||
//!Considers scale, scaleDyn, and the parent element's GetScale() value
|
||||
float GetScale();
|
||||
virtual float GetScale();
|
||||
//!Set a new GuiTrigger for the element
|
||||
//!\param t Pointer to GuiTrigger
|
||||
void SetTrigger(GuiTrigger * t);
|
||||
@ -551,7 +551,7 @@ class GuiImage : public GuiElement
|
||||
//!Sets the number of times to draw the image horizontally
|
||||
//!\param t Number of times to draw the image
|
||||
void SetTile(int t);
|
||||
// not NULL set horizontal scale to 0.8 //added
|
||||
// not NULL set horizontal scale to 0.75 //added
|
||||
void SetWidescreen(short w);
|
||||
//!Constantly called to draw the image
|
||||
void Draw();
|
||||
@ -641,6 +641,8 @@ class GuiText : public GuiElement
|
||||
void SetFont(FreeTypeGX *f);
|
||||
//!Get the Horizontal Size of Text
|
||||
int GetTextWidth();
|
||||
// not NULL set horizontal scale to 0.75 //added
|
||||
void SetWidescreen(short w);
|
||||
//!Constantly called to draw the text
|
||||
void Draw();
|
||||
protected:
|
||||
@ -650,6 +652,7 @@ class GuiText : public GuiElement
|
||||
u16 style; //!< FreeTypeGX style attributes
|
||||
GXColor color; //!< Font color
|
||||
FreeTypeGX *font;
|
||||
short widescreen; //added
|
||||
};
|
||||
|
||||
//!Display, manage, and manipulate tooltips in the GUI.
|
||||
@ -663,17 +666,20 @@ class GuiTooltip : public GuiElement
|
||||
//!Destructor
|
||||
~ GuiTooltip();
|
||||
|
||||
//!Gets the element's current scale
|
||||
//!Considers scale, scaleDyn, and the parent element's GetScale() value
|
||||
float GetScale();
|
||||
//!Sets the text of the GuiTooltip element
|
||||
//!\param t Text
|
||||
void SetText(const char * t);
|
||||
void SetWidescreen(short w); // timely a dummy
|
||||
//!Constantly called to draw the GuiButton
|
||||
void Draw();
|
||||
|
||||
protected:
|
||||
static GuiImageData tooltipStd;
|
||||
static GuiImageData tooltipMedium;
|
||||
static GuiImageData tooltipLarge;
|
||||
GuiImage image; //!< Tooltip
|
||||
GuiImage leftImage; //!< Tooltip left-image
|
||||
GuiImage tileImage; //!< Tooltip tile-image
|
||||
GuiImage rightImage; //!< Tooltip right-image
|
||||
GuiText *text;
|
||||
};
|
||||
|
||||
@ -741,7 +747,7 @@ class GuiButton : public GuiElement
|
||||
//!Constantly called to draw the GuiButtons ToolTip
|
||||
//!Sets the button's Tooltip on over
|
||||
//!\param i Pointer to GuiImage object, t Pointer to GuiText, x & y Positioning
|
||||
void SetToolTip(GuiImage* i, GuiText * t, int x, int y);
|
||||
// void SetToolTip(GuiImage* i, GuiText * t, int x, int y);
|
||||
//!Constantly called to draw the GuiButtons ToolTip
|
||||
//!Sets the button's Tooltip on over
|
||||
//!\param i Pointer to GuiImage object, t Pointer to GuiText, x & y Positioning
|
||||
|
@ -144,6 +144,7 @@ void GuiButton::SetSoundClick(GuiSound * snd)
|
||||
}
|
||||
|
||||
//No delay for now
|
||||
/*
|
||||
void GuiButton::SetToolTip(GuiImage* img, GuiText * txt, int x, int y)
|
||||
{
|
||||
LOCK(this);
|
||||
@ -162,6 +163,7 @@ void GuiButton::SetToolTip(GuiImage* img, GuiText * txt, int x, int y)
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
void GuiButton::SetToolTip(GuiElement* tt, int x, int y, int h_align, int v_align)
|
||||
{
|
||||
LOCK(this);
|
||||
@ -205,6 +207,43 @@ void GuiButton::Draw()
|
||||
this->UpdateEffects();
|
||||
}
|
||||
void GuiButton::DrawTooltip()
|
||||
{
|
||||
LOCK(this);
|
||||
if(state == STATE_SELECTED && (toolTip || toolTip2))
|
||||
{
|
||||
if (time2 == 0)
|
||||
{
|
||||
time(&time1);
|
||||
time2 = time1;
|
||||
}
|
||||
if(time1 != 0) // timer läuft
|
||||
time(&time1);
|
||||
|
||||
if(time1 == 0 || difftime(time1, time2) >= 2)
|
||||
{
|
||||
if(time1 != 0) // timer gerade abgelaufen
|
||||
if(toolTip2) toolTip2->SetEffect(EFFECT_FADE, 20);
|
||||
time1 = 0;
|
||||
if(toolTip2) toolTip2->Draw();
|
||||
if(toolTip) toolTip->Draw();
|
||||
if (toolTipTxt)
|
||||
{
|
||||
toolTipTxt->Draw();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(time2 != 0 && time1 == 0) // timer abgelaufen, gerade DESELECT
|
||||
if(toolTip2) toolTip2->SetEffect(EFFECT_FADE, -20);
|
||||
time2 = 0;
|
||||
}
|
||||
if(toolTip2 && toolTip2->GetEffect())
|
||||
toolTip2->Draw();
|
||||
}
|
||||
/*
|
||||
void GuiButton::DrawTooltip()
|
||||
{
|
||||
LOCK(this);
|
||||
if(state == STATE_SELECTED && (toolTip || toolTip2))
|
||||
@ -226,6 +265,7 @@ void GuiButton::DrawTooltip()
|
||||
else
|
||||
time2 = 0;
|
||||
}
|
||||
*/
|
||||
void GuiButton::ScrollIsOn(int f)
|
||||
{
|
||||
LOCK(this);
|
||||
|
@ -233,7 +233,7 @@ void GuiImage::Draw()
|
||||
if(tile > 0)
|
||||
{
|
||||
for(int i=0; i<tile; i++)
|
||||
Menu_DrawImg(currLeft+width*i, this->GetTop(), width, height, image, imageangle, widescreen ? currScale*0.8 : currScale, currScale, this->GetAlpha());
|
||||
Menu_DrawImg(currLeft+width*i, this->GetTop(), width, height, image, imageangle, widescreen ? currScale*0.75 : currScale, currScale, this->GetAlpha());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -241,7 +241,7 @@ void GuiImage::Draw()
|
||||
if(scale != 1)
|
||||
currLeft = currLeft - width/2 + (width*scale)/2;
|
||||
|
||||
Menu_DrawImg(currLeft, this->GetTop(), width, height, image, imageangle, widescreen ? currScale*0.8 : currScale, currScale, this->GetAlpha());
|
||||
Menu_DrawImg(currLeft, this->GetTop(), width, height, image, imageangle, widescreen ? currScale*0.75 : currScale, currScale, this->GetAlpha());
|
||||
}
|
||||
|
||||
if(stripe > 0)
|
||||
|
@ -30,6 +30,7 @@ GuiText::GuiText(const char * t, int s, GXColor c)
|
||||
style = FTGX_JUSTIFY_CENTER | FTGX_ALIGN_MIDDLE;
|
||||
maxWidth = 0;
|
||||
font = NULL;
|
||||
widescreen = 0; //added
|
||||
|
||||
alignmentHor = ALIGN_CENTRE;
|
||||
alignmentVert = ALIGN_MIDDLE;
|
||||
@ -50,6 +51,7 @@ GuiText::GuiText(const char * t)
|
||||
style = presetStyle;
|
||||
maxWidth = presetMaxWidth;
|
||||
font = NULL;
|
||||
widescreen = 0; //added
|
||||
|
||||
alignmentHor = presetAlignmentHor;
|
||||
alignmentVert = presetAlignmentVert;
|
||||
@ -166,7 +168,7 @@ int GuiText::GetTextWidth()
|
||||
if(newSize != currentSize)
|
||||
{
|
||||
//fontSystem->changeSize(newSize);
|
||||
(font ? font : fontSystem)->changeSize(newSize);
|
||||
(font ? font : fontSystem)->changeSize(newSize, widescreen ? (newSize*3)>>2 : 0);
|
||||
currentSize = newSize;
|
||||
}
|
||||
return (font ? font : fontSystem)->getWidth(text);
|
||||
@ -192,7 +194,7 @@ void GuiText::Draw()
|
||||
if(newSize != currentSize)
|
||||
{
|
||||
//fontSystem->changeSize(newSize);
|
||||
(font ? font : fontSystem)->changeSize(newSize);
|
||||
(font ? font : fontSystem)->changeSize(newSize, widescreen ? (newSize*3)>>2 : 0);
|
||||
currentSize = newSize;
|
||||
}
|
||||
|
||||
|
@ -10,18 +10,23 @@
|
||||
|
||||
#include "gui.h"
|
||||
|
||||
GuiImageData GuiTooltip::tooltipStd(tooltip_png);
|
||||
GuiImageData GuiTooltip::tooltipMedium(tooltip_medium_png);
|
||||
GuiImageData GuiTooltip::tooltipLarge(tooltip_large_png);
|
||||
static GuiImageData tooltipLeft(tooltip_left_png);
|
||||
static GuiImageData tooltipTile(tooltip_tile_png);
|
||||
static GuiImageData tooltipRight(tooltip_right_png);
|
||||
|
||||
|
||||
/**
|
||||
* Constructor for the GuiTooltip class.
|
||||
*/
|
||||
GuiTooltip::GuiTooltip(const char *t)
|
||||
:
|
||||
leftImage(&tooltipLeft), tileImage(&tooltipTile), rightImage(&tooltipRight)
|
||||
{
|
||||
text = NULL;
|
||||
image.SetParent(this);
|
||||
height = leftImage.GetHeight();
|
||||
leftImage.SetParent(this);
|
||||
tileImage.SetParent(this);
|
||||
rightImage.SetParent(this);
|
||||
SetText(t);
|
||||
}
|
||||
|
||||
@ -33,6 +38,16 @@ GuiTooltip::~GuiTooltip()
|
||||
if(text) delete text;
|
||||
}
|
||||
|
||||
float GuiTooltip::GetScale()
|
||||
{
|
||||
float s = scale * scaleDyn;
|
||||
|
||||
// if(parentElement)
|
||||
// s *= parentElement->GetScale();
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
/* !Sets the text of the GuiTooltip element
|
||||
* !\param t Text
|
||||
*/
|
||||
@ -44,24 +59,20 @@ void GuiTooltip::SetText(const char * t)
|
||||
delete text;
|
||||
text = NULL;
|
||||
}
|
||||
int t_width = 24;
|
||||
int tile_cnt = 0;
|
||||
if(t && (text = new GuiText(t, 22, (GXColor){0, 0, 0, 255})))
|
||||
{
|
||||
text->SetParent(this);
|
||||
t_width += text->GetTextWidth();
|
||||
tile_cnt = (text->GetTextWidth()-12) /tileImage.GetWidth();
|
||||
if(tile_cnt < 0) tile_cnt = 0;
|
||||
}
|
||||
|
||||
if(t_width > tooltipMedium.GetWidth())
|
||||
image.SetImage(&tooltipLarge);
|
||||
else if(t_width > tooltipStd.GetWidth())
|
||||
image.SetImage(&tooltipMedium);
|
||||
else
|
||||
image.SetImage(&tooltipStd);
|
||||
image.SetPosition(0, 0);
|
||||
width = image.GetWidth();
|
||||
height = image.GetHeight();
|
||||
tileImage.SetPosition(leftImage.GetWidth(), 0);
|
||||
tileImage.SetTile(tile_cnt);
|
||||
rightImage.SetPosition(leftImage.GetWidth() + tile_cnt * tileImage.GetWidth(), 0);
|
||||
width = leftImage.GetWidth() + tile_cnt * tileImage.GetWidth() + rightImage.GetWidth();
|
||||
}
|
||||
|
||||
void GuiTooltip::SetWidescreen(short){}
|
||||
/*
|
||||
* Draw the Tooltip on screen
|
||||
*/
|
||||
@ -70,7 +81,9 @@ void GuiTooltip::Draw()
|
||||
LOCK(this);
|
||||
if(!this->IsVisible()) return;
|
||||
|
||||
image.Draw();
|
||||
leftImage.Draw();
|
||||
tileImage.Draw();
|
||||
rightImage.Draw();
|
||||
if(text) text->Draw();
|
||||
|
||||
this->UpdateEffects();
|
||||
|
119
source/menu.cpp
119
source/menu.cpp
@ -1530,7 +1530,7 @@ ShowProgress (s32 done, s32 total)
|
||||
|
||||
// timeTxt.SetFont(fontClock);
|
||||
if ((Settings.wsprompt == yes) && (CFG.widescreen)){
|
||||
progressbarImg.SetTile(80*done/total);}
|
||||
progressbarImg.SetTile(75*done/total);}
|
||||
else {progressbarImg.SetTile(100*done/total);}
|
||||
|
||||
}
|
||||
@ -1774,7 +1774,7 @@ ProgressDownloadWindow(int choice2)
|
||||
|
||||
if ((Settings.wsprompt == yes) && (CFG.widescreen)){/////////////adjust for widescreen
|
||||
progressbarImg.SetPosition(80,40);
|
||||
progressbarImg.SetTile(80*i/cntMissFiles);
|
||||
progressbarImg.SetTile(75*i/cntMissFiles);
|
||||
}
|
||||
else{
|
||||
progressbarImg.SetTile(100*i/cntMissFiles);}
|
||||
@ -2355,7 +2355,8 @@ static int MenuDiscList()
|
||||
struct tm * timeinfo;
|
||||
char theTime[80];
|
||||
int counter = 0;
|
||||
|
||||
time_t lastrawtime=0;
|
||||
|
||||
WBFS_DiskSpace(&used, &freespace);
|
||||
|
||||
if (!gameCnt) { //if there is no list of games to display
|
||||
@ -2407,17 +2408,9 @@ static int MenuDiscList()
|
||||
gamecntTxt.SetAlignment(THEME.gameCntAlign, ALIGN_TOP);
|
||||
gamecntTxt.SetPosition(THEME.gameCnt_x,THEME.gameCnt_y);
|
||||
|
||||
GuiImageData tooltipLarge(tooltip_large_png);
|
||||
GuiImage tooltipLargeImg(&tooltipLarge);
|
||||
if (Settings.wsprompt == yes){
|
||||
tooltipLargeImg.SetWidescreen(CFG.widescreen);}///////////
|
||||
|
||||
GuiText ttinstallTxt("Install a game", 22, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR INSTALL BUTTON
|
||||
GuiImageData ttinstall(tooltip_medium_png);
|
||||
GuiImage ttinstallImg(&ttinstall);
|
||||
if (Settings.wsprompt == yes){
|
||||
ttinstallImg.SetWidescreen(CFG.widescreen);}///////////
|
||||
|
||||
GuiTooltip installBtnTT("Install a game");
|
||||
if (Settings.wsprompt == yes)
|
||||
installBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
GuiImage installBtnImg(&btnInstall);
|
||||
GuiImage installBtnImgOver(&btnInstallOver);
|
||||
installBtnImg.SetWidescreen(CFG.widescreen); //added
|
||||
@ -2432,13 +2425,11 @@ static int MenuDiscList()
|
||||
installBtn.SetTrigger(&trigA);
|
||||
installBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
installBtn.SetToolTip(&ttinstallImg,&ttinstallTxt,175,-30);
|
||||
installBtn.SetToolTip(&installBtnTT,24,-30, ALIGN_LEFT);
|
||||
|
||||
GuiText ttsettingsTxt("Settings", 22, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR SETTINGS BUTTON
|
||||
GuiImageData ttsettings(tooltip_png);
|
||||
GuiImage ttsettingsImg(&ttsettings);
|
||||
ttsettingsImg.SetWidescreen(CFG.widescreen);
|
||||
GuiTooltip tt_settings("Settings");
|
||||
GuiTooltip settingsBtnTT("Settings");
|
||||
if (Settings.wsprompt == yes)
|
||||
settingsBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
GuiImage settingsBtnImg(&btnSettings);
|
||||
settingsBtnImg.SetWidescreen(CFG.widescreen); //added
|
||||
@ -2453,15 +2444,12 @@ static int MenuDiscList()
|
||||
settingsBtn.SetSoundClick(&btnClick);
|
||||
settingsBtn.SetTrigger(&trigA);
|
||||
settingsBtn.SetEffectGrow();
|
||||
// if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
// settingsBtn.SetToolTip(&ttsettingsImg,&ttsettingsTxt,65,-30);
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
settingsBtn.SetToolTip(&tt_settings,65,-30);
|
||||
settingsBtn.SetToolTip(&settingsBtnTT,65,-30);
|
||||
|
||||
GuiText tthomeTxt("Back to HBC or Wii Menu", 22, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR HOME BUTTON
|
||||
GuiImageData tthome(tooltip_large_png);
|
||||
GuiImage tthomeImg(&tthome);
|
||||
tthomeImg.SetWidescreen(CFG.widescreen);
|
||||
GuiTooltip homeBtnTT("Back to HBC or Wii Menu");
|
||||
if (Settings.wsprompt == yes)
|
||||
homeBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
GuiImage homeBtnImg(&btnhome);
|
||||
homeBtnImg.SetWidescreen(CFG.widescreen); //added
|
||||
@ -2478,12 +2466,11 @@ static int MenuDiscList()
|
||||
homeBtn.SetTrigger(&trigHome);
|
||||
homeBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
homeBtn.SetToolTip(&tthomeImg,&tthomeTxt,15,-30);
|
||||
homeBtn.SetToolTip(&homeBtnTT,15,-30);
|
||||
|
||||
GuiText ttpoweroffTxt("Power off the Wii", 22, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR POWER BUTTON
|
||||
GuiImageData ttpoweroff(tooltip_medium_png);
|
||||
GuiImage ttpoweroffImg(&ttpoweroff);
|
||||
ttpoweroffImg.SetWidescreen(CFG.widescreen);
|
||||
GuiTooltip poweroffBtnTT("Power off the Wii");
|
||||
if (Settings.wsprompt == yes)
|
||||
poweroffBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
|
||||
GuiImage poweroffBtnImg(&btnpwroff);
|
||||
@ -2500,13 +2487,12 @@ static int MenuDiscList()
|
||||
poweroffBtn.SetTrigger(&trigA);
|
||||
poweroffBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
poweroffBtn.SetToolTip(&ttpoweroffImg,&ttpoweroffTxt,-10,-30);
|
||||
poweroffBtn.SetToolTip(&poweroffBtnTT,-10,-30);
|
||||
|
||||
|
||||
GuiText ttsdcardTxt("Reload SD", 22, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR SETTINGS BUTTON
|
||||
GuiImageData ttsdcard(tooltip_png);
|
||||
GuiImage ttsdcardImg(&ttsdcard);
|
||||
ttsdcardImg.SetWidescreen(CFG.widescreen);
|
||||
GuiTooltip sdcardBtnTT("Reload SD");
|
||||
if (Settings.wsprompt == yes)
|
||||
sdcardBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
GuiImage sdcardImg(&btnsdcard);
|
||||
sdcardImg.SetWidescreen(CFG.widescreen);
|
||||
@ -2519,26 +2505,26 @@ static int MenuDiscList()
|
||||
sdcardBtn.SetTrigger(&trigA);
|
||||
sdcardBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
sdcardBtn.SetToolTip(&ttsdcardImg,&ttsdcardTxt,95,-40);
|
||||
sdcardBtn.SetToolTip(&sdcardBtnTT,95,-40);
|
||||
|
||||
//Downloading Covers
|
||||
GuiText ttDownloadTxt("Click to Download Covers", 20, (GXColor){0, 0, 0, 255}); //TOOLTIP DATA FOR DOWNLOAD
|
||||
GuiImageData ttDownload(tooltip_large_png);
|
||||
GuiImage ttDownloadImg(&ttDownload);
|
||||
ttDownloadImg.SetWidescreen(CFG.widescreen);
|
||||
GuiTooltip DownloadBtnTT("Click to Download Covers");
|
||||
if (Settings.wsprompt == yes)
|
||||
DownloadBtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
GuiButton DownloadBtn(160,224);
|
||||
DownloadBtn.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
|
||||
DownloadBtn.SetPosition(THEME.cover_x,THEME.cover_y);//(20, 300);
|
||||
DownloadBtn.SetSoundOver(&btnSoundOver);
|
||||
|
||||
if (CFG.godmode == 1){//only make the button have trigger & tooltip if in godmode
|
||||
DownloadBtn.SetTrigger(&trigA);
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0){
|
||||
DownloadBtn.SetToolTip(&ttDownloadImg,&ttDownloadTxt,205,-30);
|
||||
if (CFG.godmode == 1)
|
||||
{//only make the button have trigger & tooltip if in godmode
|
||||
DownloadBtn.SetSoundOver(&btnSoundOver);
|
||||
DownloadBtn.SetTrigger(&trigA);
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
DownloadBtn.SetToolTip(&DownloadBtnTT,205,-30);
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
DownloadBtn.SetRumble(false);
|
||||
#ifdef HW_RVL
|
||||
int i = 0, level;
|
||||
char txt[3];
|
||||
@ -2585,12 +2571,12 @@ static int MenuDiscList()
|
||||
gameBrowser.SetAlignment(ALIGN_LEFT, ALIGN_CENTRE);
|
||||
|
||||
GuiText clockTimeBack("88:88", 40, (GXColor){138, 138, 138, 40});
|
||||
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_BOTTOM);
|
||||
clockTimeBack.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||
clockTimeBack.SetPosition(THEME.clock_x, THEME.clock_y);
|
||||
clockTimeBack.SetFont(fontClock);
|
||||
|
||||
GuiText clockTime(theTime, 40, (GXColor){138, 138, 138, 240});
|
||||
clockTime.SetAlignment(THEME.clockAlign, ALIGN_BOTTOM);
|
||||
clockTime.SetAlignment(THEME.clockAlign, ALIGN_TOP);
|
||||
clockTime.SetPosition(THEME.clock_x, THEME.clock_y);
|
||||
clockTime.SetFont(fontClock);
|
||||
|
||||
@ -2642,10 +2628,14 @@ static int MenuDiscList()
|
||||
VIDEO_WaitVSync ();
|
||||
|
||||
//CLOCK
|
||||
if ((Settings.hddinfo == Clock)&&(counter % 2000 == 0)) {//only update the clock every 2000 loops
|
||||
time_t rawtime = time(0); //this fixes code dump caused by the clock
|
||||
timeinfo = localtime (&rawtime);
|
||||
strftime(theTime, sizeof(theTime), "%H:%M", timeinfo);
|
||||
time_t rawtime = time(0); //this fixes code dump caused by the clock
|
||||
if (Settings.hddinfo == Clock && rawtime != lastrawtime) {//only update the clock every 2000 loops
|
||||
lastrawtime = rawtime;
|
||||
timeinfo = localtime (&rawtime);
|
||||
if(rawtime & 1)
|
||||
strftime(theTime, sizeof(theTime), "%H:%M", timeinfo);
|
||||
else
|
||||
strftime(theTime, sizeof(theTime), "%H %M", timeinfo);
|
||||
clockTime.SetText(theTime);
|
||||
}
|
||||
counter++;
|
||||
@ -3469,12 +3459,12 @@ static int MenuSettings()
|
||||
page1Btn.SetSoundClick(&btnClick);
|
||||
page1Btn.SetTrigger(&trigA);
|
||||
|
||||
GuiImageData ttpage(tooltip_png);
|
||||
GuiText ttpage1Txt("Go to Page 1", 20, (GXColor){0, 0, 0, 255});
|
||||
GuiImage ttpage1Img(&ttpage);
|
||||
GuiTooltip page1BtnTT("Go to Page 1");
|
||||
if (Settings.wsprompt == yes)
|
||||
page1BtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page1Btn.SetToolTip(&ttpage1Img,&ttpage1Txt,105, 15);
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page1Btn.SetToolTip(&page1BtnTT,105, 15);
|
||||
|
||||
|
||||
GuiImage page2Img(&page2);
|
||||
@ -3487,11 +3477,12 @@ static int MenuSettings()
|
||||
page2Btn.SetSoundClick(&btnClick);
|
||||
page2Btn.SetTrigger(&trigA);
|
||||
|
||||
GuiText ttpage2Txt("Go to Page 2", 20, (GXColor){0, 0, 0, 255});
|
||||
GuiImage ttpage2Img(&ttpage);
|
||||
GuiTooltip page2BtnTT("Go to Page 2");
|
||||
if (Settings.wsprompt == yes)
|
||||
page2BtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page2Btn.SetToolTip(&ttpage2Img,&ttpage2Txt,105,0);
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page2Btn.SetToolTip(&page2BtnTT,105,0);
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user