From 56088e6e60a7b9c0dff43cca609d51457c2be9c7 Mon Sep 17 00:00:00 2001 From: dborth Date: Sat, 17 Oct 2009 00:15:32 +0000 Subject: [PATCH] libwiigui documentation updates --- source/ngc/gui/gui.h | 10 ++++---- source/ngc/gui/gui_element.cpp | 42 -------------------------------- source/ngc/gui/gui_imagedata.cpp | 6 ++--- source/ngc/gui/gui_sound.cpp | 6 ++--- 4 files changed, 11 insertions(+), 53 deletions(-) diff --git a/source/ngc/gui/gui.h b/source/ngc/gui/gui.h index ce85689..60a1d51 100644 --- a/source/ngc/gui/gui.h +++ b/source/ngc/gui/gui.h @@ -139,7 +139,7 @@ class GuiSound //!\param s Pointer to the sound data //!\param l Length of sound data //!\param t Sound format type (SOUND_PCM or SOUND_OGG) - GuiSound(const u8 * s, int l, int t); + GuiSound(const u8 * s, s32 l, int t); //!Destructor ~GuiSound(); //!Start sound playback @@ -306,8 +306,8 @@ class GuiElement //!\param c Clickable void SetClickable(bool c); //!Sets whether or not the element is holdable - //!\param c Holdable - void SetHoldable(bool d); + //!\param h Holdable + void SetHoldable(bool h); //!Gets the element's current state //!\return state int GetState(); @@ -606,7 +606,7 @@ class GuiText : public GuiElement //!\param c Font color GuiText(const char * t, int s, GXColor c); //!\overload - //!\Assumes SetPresets() has been called to setup preferred text attributes + //!Assumes SetPresets() has been called to setup preferred text attributes //!\param t Text GuiText(const char * t); //!Destructor @@ -628,7 +628,7 @@ class GuiText : public GuiElement void SetFontSize(int s); //!Sets the maximum width of the drawn texture image //!\param w Maximum width - void SetMaxWidth(int width); + void SetMaxWidth(int w); //!Enables/disables text scrolling //!\param s Scrolling on/off void SetScroll(int s); diff --git a/source/ngc/gui/gui_element.cpp b/source/ngc/gui/gui_element.cpp index 6641997..5bb2c88 100644 --- a/source/ngc/gui/gui_element.cpp +++ b/source/ngc/gui/gui_element.cpp @@ -70,11 +70,6 @@ GuiElement * GuiElement::GetParent() return parentElement; } -/** - * Get the left position of the GuiElement. - * @see SetLeft() - * @return Left position in pixel. - */ int GuiElement::GetLeft() { int x = 0; @@ -105,11 +100,6 @@ int GuiElement::GetLeft() return x + xoffset; } -/** - * Get the top position of the GuiElement. - * @see SetTop() - * @return Top position in pixel. - */ int GuiElement::GetTop() { int y = 0; @@ -180,33 +170,16 @@ int GuiElement::GetMaxY() return ymax; } -/** - * Get the width of the GuiElement. - * @see SetWidth() - * @return Width of the GuiElement. - */ int GuiElement::GetWidth() { return width; } -/** - * Get the height of the GuiElement. - * @see SetHeight() - * @return Height of the GuiElement. - */ int GuiElement::GetHeight() { return height; } -/** - * Set the width and height of the GuiElement. - * @param[in] Width Width in pixel. - * @param[in] Height Height in pixel. - * @see SetWidth() - * @see SetHeight() - */ void GuiElement::SetSize(int w, int h) { @@ -214,21 +187,11 @@ void GuiElement::SetSize(int w, int h) height = h; } -/** - * Get visible. - * @see SetVisible() - * @return true if visible, false otherwise. - */ bool GuiElement::IsVisible() { return visible; } -/** - * Set visible. - * @param[in] Visible Set to true to show GuiElement. - * @see IsVisible() - */ void GuiElement::SetVisible(bool v) { visible = v; @@ -557,11 +520,6 @@ void GuiElement::Draw() { } -/** - * Check if a position is inside the GuiElement. - * @param[in] x X position in pixel. - * @param[in] y Y position in pixel. - */ bool GuiElement::IsInside(int x, int y) { if(x > this->GetLeft() && x < (this->GetLeft()+width) diff --git a/source/ngc/gui/gui_imagedata.cpp b/source/ngc/gui/gui_imagedata.cpp index 6781be8..fb6ef21 100644 --- a/source/ngc/gui/gui_imagedata.cpp +++ b/source/ngc/gui/gui_imagedata.cpp @@ -13,16 +13,16 @@ /** * Constructor for the GuiImageData class. */ -GuiImageData::GuiImageData(const u8 * img) +GuiImageData::GuiImageData(const u8 * i) { data = NULL; width = 0; height = 0; - if(img) + if(i) { PNGUPROP imgProp; - IMGCTX ctx = PNGU_SelectImageFromBuffer(img); + IMGCTX ctx = PNGU_SelectImageFromBuffer(i); if(!ctx) return; diff --git a/source/ngc/gui/gui_sound.cpp b/source/ngc/gui/gui_sound.cpp index f5c32fe..75cb7d5 100644 --- a/source/ngc/gui/gui_sound.cpp +++ b/source/ngc/gui/gui_sound.cpp @@ -13,10 +13,10 @@ /** * Constructor for the GuiSound class. */ -GuiSound::GuiSound(const u8 * snd, s32 len, int t) +GuiSound::GuiSound(const u8 * s, s32 l, int t) { - sound = snd; - length = len; + sound = s; + length = l; type = t; voice = -1; volume = 100;