just some small fixes

*added RemoveSoundClick to guibutton prototype
*removed the click sound from Wii/Home button
*applied widescreen fix to arrow buttons in caroselle and grid
This commit is contained in:
mauricewoelk 2009-06-01 12:15:27 +00:00
parent f2822719b1
commit 24d98683b3
5 changed files with 18 additions and 0 deletions

View File

@ -829,6 +829,8 @@ class GuiButton : public GuiElement
void SetSoundClick(GuiSound * s); void SetSoundClick(GuiSound * s);
//!\param reset the soundover to NULL //!\param reset the soundover to NULL
void RemoveSoundOver(); void RemoveSoundOver();
//!\param reset the soundclick to NULL
void RemoveSoundClick();
//!Constantly called to draw the GuiButtons ToolTip //!Constantly called to draw the GuiButtons ToolTip
//!Sets the button's Tooltip on over //!Sets the button's Tooltip on over
//!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align //!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align

View File

@ -260,6 +260,11 @@ void GuiButton::RemoveSoundOver()
LOCK(this); LOCK(this);
soundOver = NULL; soundOver = NULL;
} }
void GuiButton::RemoveSoundClick()
{
LOCK(this);
soundClick = NULL;
}
/** /**
* Draw the button on screen * Draw the button on screen
*/ */

View File

@ -12,6 +12,7 @@
#include <unistd.h> #include <unistd.h>
#include "gui_gamecarousel.h" #include "gui_gamecarousel.h"
#include "../cfg.h" #include "../cfg.h"
#include "../main.h"
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
@ -68,6 +69,8 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
int btnHeight = (int) lround(sqrt(RADIUS*RADIUS - 90000)-RADIUS-50); int btnHeight = (int) lround(sqrt(RADIUS*RADIUS - 90000)-RADIUS-50);
btnLeftImg = new GuiImage(imgLeft); btnLeftImg = new GuiImage(imgLeft);
if (Settings.wsprompt == yes)
btnLeftImg->SetWidescreen(CFG.widescreen);
btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight()); btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight());
btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
btnLeft->SetPosition(20, btnHeight); btnLeft->SetPosition(20, btnHeight);
@ -80,6 +83,8 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co
btnLeft->SetEffectGrow(); btnLeft->SetEffectGrow();
btnRightImg = new GuiImage(imgRight); btnRightImg = new GuiImage(imgRight);
if (Settings.wsprompt == yes)
btnRightImg->SetWidescreen(CFG.widescreen);
btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight()); btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight());
btnRight->SetParent(this); btnRight->SetParent(this);
btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);

View File

@ -12,6 +12,7 @@
#include <unistd.h> #include <unistd.h>
#include "gui_gamegrid.h" #include "gui_gamegrid.h"
#include "../cfg.h" #include "../cfg.h"
#include "../main.h"
#include <string.h> #include <string.h>
#include <sstream> #include <sstream>
@ -58,6 +59,8 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int gameCnt, const ch
imgRight = new GuiImageData(imgPath, startgame_arrow_right_png); imgRight = new GuiImageData(imgPath, startgame_arrow_right_png);
btnLeftImg = new GuiImage(imgLeft); btnLeftImg = new GuiImage(imgLeft);
if (Settings.wsprompt == yes)
btnLeftImg->SetWidescreen(CFG.widescreen);
btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight()); btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight());
btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE);
btnLeft->SetPosition(20, -30); btnLeft->SetPosition(20, -30);
@ -71,6 +74,8 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int gameCnt, const ch
btnLeft->SetEffectGrow(); btnLeft->SetEffectGrow();
btnRightImg = new GuiImage(imgRight); btnRightImg = new GuiImage(imgRight);
if (Settings.wsprompt == yes)
btnRightImg->SetWidescreen(CFG.widescreen);
btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight()); btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight());
btnRight->SetParent(this); btnRight->SetParent(this);
btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE);

View File

@ -3102,6 +3102,7 @@ static int MenuDiscList()
GuiImage homeBtnImgOver(&btnhomeOver); GuiImage homeBtnImgOver(&btnhomeOver);
homeBtnImgOver.SetWidescreen(CFG.widescreen); homeBtnImgOver.SetWidescreen(CFG.widescreen);
GuiButton homeBtn(&homeBtnImg,&homeBtnImgOver, 0, 3, THEME.home_x, THEME.home_y, &trigA, &btnSoundOver, &btnClick,1,&homeBtnTT,15,-30,1,5); GuiButton homeBtn(&homeBtnImg,&homeBtnImgOver, 0, 3, THEME.home_x, THEME.home_y, &trigA, &btnSoundOver, &btnClick,1,&homeBtnTT,15,-30,1,5);
homeBtn.RemoveSoundClick();
homeBtn.SetTrigger(&trigHome); homeBtn.SetTrigger(&trigHome);
GuiTooltip poweroffBtnTT(LANGUAGE.PowerofftheWii); GuiTooltip poweroffBtnTT(LANGUAGE.PowerofftheWii);