API reference - schlangster/skyui-lib GitHub Wiki
Functions
- TextInputMenu_Open
- TextInputMenu_SetData
- TextInputMenu_Release
- ShowTextInput
- ListMenu_Open
- ListMenu_SetData
- ListMenu_Release
- ShowList
- ShowNotification
- ShowNotificationIcon
Events
- OnTextInputOpen
- OnTextInputClose
- OnListmenuOpen
- OnListmenuClose
Functions
####TextInputMenu_Open(Form akClient) Global
####
Registers akClient to receive OnTextInputOpen and OnTextInputClose events.
Parameters:
- akClient - The form that will receive the events.
Since version 1
####TextInputMenu_SetData(String asTitle = "", String asInitialText = "") Global
####
Sets the title and initial text of the text input menu.
Parameters:
- asTitle - The title to be shown at the top of the menu.
- asInitialText - The text that initially occupies the input box.
Since version 1
####TextInputMenu_Release(Form akClient) Global
####
Unregisters akClient from receiving OnTextInputOpen and OnTextInputClose events.
Parameters:
- akClient - The form that will receive the events.
Since version 1
####String ShowTextInput(String asTitle = "", String asInitialText = "")
####
Shows a text input menu with the title and initial text passed to the function. Returns the text in the input box as a string when the menu is closed. If the user cancelled the input or an instance of the text input menu is already open, then the function returns ""
.
Parameters:
- asTitle - The title to be shown at the top of the menu.
- asInitialText - The text that initially occupies the input box.
Since version 1
####ListMenu_Open(Form akClient) Global
####
Registers akClient to receive OnListMenuOpen and OnListMenuClose events.
Parameters:
- akClient - The form that will receive the events.
Since version 1
####ListMenu_SetData(String asTitle = "", String[] asOptions, Int aiStartIndex, Int aiDefaultIndex) Global
####
Sets the title, the list of entries, the starting index, and the default index of the list menu.
Parameters:
- asTitle - The title to be shown at the top of the menu.
- asOptions - The list of entries to be shown.
- aiStartIndex - The index of the entry that is selected when the menu opens.
- aiDefaultIndex - The index of the default entry.
Since version 1
####ListMenu_Release(Form akClient) Global
####
Unregisters akClient from receiving OnListMenuOpen and OnListMenuClose events.
Parameters:
- akClient - The form that will receive the events.
Since version 1
####Int ShowList(String asTitle = "", String[] asOptions, Int aiStartIndex, Int aiDefaultIndex)
####
Shows a list menu with the title, list of entries, start index, and default index passed to the function. Returns the index of the selected entry. If an instance of the list menu is already open, then the function returns -1.
Parameters:
- asTitle - The title to be shown at the top of the menu.
- asOptions - The list of entries to be shown.
- aiStartIndex - The index of the entry that is selected when the menu opens.
- aiDefaultIndex - The index of the default entry.
Since version 1
####ShowNotification(String asMessage, String asColor = "#FFFFFF")
####
Shows the message passed to the function in the chosen color.
Parameters:
- asMessage - The message to be shown.
- asColor - The color in hexadecimal.
Since version 1
####ShowNotificationIcon(String asMessage, String asIconPath, Int aiIconFrame = 0, String asColor = "#FFFFFF")
####
Shows the message passed to the function in the chosen color. The icon passed to the function is also shown. If the icon path points at a .swf file, then aiIconFrame can be used to set which frame of that file to display.
Parameters:
- asMessage - The message to be shown.
- asIconPath - The path is relative to /Data/Interface/Exported/. Supported file formats include .dds and .swf. The recommended icon size is 24px by 24px.
- aiIconFrame - The frame in a .swf file to display.
- asColor - The color in hexadecimal.
Since version 1
Events
####OnTextInputOpen(String asEventName, String asStringArg, Float afNumArg, Form akSender)
####
The event sent when the text input menu is opened.
Parameters:
- asEventName - The event name sent. Specific for each version of the library.
- asStringArg - None.
- afNumArg - None.
- akSender - None.
Since version 1
####OnTextInputClose(String asEventName, String asInput, Float afCancelled, Form akSender)
####
The event sent when the text input menu is closed.
Parameters:
- asEventName - The event name sent. Specific for each version of the library.
- asInput - The text that was in the input box when the text input menu was closed.
- afCancelled - 1.0, if the user cancelled the text input. 0.0, if the user confirmed the text input.
- akSender - None.
Since version 1
####OnListMenuOpen(String asEventName, String asStringArg, Float afNumArg, Form akSender)
####
The event sent when the list menu is opened.
Parameters:
- asEventName - The event name sent. Specific for each version of the library.
- asStringArg - None.
- afNumArg - None.
- akSender - None.
Since version 1
####OnListMenuClose(String asEventName, String asStringArg, Float afInput, Form akSender)
####
The event sent when the list menu is closed.
Parameters:
- asEventName - The event name sent. Specific for each version of the library.
- asStringArg - None.
- afInput - The index of the chosen entry.
- akSender - None.
Since version 1