mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-25 20:56:53 +01:00
remove old ToolTip-Code
This commit is contained in:
parent
916dd71f65
commit
339ea60337
@ -746,11 +746,7 @@ class GuiButton : public GuiElement
|
||||
void SetSoundClick(GuiSound * s);
|
||||
//!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);
|
||||
//!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
|
||||
//!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align
|
||||
void SetToolTip(GuiElement* tt, int x, int y, int h=ALIGN_RIGHT, int v=ALIGN_TOP);
|
||||
//!Constantly called to draw the GuiButton
|
||||
void Draw();
|
||||
@ -769,9 +765,7 @@ class GuiButton : public GuiElement
|
||||
GuiImage * iconOver; //!< Button icon for STATE_SELECTED
|
||||
GuiImage * iconHold; //!< Button icon for STATE_HELD
|
||||
GuiImage * iconClick; //!< Button icon for STATE_CLICKED
|
||||
GuiImage * toolTip; //!< Tooltip for STATE_SELECTED
|
||||
GuiText * toolTipTxt;//!< Tooltip Text
|
||||
GuiElement *toolTip2;
|
||||
GuiElement *toolTip;
|
||||
time_t time1, time2;//!< Tooltip timeconstants
|
||||
GuiText * label[3]; //!< Label(s) to display (default)
|
||||
GuiText * labelOver[3]; //!< Label(s) to display for STATE_SELECTED
|
||||
|
@ -29,8 +29,6 @@ GuiButton::GuiButton(int w, int h)
|
||||
iconHold = NULL;
|
||||
iconClick = NULL;
|
||||
toolTip = NULL;
|
||||
toolTip2 = NULL;
|
||||
toolTipTxt = NULL;
|
||||
|
||||
for(int i=0; i < 3; i++)
|
||||
{
|
||||
@ -169,10 +167,10 @@ void GuiButton::SetToolTip(GuiElement* tt, int x, int y, int h_align, int v_alig
|
||||
LOCK(this);
|
||||
if(tt)
|
||||
{
|
||||
toolTip2 = tt;
|
||||
toolTip2->SetParent(this);
|
||||
toolTip2->SetAlignment(h_align, v_align);
|
||||
toolTip2->SetPosition(x,y);
|
||||
toolTip = tt;
|
||||
toolTip->SetParent(this);
|
||||
toolTip->SetAlignment(h_align, v_align);
|
||||
toolTip->SetPosition(x,y);
|
||||
|
||||
}
|
||||
}
|
||||
@ -209,7 +207,7 @@ void GuiButton::Draw()
|
||||
void GuiButton::DrawTooltip()
|
||||
{
|
||||
LOCK(this);
|
||||
if(state == STATE_SELECTED && (toolTip || toolTip2))
|
||||
if(state == STATE_SELECTED && toolTip)
|
||||
{
|
||||
if (time2 == 0)
|
||||
{
|
||||
@ -222,50 +220,21 @@ void GuiButton::DrawTooltip()
|
||||
if(time1 == 0 || difftime(time1, time2) >= 2)
|
||||
{
|
||||
if(time1 != 0) // timer gerade abgelaufen
|
||||
if(toolTip2) toolTip2->SetEffect(EFFECT_FADE, 20);
|
||||
toolTip->SetEffect(EFFECT_FADE, 20);
|
||||
time1 = 0;
|
||||
if(toolTip2) toolTip2->Draw();
|
||||
if(toolTip) toolTip->Draw();
|
||||
if (toolTipTxt)
|
||||
{
|
||||
toolTipTxt->Draw();
|
||||
}
|
||||
toolTip->Draw();
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(time2 != 0 && time1 == 0) // timer abgelaufen, gerade DESELECT
|
||||
if(toolTip2) toolTip2->SetEffect(EFFECT_FADE, -20);
|
||||
if(toolTip) toolTip->SetEffect(EFFECT_FADE, -20);
|
||||
time2 = 0;
|
||||
}
|
||||
if(toolTip2 && toolTip2->GetEffect())
|
||||
toolTip2->Draw();
|
||||
if(toolTip && toolTip->GetEffect())
|
||||
toolTip->Draw();
|
||||
}
|
||||
/*
|
||||
void GuiButton::DrawTooltip()
|
||||
{
|
||||
LOCK(this);
|
||||
if(state == STATE_SELECTED && (toolTip || toolTip2))
|
||||
{
|
||||
if (time2 == 0)
|
||||
time(&time2);
|
||||
|
||||
time(&time1);
|
||||
|
||||
if (difftime(time1, time2) >= 2) {
|
||||
if(toolTip) toolTip->Draw();
|
||||
if(toolTip2) toolTip2->Draw();
|
||||
if (toolTipTxt)
|
||||
{
|
||||
toolTipTxt->Draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
time2 = 0;
|
||||
}
|
||||
*/
|
||||
void GuiButton::ScrollIsOn(int f)
|
||||
{
|
||||
LOCK(this);
|
||||
|
@ -1861,6 +1861,7 @@ UpdateGUI (void *arg)
|
||||
else
|
||||
{
|
||||
mainWindow->Draw();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
mainWindow->DrawTooltip();
|
||||
|
||||
#ifdef HW_RVL
|
||||
@ -2424,7 +2425,6 @@ static int MenuDiscList()
|
||||
installBtn.SetSoundClick(&btnClick);
|
||||
installBtn.SetTrigger(&trigA);
|
||||
installBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
installBtn.SetToolTip(&installBtnTT,24,-30, ALIGN_LEFT);
|
||||
|
||||
GuiTooltip settingsBtnTT("Settings");
|
||||
@ -2444,7 +2444,6 @@ static int MenuDiscList()
|
||||
settingsBtn.SetSoundClick(&btnClick);
|
||||
settingsBtn.SetTrigger(&trigA);
|
||||
settingsBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
settingsBtn.SetToolTip(&settingsBtnTT,65,-30);
|
||||
|
||||
GuiTooltip homeBtnTT("Back to HBC or Wii Menu");
|
||||
@ -2465,7 +2464,6 @@ static int MenuDiscList()
|
||||
homeBtn.SetTrigger(&trigA);
|
||||
homeBtn.SetTrigger(&trigHome);
|
||||
homeBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
homeBtn.SetToolTip(&homeBtnTT,15,-30);
|
||||
|
||||
GuiTooltip poweroffBtnTT("Power off the Wii");
|
||||
@ -2486,7 +2484,6 @@ static int MenuDiscList()
|
||||
poweroffBtn.SetSoundClick(&btnClick);
|
||||
poweroffBtn.SetTrigger(&trigA);
|
||||
poweroffBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
poweroffBtn.SetToolTip(&poweroffBtnTT,-10,-30);
|
||||
|
||||
|
||||
@ -2504,7 +2501,6 @@ static int MenuDiscList()
|
||||
sdcardBtn.SetSoundClick(&btnClick);
|
||||
sdcardBtn.SetTrigger(&trigA);
|
||||
sdcardBtn.SetEffectGrow();
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
sdcardBtn.SetToolTip(&sdcardBtnTT,95,-40);
|
||||
|
||||
//Downloading Covers
|
||||
@ -2520,7 +2516,6 @@ static int MenuDiscList()
|
||||
{//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
|
||||
@ -3463,7 +3458,6 @@ static int MenuSettings()
|
||||
if (Settings.wsprompt == yes)
|
||||
page1BtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page1Btn.SetToolTip(&page1BtnTT,105, 15);
|
||||
|
||||
|
||||
@ -3481,7 +3475,6 @@ static int MenuSettings()
|
||||
if (Settings.wsprompt == yes)
|
||||
page2BtnTT.SetWidescreen(CFG.widescreen);///////////
|
||||
|
||||
if (Settings.tooltips == TooltipsOn && THEME.showToolTip != 0)
|
||||
page2Btn.SetToolTip(&page2BtnTT,105,0);
|
||||
|
||||
////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user