Label
From IfsoGUIWiki
Contents |
Label
Type: ifsoGUI_Label
Module: ifsogui.label
Extends: ifsoGUI_Base
Imports: None
General
A label gadget is used to display some text. They can not have the focus and they do not respond to mouse events of any kind.
Events
Label gadgets do not emit any events.
Functions
Functions used by the programmer to use the gadgets.
- Create:ifsoGUI_Label(iX:Int, iY:Int, iW:Int, iH:Int, strName:String, strText:String = "") - Creates and returns an instance of the gadget.
Methods/Properties
These are the methods and properties used by the programmer to use the gadgets.
- BringToFront() - Brings the gadget to the front of its parents child list.
- CanActive:Int() - Returns whether or not this gadget can be the active gadget.
- GetAbsoluteXY(iX:Int Var, iY:Int Var, caller:ifsoGUI_Base = Null) - Retrieves the gadgets Absolute x and y position.
- GetAutoSize:Int() - Returns whether or not to the gadget will autosize or be manually controlled by the user.
- GetFont:TImageFont() - Returns the font the gadget is using.
- GetGadgetAlpha:Float() - Returns the gadgets alpha value.
- GetH:Int() - Returns the gadgets height.
- GetJustify:Int() - Returns the text justification.
- GetLabel:String() - Returns the labels text.
- GetProperty:Object(key:String) - Returns a custom property.
- GetShowBorder:Int() - Returns whether or not the border is showing.
- GetTip:String() - Returns the gadgets tip text.
- GetTransparent:Int() - Returns whether the gadget is transparent.
- GetVisible:Int() - Returns whether the gadget is visible.
- GetW:Int() - Returns the gadgets width.
- GetWH(width:Int Var, height:Int Var) - Retrieves the gadgets width and height.
- GetXY(iX:Int Var, iY:Int Var) - Retrieves the gadgets x and y positions.
- SendToBack() - Sends the gadget to the back of its parent child list.
- SetAutoSize(intAutoSize:Int) - Sets whether or not to the gadget will autosize or be manually controlled by the user.
- SetBounds(iX:Int, iY:Int, iW:Int, iH:Int) - Sets the x, y, width, and height all in one call.
- SetFont(Font:TImageFont) - Sets the font of the gadget.
- SetGadgetAlpha(fltAlpha:Float) - Sets the gadgets alpha value.
- SetGadgetColor(iRed:Int, iGreen:Int, iBlue:Int) - Sets the gadget color of the gadget.
- SetJustify(iJustify:Int) - Sets the text justification.
- SetLabel(strLabel:String) - Sets the labels text.
- SetProperty(key:String, value:Object) - Set a custom property.
- SetShowBorder(bShowBorder:Int) - Sets whether or not the border will show.
- SetTextColor(iRed:Int, iGreen:Int, iBlue:Int) - Sets the text color of the gadget.
- SetTransparent(bTransparent:Int) - Sets whether the gadget is transparent.
- SetVisible(bVisible:Int) - Sets whether the gadget is visible.
- SetWH(width:Int, height:Int) - Sets the gadgets width and height.
- SetXY(iX:Int, iY:Int) - Sets the gadgets x and y position.
Internal Functions
These function are internal to the gadget. They should only need to be called, if you are creating a gadget.
- Drawbox(images:TImage[], ws:Int[], hs:Int[], rX:Int, rY:Int, rW:Int, rH:Int, bDrawBorder:Int = True, bTileSides:Int = False, bTileCenter:Int = False) - Draws the standard ifsoGUI image based on 4 corners, 4 sides, and a center background portion.
- GetDimensions:String(strName:String) - Gets the dimensions from the dimension file for the gadgets graphics.
- Load9Image(srcpath:String, dimensions:String[], gImage:TImage[] Var, imagew:Int[] Var, imageh:Int[] Var) - Loads the graphics for an image in 9 standard parts.
- LoadTheme() - Called when a new theme is loaded, so the gadget can load its images for drawing. The base gadget does not have a LoadTheme function, but any gadget than can be created should have one.
- SystemEvent(id:Int, data:Int) - Called when a system level event occurs that all gadgets should know about, like loading a new theme or changing the default GUI font. The base gadget does not have a SystemEvent function, but any gadget than can be created should have one.
Internal Methods
These methods are called by the GUI itself and should only be used if you are creating your own gadget.
- Draw(parX:Int, parY:Int, parW:Int, parH:Int) - Draws the gadget and its children.
- GadgetSystemEvent(id:Int, data:Int) - Gadget Level GUI system event occured.
- IsMouseOver:Int(parX:Int, parY:Int, parW:Int, parH:Int, iMouseX:Int, iMouseY:Int) - Returns False by a Label.
- Refresh() - Refreshes the gadget.
Skinning
dimensions.txt keyword: label
Filename: label.png
This is a representation of a label, the sides will be stretched or tiled the height of the label, the top and bottom will be stretched or tiled the width of the label, and the center will be stretched or tiled to the length and width of the label. The corners will remain as is and will not be stretched or tiled at all.
