From 24d98683b3f20fcaab74f9657a847d6c08fad3c7 Mon Sep 17 00:00:00 2001 From: mauricewoelk Date: Mon, 1 Jun 2009 12:15:27 +0000 Subject: [PATCH] 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 --- source/libwiigui/gui.h | 2 ++ source/libwiigui/gui_button.cpp | 5 +++++ source/libwiigui/gui_gamecarousel.cpp | 5 +++++ source/libwiigui/gui_gamegrid.cpp | 5 +++++ source/menu.cpp | 1 + 5 files changed, 18 insertions(+) diff --git a/source/libwiigui/gui.h b/source/libwiigui/gui.h index 7565756d..b4e4b2c9 100644 --- a/source/libwiigui/gui.h +++ b/source/libwiigui/gui.h @@ -829,6 +829,8 @@ class GuiButton : public GuiElement void SetSoundClick(GuiSound * s); //!\param reset the soundover to NULL void RemoveSoundOver(); + //!\param reset the soundclick to NULL + void RemoveSoundClick(); //!Constantly called to draw the GuiButtons ToolTip //!Sets the button's Tooltip on over //!\param tt Pointer to GuiElement object, x & y Positioning, h & v Align diff --git a/source/libwiigui/gui_button.cpp b/source/libwiigui/gui_button.cpp index c2520de6..2d9c3c6c 100644 --- a/source/libwiigui/gui_button.cpp +++ b/source/libwiigui/gui_button.cpp @@ -260,6 +260,11 @@ void GuiButton::RemoveSoundOver() LOCK(this); soundOver = NULL; } +void GuiButton::RemoveSoundClick() +{ + LOCK(this); + soundClick = NULL; +} /** * Draw the button on screen */ diff --git a/source/libwiigui/gui_gamecarousel.cpp b/source/libwiigui/gui_gamecarousel.cpp index f3d4ba65..a32ce3b6 100644 --- a/source/libwiigui/gui_gamecarousel.cpp +++ b/source/libwiigui/gui_gamecarousel.cpp @@ -12,6 +12,7 @@ #include #include "gui_gamecarousel.h" #include "../cfg.h" +#include "../main.h" #include #include @@ -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); btnLeftImg = new GuiImage(imgLeft); + if (Settings.wsprompt == yes) + btnLeftImg->SetWidescreen(CFG.widescreen); btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight()); btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); btnLeft->SetPosition(20, btnHeight); @@ -80,6 +83,8 @@ GuiGameCarousel::GuiGameCarousel(int w, int h, struct discHdr * l, int count, co btnLeft->SetEffectGrow(); btnRightImg = new GuiImage(imgRight); + if (Settings.wsprompt == yes) + btnRightImg->SetWidescreen(CFG.widescreen); btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight()); btnRight->SetParent(this); btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); diff --git a/source/libwiigui/gui_gamegrid.cpp b/source/libwiigui/gui_gamegrid.cpp index eebadd02..2cadb018 100644 --- a/source/libwiigui/gui_gamegrid.cpp +++ b/source/libwiigui/gui_gamegrid.cpp @@ -12,6 +12,7 @@ #include #include "gui_gamegrid.h" #include "../cfg.h" +#include "../main.h" #include #include @@ -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); btnLeftImg = new GuiImage(imgLeft); + if (Settings.wsprompt == yes) + btnLeftImg->SetWidescreen(CFG.widescreen); btnLeft = new GuiButton(imgLeft->GetWidth(), imgLeft->GetHeight()); btnLeft->SetAlignment(ALIGN_LEFT, ALIGN_MIDDLE); btnLeft->SetPosition(20, -30); @@ -71,6 +74,8 @@ GuiGameGrid::GuiGameGrid(int w, int h, struct discHdr * l, int gameCnt, const ch btnLeft->SetEffectGrow(); btnRightImg = new GuiImage(imgRight); + if (Settings.wsprompt == yes) + btnRightImg->SetWidescreen(CFG.widescreen); btnRight = new GuiButton(imgRight->GetWidth(), imgRight->GetHeight()); btnRight->SetParent(this); btnRight->SetAlignment(ALIGN_RIGHT, ALIGN_MIDDLE); diff --git a/source/menu.cpp b/source/menu.cpp index c9f8ed32..84132078 100644 --- a/source/menu.cpp +++ b/source/menu.cpp @@ -3102,6 +3102,7 @@ static int MenuDiscList() GuiImage homeBtnImgOver(&btnhomeOver); 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); + homeBtn.RemoveSoundClick(); homeBtn.SetTrigger(&trigHome); GuiTooltip poweroffBtnTT(LANGUAGE.PowerofftheWii);