Theme

Built on top of the GUI module the Theme API allows you to create Widget that has the same common look and feel, functionalities and behaviors as the one used to create the IDE. You can use the API to either extend some editors functionalities, create generic tools such as importers or to build utilities for your own project.

Take note that all functions listed below are available to call using the global object Theme. In addition, this module is only available within the editor and cannot be called in the client or in a published project.

Most of the controls created by the Theme consists of multiple type of Widget attached together. Aditionally other properties are available to change some aspect and behavior of the control; to learn more about each Property available on certain themed control you can list them as show in the example below:

Lua
-- Create a new themed button. local btn = Theme:ButtonNew( "Title", Theme:GetIcon("lib"), nil ) -- Get the widget reference local wdg = btn.widget -- Loop and print the name and type of all properties. for i = 0,(wdg.property_count-1) do local var = wdg:GetPropertyAt( i ) print( var.name .. " " .. var.type ) end

See Also

Functions


Name Description
ButtonNew Create a new themed button.
CheckBoxNew Create a new themed checkbox.
ColorBarNew Creates a color bar that allows you to display and pick color.
CurveBarNew Creates curve bar allowing you to visualize and edit a specific Curve.
DialogNew Create a new blank dialog.
DialogLabelNew Create a new Label that fit the look and feel of a dialog center area.
GridNew Create a table attached to a Panel where widgets can be placed into each cell.
GroupNew Create a another type of table that regroup multiple Widget together.
HeaderNew Create a horizontal header (also used as footer).
LabelNew Create a new Label to display static text.
ListNew Create a list view generally used to create popup, menu, drop down list etc...
ListItemNew Create a new list item bar.
MenuBarNew Create a new menu bar.
MenuItemNew Create a new menu item.
PanelNew Create a new panel to either list item vertically or horizontally.
PictureNew Create a new Picture to place an Icon.
PictureButtonNew Create a simple Button with a Picture at the center.
RadioButtonNew Create a new radio Button.
ScrollerNew Create a new Scroller (aka. slider) control.
SeparatorNew Create a simple separator; a delimitation that can be placed in between two sections etc...
SlotBoxNew Create a new slot box which is a retractable grid that can be use as a Widget container.
SpinnerNew Special type of textbox that is designed to handle numbers.
SplitterNew Create a local delimitation that can be resized by the user dy dragging the middle handle.
StickyNew Create a new sticky; usually used to display help hint for a control.
TextAreaNew Create a text area that can handle long Stream of text.
TextBoxNew Create a themed TextBox.
ToolButtonNew Create a new tool Button; which is a simple Button with an icon that act as a switch (pressed/un-pressed).
TreeBoxNew Create a new treebox (either single or a folder) entry part of a treeview architecture.
TreeViewNew Create a new treebox which provide functionalities to maintain a hierarchy of multiple levels.
ScrollerFormat Helper function clamp and format a value based on a Scroller settings.
SpinnerFormat Helper function clamp and format a value based on a spinner settings.
PanelAddIndicator Add an indicator to an existing Panel allowing you to visualize if some content is out of the Panel bounds.
TreeBoxAlign Function that recursively align all parent of a Grid that is used as treebox.
TreeBoxSetAsSingle Set a specific treebox to be a leaf of the tree.
TreeViewSelection Function that recursively search for a specific sub-string starting from an specific treebox.
UtilsAlignAll Helper that recursively align all parent of a Widget.
GetIcon Retrieve an existing Icon using its name as key.
GetPanelBase Recursively search the parents of a widget until a Panel is found.
GetGridBase Recursively search the parents of a widget until a Grid is found.
GetBase Recursively search the parents until a Widget of the type kBase is found.
GetUserBase Recursively search the parents until a Widget of the type kUser is found.
GetSplitterBase Recursively search the parents of a widget until a Splitter is found.
GetAreaBase Recursively search the parents of a widget until a Widget of the type kArea is found.
GetContent Recursively try to find the content Widget of a dialog.
GetHanger Retrieve the hanger reference of the active Widget.
GetRootHanger Recursively try to find the hanger of the active Widget.
GetDefaultWidgetHeight Helper that returns the default height of a Widget based on the current Font used by the IDE.
GetWidgetSize Function to retrieve the size in pixels for a specific number of units.
AdjustPriority Automatically adjust the priority of a Widget based on its parent(s) or hanger.
ImageLoad Utility function that load an image from disk and store the texels into a Texmap.
GenerateSignedDistanceFields Generate signed distance fields for the active texel data.
DialogClose Manually close an existing dialog.

Icon


A structure that contains the information about a specific icon located in the IDE icon atlas.

Static Variables


Name Description
texcoord Texture coordinate of the icon within the atlas.
texture Reference to the Texture that stores the icon data.
name Name of the Icon.




NRG - API 2022.3.383570 - Thu Jul 28 2022
Copyright © 2022 nrgcore.com. All Rights Reserved. Terms of Service - Privacy Policy - EULA