challengergui.monkey

Table of contents:

Classes:
Functions:
Globals:
Global CHGUI_AutoTextScroll=0
Description:Auto Textfield Scroll toggle - (0= No scroll - 1= When you click on a textfield it moves the gui up from under the onscreen keyboard)
Global CHGUI_Canvas:CHGUI
Description:Used to control entire gui in one go
Details:
CHGUI_Canvas.Visible = 0

Function CHGUI_Delete(N:CHGUI)
Description:Remove a created CHGUI element
Returns:Int
Global CHGUI_DragScroll = 0
Description:Drag scroll toggle - (0= No scroll - 1= Click and drag on an empty space to scroll entire gui)
Function CHGUI_Draw()
Description:Place in OnRender() method to Draw the gui system
Returns:Int
Global CHGUI_FPS
Description:Returns the FPS
Global CHGUI_Font:BitmapFont
Description:Used to set a custom font (to make fonts you will need to buy Font Machine Editor)
Details:
CHGUI_Font = BitmapFont.Load("mistral.txt",True)

Global CHGUI_Height
Description:Sets / Returns the Width of the gui area (Defaults to devicewidth() if not set)
Global CHGUI_Keyboard = 1
Description:Keyboard option - (0= No Keyboard - 1= Onboard Keyboard - 2= Custom Keyboard)
Global CHGUI_MobileMode = 0
Description:Mobile mode toggle - (This Increases Non custom font sizes and titlebar height etc)
Global CHGUI_MouseBusy
Description:Returns 1 if the mouse is being used by the gui system
Global CHGUI_OffsetX:Float
Description:Sets the overall X position of the entire GUI
Global CHGUI_OffsetY:Float
Description:Sets the overall Y position of the entire GUI
Global CHGUI_Over
Description:Returns 1 if the mouse is over any gui element
Global CHGUI_Shadow = 1
Description:Shadow toggle
Details:
CHGUI_Shadow = 1 'Turns the shadow system on
CHGUI_Shadow = 0 'Turns the shadow system off

Global CHGUI_Style:Image
Description:The image used to 'skin' the gui
Details:
CHGUI_Style = LoadImage("Mystyle.png")

Global CHGUI_TextboxOnFocus
Description:Returns 1 if the gui system is receiving text input
Global CHGUI_TitleFont:BitmapFont
Description:Used to set a custom titlebar font (to make fonts you will need to buy Font Machine Editor)
Details:
CHGUI_TitleFont = BitmapFont.Load("Arial10BW.txt",True)

Global CHGUI_TitleHeight:Float = 25
Description:Sets the height of the titlebars
Global CHGUI_TooltipFont:BitmapFont
Description:Used to set a custom Tooltip font (to make fonts you will need to buy Font Machine Editor)
Details:
CHGUI_TooltipFont = BitmapFont.Load("Arial8.txt",True)

