GUI

From IfsoGUIWiki

Jump to: navigation, search

Contents

GUI

Type: GUI
Module: ifsogui.gui
Extends: Nothing
Imports: Nothing

General

The GUI type is a singleton that is the backbone of the ifsoGUI system. Because it is a singleton, you do not need to instantiate a copy of it. You only need to use its functions and properties.

The base ifsogui.gui module includes the ifsoGUI_Event type, the ifsoGUI_Base type, and the ifsoGUI_VP type.

All gadgets should either be added to the GUI or to a parent that has been added to the GUI.

Functions

  • AddGadget(p:ifsoGUI_Base) - Adds a gadgets to the base GUI system.
  • BringToFront(gadget:ifsoGUI_Base) - Brings the gadget on the base GUI system to the front.
  • ClearEvents() - Clears the event queue.
  • GetActiveGadget:ifsoGUI_Base() - Returns the ActiveGadget.
  • GetCanDrawPartialChars:Int() - Returns whether or not the custom font system can draw partial characters.
  • GetDefaultFont:TImageFont() - Returns the Default Font of the GUI.
  • GetDrawMouse:Int() - Returns whether the GUI system is drawing the mouse or not.
  • GetEvent:ifsoGUI_Event() - Returns the next event from the queue and removes it.
  • GetGadget:ifsoGUI_Base(name:String) - Gets a gadget by name.
  • GetTabActive:Int() - Returns whether the Tab key can move focus to the GUI when no gadgets have the focus.
  • GetTabbing:Int() - Returns whether Tabbing between gadgets is on or off.
  • GetTipAlpha:Float() - Returns the Alpha value used when drawing the tooltip.
  • GetUseCustomFontSystem:Int() - Returns whether or not the user is using a custom font system.
  • GetUseEvents:Int() - Returns whether the event system is in use or not.
  • GetUseIncBin:Int() - Returns whether or not files are loaded with incbin.
  • LoadTheme(path:String) - Loads a theme.
  • Logic() - Updates the logic of all of the gadgets.
  • Refresh() - Refreshes the GUI.
  • RemoveGadget(p:ifsoGUI_Base, bDestroy:Int=True) - Removes a gadget from the base GUI system.
  • Render() - Renders the GUI.
  • SetAllGadgetsColor(iRed:Int, iGreen:Int, iBlue:Int) - Sets the color for all gadgets.
  • SetAllGadgetsTextColor(iRed:Int, iGreen:Int, iBlue:Int) - Sets the text color for all gadgets.
  • SetCanDrawPartialChars(bPartialChars:Int) - Sets whether or not the custom font system can draw partial characters.
  • SetCustomDrawText(funcDrawText(strText:String, x:Float, y:Float, gadget:ifsoGUI_Base)) - Sets the custom DrawText Function.
  • SetCustomTextHeight(funcTextHeight:Int(gadget:ifsoGUI_Base)) - Sets the custom TextHeight Function.
  • SetCustomTextWidth(funcTextWidth:Int(strText:String, gadget:ifsoGUI_Base)) - Sets the custom TextWidth Function.
  • SetDefaultFont(fntFont:TImageFont) - Sets the default font.
  • SetDrawMouse(bValue:Int) - Sets whether or not the GUI system is responsible for drawing the mouse.
  • SetResolution(Width:Int, Height:Int) - Informs the GUI system of the resolution of the graphics window.
  • SetTabActive(bActive:Int = True) - Sets whether or not the Tab key can move focus to the GUI if no gadgets have the focus.
  • SetTabbing(bTabbing:Int = True) - Sets whether or not the Tab key can move focus from gadget to gadget.
  • SetTextColor(R,G,B) - Sets the default text color on Gadgets created after setting this color.
  • SetTipAlpha(fAlpha:Float) - Set the Alpha value used when drawing the tooltip.
  • SetTipBorderColor(R:Int, G:Int, B:Int) - Sets the color used for the border of the tip box.
  • SetTipColor(R:Int, G:Int, B:Int) - Sets the Color used for the tip box.
  • SetTipFont(Font:TImageFont) - Sets the Font used for the Tips.
  • SetTipTextColor(R:Int, G:Int, B:Int) - Sets the color of the tip text.
  • SetUseCustomFontSystem(bCustomFont:Int) - Sets whether or not the user is using a custom font system.
  • SetUseEvents(bEvents:Int) - Sets whether the gadgets are generating events or not.
  • SetUseIncBin(bIncBin:Int) - Sets whether or not we are loading files with incbin.
  • SetZipInfo(strFileName:String, strPassword:String) - Sets whether or not we are loading files from a zip file.

Internal Functions Called By Gadgets

  • AddEvent(e:ifsoGUI_Event) - Adds an event to the GUI event queue.
  • ChangeTabOrder(g:ifsoGUI_Base, NewOrder:Int) - Changes a gadgets TabOrder.
  • Register(SystemEvent(id:Int, data:Int)) - Registers an event handler for GUI wide events.
  • RemoveTabOrder(g:ifsoGUI_Base) - Removes a gadget from the TabOrder list.
  • SetActiveGadget(gadget:ifsoGUI_Base) - Sets the Active gadget. Sends appropriate focus events.
  • SetModal(gadget:ifsoGUI_Base) - Sets a gadget Modal.
  • UnSetModal() - Unsets Modal gadget.

Example

Personal tools