mirror of
https://github.com/dborth/fceugx.git
synced 2024-11-01 06:55:05 +01:00
libwiigui documentation updates
This commit is contained in:
parent
a29c51ea2a
commit
56088e6e60
@ -139,7 +139,7 @@ class GuiSound
|
|||||||
//!\param s Pointer to the sound data
|
//!\param s Pointer to the sound data
|
||||||
//!\param l Length of sound data
|
//!\param l Length of sound data
|
||||||
//!\param t Sound format type (SOUND_PCM or SOUND_OGG)
|
//!\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
|
//!Destructor
|
||||||
~GuiSound();
|
~GuiSound();
|
||||||
//!Start sound playback
|
//!Start sound playback
|
||||||
@ -306,8 +306,8 @@ class GuiElement
|
|||||||
//!\param c Clickable
|
//!\param c Clickable
|
||||||
void SetClickable(bool c);
|
void SetClickable(bool c);
|
||||||
//!Sets whether or not the element is holdable
|
//!Sets whether or not the element is holdable
|
||||||
//!\param c Holdable
|
//!\param h Holdable
|
||||||
void SetHoldable(bool d);
|
void SetHoldable(bool h);
|
||||||
//!Gets the element's current state
|
//!Gets the element's current state
|
||||||
//!\return state
|
//!\return state
|
||||||
int GetState();
|
int GetState();
|
||||||
@ -606,7 +606,7 @@ class GuiText : public GuiElement
|
|||||||
//!\param c Font color
|
//!\param c Font color
|
||||||
GuiText(const char * t, int s, GXColor c);
|
GuiText(const char * t, int s, GXColor c);
|
||||||
//!\overload
|
//!\overload
|
||||||
//!\Assumes SetPresets() has been called to setup preferred text attributes
|
//!Assumes SetPresets() has been called to setup preferred text attributes
|
||||||
//!\param t Text
|
//!\param t Text
|
||||||
GuiText(const char * t);
|
GuiText(const char * t);
|
||||||
//!Destructor
|
//!Destructor
|
||||||
@ -628,7 +628,7 @@ class GuiText : public GuiElement
|
|||||||
void SetFontSize(int s);
|
void SetFontSize(int s);
|
||||||
//!Sets the maximum width of the drawn texture image
|
//!Sets the maximum width of the drawn texture image
|
||||||
//!\param w Maximum width
|
//!\param w Maximum width
|
||||||
void SetMaxWidth(int width);
|
void SetMaxWidth(int w);
|
||||||
//!Enables/disables text scrolling
|
//!Enables/disables text scrolling
|
||||||
//!\param s Scrolling on/off
|
//!\param s Scrolling on/off
|
||||||
void SetScroll(int s);
|
void SetScroll(int s);
|
||||||
|
@ -70,11 +70,6 @@ GuiElement * GuiElement::GetParent()
|
|||||||
return parentElement;
|
return parentElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the left position of the GuiElement.
|
|
||||||
* @see SetLeft()
|
|
||||||
* @return Left position in pixel.
|
|
||||||
*/
|
|
||||||
int GuiElement::GetLeft()
|
int GuiElement::GetLeft()
|
||||||
{
|
{
|
||||||
int x = 0;
|
int x = 0;
|
||||||
@ -105,11 +100,6 @@ int GuiElement::GetLeft()
|
|||||||
return x + xoffset;
|
return x + xoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the top position of the GuiElement.
|
|
||||||
* @see SetTop()
|
|
||||||
* @return Top position in pixel.
|
|
||||||
*/
|
|
||||||
int GuiElement::GetTop()
|
int GuiElement::GetTop()
|
||||||
{
|
{
|
||||||
int y = 0;
|
int y = 0;
|
||||||
@ -180,33 +170,16 @@ int GuiElement::GetMaxY()
|
|||||||
return ymax;
|
return ymax;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the width of the GuiElement.
|
|
||||||
* @see SetWidth()
|
|
||||||
* @return Width of the GuiElement.
|
|
||||||
*/
|
|
||||||
int GuiElement::GetWidth()
|
int GuiElement::GetWidth()
|
||||||
{
|
{
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the height of the GuiElement.
|
|
||||||
* @see SetHeight()
|
|
||||||
* @return Height of the GuiElement.
|
|
||||||
*/
|
|
||||||
int GuiElement::GetHeight()
|
int GuiElement::GetHeight()
|
||||||
{
|
{
|
||||||
return height;
|
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)
|
void GuiElement::SetSize(int w, int h)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -214,21 +187,11 @@ void GuiElement::SetSize(int w, int h)
|
|||||||
height = h;
|
height = h;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get visible.
|
|
||||||
* @see SetVisible()
|
|
||||||
* @return true if visible, false otherwise.
|
|
||||||
*/
|
|
||||||
bool GuiElement::IsVisible()
|
bool GuiElement::IsVisible()
|
||||||
{
|
{
|
||||||
return visible;
|
return visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Set visible.
|
|
||||||
* @param[in] Visible Set to true to show GuiElement.
|
|
||||||
* @see IsVisible()
|
|
||||||
*/
|
|
||||||
void GuiElement::SetVisible(bool v)
|
void GuiElement::SetVisible(bool v)
|
||||||
{
|
{
|
||||||
visible = 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)
|
bool GuiElement::IsInside(int x, int y)
|
||||||
{
|
{
|
||||||
if(x > this->GetLeft() && x < (this->GetLeft()+width)
|
if(x > this->GetLeft() && x < (this->GetLeft()+width)
|
||||||
|
@ -13,16 +13,16 @@
|
|||||||
/**
|
/**
|
||||||
* Constructor for the GuiImageData class.
|
* Constructor for the GuiImageData class.
|
||||||
*/
|
*/
|
||||||
GuiImageData::GuiImageData(const u8 * img)
|
GuiImageData::GuiImageData(const u8 * i)
|
||||||
{
|
{
|
||||||
data = NULL;
|
data = NULL;
|
||||||
width = 0;
|
width = 0;
|
||||||
height = 0;
|
height = 0;
|
||||||
|
|
||||||
if(img)
|
if(i)
|
||||||
{
|
{
|
||||||
PNGUPROP imgProp;
|
PNGUPROP imgProp;
|
||||||
IMGCTX ctx = PNGU_SelectImageFromBuffer(img);
|
IMGCTX ctx = PNGU_SelectImageFromBuffer(i);
|
||||||
|
|
||||||
if(!ctx)
|
if(!ctx)
|
||||||
return;
|
return;
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
/**
|
/**
|
||||||
* Constructor for the GuiSound class.
|
* 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;
|
sound = s;
|
||||||
length = len;
|
length = l;
|
||||||
type = t;
|
type = t;
|
||||||
voice = -1;
|
voice = -1;
|
||||||
volume = 100;
|
volume = 100;
|
||||||
|
Loading…
Reference in New Issue
Block a user