Global CHGUI_TooltipTime = 1500
Description:Return / Set the amount of time in Millisecs before the tooltip Shows
Global CHGUI_Tooltips = 1
Description:Tooltips toggle - (0= No tooltips - 1= Display tooltips)
Function CHGUI_Update()
Description:Place in OnUpdate() method to Update the gui system
Returns:Int
Global CHGUI_Width
Description:Sets / Returns the Width of the gui area (Defaults to devicewidth() if not set)
Function CreateButton:CHGUI(X, Y, W, H, Text:String, Parent:CHGUI = Null)
Description:Used to create a button - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateDropdown:CHGUI(X, Y, W, H, Text:String, Parent:CHGUI = Null)
Description:Used to create a Dropdown box - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateDropdownItem:CHGUI(Text:String, Dropdown:CHGUI, Value = 0)
Description:Used to add a Dropdown Item - Dropdown is a created DropdownBox (:CHGUI) - Optional value transfers a value as well as the text to the parent DropdownBox
Returns:CHGUI
Function CreateHSlider:CHGUI(X, Y, W, H, Minimum, Maximum, Parent:CHGUI = Null)
Description:Used to create a horizontal slider - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateImageButton:CHGUI(X, Y, Img:Image, Parent:CHGUI = Null)
Description:Used to create an Image button - Image must have 4 frames (Normal, Over, Down, Inactive) - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateLabel:CHGUI(X, Y, Text:String, Parent:CHGUI = Null)
Description:Used to create a label - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateListbox:CHGUI(X, Y, W, H, Parent:CHGUI = Null)
Description:Used to create a Listbox - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateListboxItem:CHGUI(Text:String, Parent:CHGUI, Value = 0)
Description:Used to create a ListboxItem - Parent has to be a Listbox
Returns:CHGUI
Function CreateMenu:CHGUI(Text:String, Parent:CHGUI=Null)
Description:Used to create a Top level Menu - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateMenuItem:CHGUI(Text:String, Parent:CHGUI, Tick=0)
Description:Used to add a menu item - Parent has to be a Top level menu or other submenu - Tick (0= No tickbox - 1= Tickbox)
Returns:CHGUI
Function CreateRadio:CHGUI(X, Y, H, Text:String, Group, Parent:CHGUI = Null)
Description:Used to create a radio - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateTab:CHGUI(Title:String, Window:CHGUI=Null)
Description:Used to create a Tab - Optional Parent has to be a window
Returns:CHGUI
Function CreateTextfield:CHGUI(X, Y, W, H, Text:String, Parent:CHGUI = Null)
Description:Used to create a textfield - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateTickbox:CHGUI(X, Y, H, Text:String, Parent:CHGUI = Null)
Description:Used to create a tickbox - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateVSlider:CHGUI(X, Y, W, H, Minimum, Maximum, Parent:CHGUI = Null)
Description:Used to create a vertical slider - Optional Parent can be a window or a tab
Returns:CHGUI
Function CreateWindow:CHGUI(X, Y, W, H, Title:String, Moveable=1, CloseButton=1, MinimiseButton=1, Mode = 1, Parent:CHGUI=Null)
Description:Used to create a window - Mode: (1= Always Behind - 2= Variable - 3= Always on top)
Returns:CHGUI
Function FormatTextfield(Textfield:CHGUI,Text=1, Numbers=1, Symbols=1, Spaces=1)
Description:Limit the input accepted by a Textfield
Returns:Int
Function LockFocus(Window:CHGUI)
Description:Locks focus on a window - and its subwindows/tabs (making all others inactive)
Returns:Int
Function MsgBox(Text:String, Title:String = "")
Description:Display a Messgae box with an optional title & titlebar
Returns:Int
Function UnlockFocus()
Description:Returns the gui to its origional state after LockFocus() is used
Returns:Int
Class CHGUI
Description:Class used for creation of all gui elements
Table of contents:Fields:
Field Active=1
Description:Sets / Returns the active flag of gui element
Field Clicked
Description:Returns 1 when a gui element is clicked
Field Close
Description:Sets / Returns whether a window has a close button
Field CurrentTab:CHGUI
Description:Sets / Returns a windows crrent tab
Field DoubleClicked
Description:Returns 1 when a gui element is Double Clicked
Field Down
Description:Returns 1 when the mouse is Down on gui element
Field DownTime
Description:Returns how long the mouse button has been Down on an element in millisecs
Field Group
Description:Sets / Returns which group from a radio box
Field H:Float
Description:Sets / Returns the Height of gui element
Field Img:Image
Description:Image for the image button (Image needs to have 4 'frames', Normal, Over, Down and Inactive)
Details:
MyButton = CreateImageButton(50,160,LoadImage("Button.png"),MainWindow)

Field Maximum:Float
Description:Sets / Returns a slider maximum value
Field Minimise
Description:Sets / Returns whether a window has a minimise button
Field Minimised
Description:Sets / Returns whether a window is minimised
Field Minimum:Float
Description:Sets / Returns a slider minimum value
Field Mode
Description:Sets / Returns a window order mode (0= Always behind - 1= Variable - 2= Always on top)
Field Moveable
Description:Sets / Returns whether a window is moveable
Field Moving
Description:Returns 1 if a window is moving
Field Over
Description:Returns 1 when the mouse is over gui element
Field OverTime
Description:Returns how long the mouse has been over an element in millisecs
Field Shadow=0
Description:Sets / Returns an individual window shadow - Only visible if CHGUI_Shadow = 1 (0= No Shadow - 1= Shadow)
Field Text:String
Description:Sets / Returns the text of gui element (button text, window title text, etc)
Field Tick
Description:Sets / Returns if a menu has a tickbox
Field Tooltip:String
Description:Used to set an elements Tooltip - "" = No Tooltip
Details:
MyButton.Tooltip = "This is a Tooltip"

Field Value:Float
Description:Sets / Returns the value of gui element (0/1 for tickbox, Value of slider etc)
Field Visible=1
Description:Sets / Returns the visibility of gui element
Field W:Float
Description:Sets / Returns the Width of gui element
Field X:Float
Description:Sets / Returns the X position of gui element
Field Y:Float
Description:Sets / Returns the Y position of gui element

This document was generated using the Jungle IDE document generator version 12.03.29-B