Class GuiComposerHelpers
- Namespace
- Vintagestory.API.Client
- Assembly
- VintagestoryAPI.dll
public static class GuiComposerHelpers
- Inheritance
-
GuiComposerHelpers
- Inherited Members
Methods
AddAutoSizeHoverText(GuiComposer, string, CairoFont, int, ElementBounds, string)
public static GuiComposer AddAutoSizeHoverText(this GuiComposer composer, string text, CairoFont font, int width, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringfontCairoFontwidthintboundsElementBoundskeystring
Returns
AddButton(GuiComposer, string, ActionConsumable, ElementBounds, CairoFont, EnumButtonStyle, string)
Adds a clickable button
public static GuiComposer AddButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, CairoFont buttonFont, EnumButtonStyle style = EnumButtonStyle.Normal, string key = null)
Parameters
composerGuiComposertextstringThe text displayed inside the button
onClickActionConsumableHandler for when the button is clicked
boundsElementBoundsbuttonFontCairoFontThe font to be used for the text inside the button.
styleEnumButtonStylekeystring
Returns
AddButton(GuiComposer, string, ActionConsumable, ElementBounds, CairoFont, EnumButtonStyle, EnumTextOrientation, string)
[Obsolete("Use Method without orientation argument")]
public static GuiComposer AddButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, CairoFont buttonFont, EnumButtonStyle style, EnumTextOrientation orientation, string key = null)
Parameters
composerGuiComposertextstringonClickActionConsumableboundsElementBoundsbuttonFontCairoFontstyleEnumButtonStyleorientationEnumTextOrientationkeystring
Returns
AddButton(GuiComposer, string, ActionConsumable, ElementBounds, EnumButtonStyle, string)
Adds a clickable button button with font CairoFont.ButtonText()
public static GuiComposer AddButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, EnumButtonStyle style = EnumButtonStyle.Normal, string key = null)
Parameters
composerGuiComposertextstringThe text displayed inside the button
onClickActionConsumableHandler for when the button is clicked
boundsElementBoundsstyleEnumButtonStylekeystring
Returns
AddButton(GuiComposer, string, ActionConsumable, ElementBounds, EnumButtonStyle, EnumTextOrientation, string)
[Obsolete("Use Method without orientation argument")]
public static GuiComposer AddButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, EnumButtonStyle style, EnumTextOrientation orientation, string key = null)
Parameters
composerGuiComposertextstringonClickActionConsumableboundsElementBoundsstyleEnumButtonStyleorientationEnumTextOrientationkeystring
Returns
AddCellList<T>(GuiComposer, ElementBounds, OnRequireCell<T>, IEnumerable<T>, string)
Adds a List to the current GUI.
public static GuiComposer AddCellList<T>(this GuiComposer composer, ElementBounds bounds, OnRequireCell<T> cellCreator, IEnumerable<T> cells = null, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the cell.
cellCreatorOnRequireCell<T>the event fired when the cell is requested by the GUI
cellsIEnumerable<T>The cells of the list.
keystringThe identifier for the list.
Returns
Type Parameters
T
AddChatInput(GuiComposer, ElementBounds, Action<string>, string)
Adds a chat input to the GUI.
public static GuiComposer AddChatInput(this GuiComposer composer, ElementBounds bounds, Action<string> onTextChanged, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the text.
onTextChangedAction<string>The event fired when the text is changed.
keystringThe name of this chat component.
Returns
AddColorListPicker(GuiComposer, int[], Action<int>, ElementBounds, int, string)
Adds a range of clickable colors
public static GuiComposer AddColorListPicker(this GuiComposer composer, int[] colors, Action<int> onToggle, ElementBounds startBounds, int maxLineWidth, string key = null)
Parameters
composerGuiComposercolorsint[]onToggleAction<int>startBoundsElementBoundsmaxLineWidthintkeystring
Returns
AddCompactVerticalScrollbar(GuiComposer, Action<float>, ElementBounds, string)
Adds a compact vertical scrollbar to the current GUI.
public static GuiComposer AddCompactVerticalScrollbar(this GuiComposer composer, Action<float> onNewScrollbarValue, ElementBounds bounds, string key = null)
Parameters
composerGuiComposeronNewScrollbarValueAction<float>The event fired for the change in the scrollbar.
boundsElementBoundsthe bounds of the scrollbar.
keystringthe internal name of the scrollbar.
Returns
AddConfigList(GuiComposer, List<ConfigItem>, ConfigItemClickDelegate, CairoFont, ElementBounds, string)
Adds a config List to the current GUI.
public static GuiComposer AddConfigList(this GuiComposer composer, List<ConfigItem> items, ConfigItemClickDelegate onItemClick, CairoFont font, ElementBounds bounds, string key = null)
Parameters
composerGuiComposeritemsList<ConfigItem>The items to add.
onItemClickConfigItemClickDelegateThe event fired when the item is clicked.
fontCairoFontThe font of the Config List.
boundsElementBoundsThe bounds of the config list.
keystringThe name of the config list.
Returns
AddContainer(GuiComposer, ElementBounds, string)
Adds a container to the current GUI. Can be used to add any gui element within a scrollable window.
public static GuiComposer AddContainer(this GuiComposer composer, ElementBounds bounds, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the cell.
keystringThe identifier for the list.
Returns
AddCustomRender(GuiComposer, ElementBounds, RenderDelegateWithBounds)
Adds a static custom draw component to the GUI.
public static GuiComposer AddCustomRender(this GuiComposer composer, ElementBounds bounds, RenderDelegateWithBounds onRender)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the component.
onRenderRenderDelegateWithBoundsThe event fired when the element is drawn.
Returns
AddDialogBG(GuiComposer, ElementBounds, bool, float)
public static GuiComposer AddDialogBG(this GuiComposer composer, ElementBounds bounds, bool withTitleBar = true, float alpha = 1)
Parameters
composerGuiComposerboundsElementBoundswithTitleBarboolalphafloat
Returns
AddDialogTitleBar(GuiComposer, string, Action, CairoFont, ElementBounds, string)
Adds a dialog title bar to the GUI.
public static GuiComposer AddDialogTitleBar(this GuiComposer composer, string text, Action onClose = null, CairoFont font = null, ElementBounds bounds = null, string key = null)
Parameters
composerGuiComposertextstringThe text of the title bar.
onCloseActionThe event fired when the title bar is closed.
fontCairoFontThe font of the title bar.
boundsElementBoundsThe bounds of the title bar.
keystring
Returns
AddDialogTitleBarWithBg(GuiComposer, string, Action, CairoFont, ElementBounds, string)
Adds a dialog title bar to the GUI with a background.
public static GuiComposer AddDialogTitleBarWithBg(this GuiComposer composer, string text, Action onClose = null, CairoFont font = null, ElementBounds bounds = null, string key = null)
Parameters
composerGuiComposertextstringThe text of the title bar.
onCloseActionThe event fired when the title bar is closed.
fontCairoFontThe font of the title bar.
boundsElementBoundsThe bounds of the title bar.
keystring
Returns
AddDropDown(GuiComposer, string[], string[], int, SelectionChangedDelegate, ElementBounds, string)
Adds a dropdown to the current GUI instance.
public static GuiComposer AddDropDown(this GuiComposer composer, string[] values, string[] names, int selectedIndex, SelectionChangedDelegate onSelectionChanged, ElementBounds bounds, string key = null)
Parameters
composerGuiComposervaluesstring[]The values of the current drodown.
namesstring[]The names of those values.
selectedIndexintThe default selected index.
onSelectionChangedSelectionChangedDelegateThe event fired when the index is changed.
boundsElementBoundsThe bounds of the index.
keystringThe name of this dropdown.
Returns
AddDropDown(GuiComposer, string[], string[], int, SelectionChangedDelegate, ElementBounds, CairoFont, string)
Adds a dropdown to the current GUI instance.
public static GuiComposer AddDropDown(this GuiComposer composer, string[] values, string[] names, int selectedIndex, SelectionChangedDelegate onSelectionChanged, ElementBounds bounds, CairoFont font, string key = null)
Parameters
composerGuiComposervaluesstring[]The values of the current drodown.
namesstring[]The names of those values.
selectedIndexintThe default selected index.
onSelectionChangedSelectionChangedDelegateThe event fired when the index is changed.
boundsElementBoundsThe bounds of the index.
fontCairoFontkeystringThe name of this dropdown.
Returns
AddDynamicCustomDraw(GuiComposer, ElementBounds, DrawDelegateWithBounds, string)
Adds a dynamic custom draw component to the GUI.
public static GuiComposer AddDynamicCustomDraw(this GuiComposer composer, ElementBounds bounds, DrawDelegateWithBounds onDraw, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the component.
onDrawDrawDelegateWithBoundsThe event fired when the element is drawn.
keystringThe name of the element.
Returns
AddElementListPicker<T>(GuiComposer, Type, T[], Action<int>, ElementBounds, int, string)
Adds multiple buttons with Text.
public static GuiComposer AddElementListPicker<T>(this GuiComposer composer, Type pickertype, T[] elems, Action<int> onToggle, ElementBounds startBounds, int maxLineWidth, string key)
Parameters
composerGuiComposerpickertypeTypeelemsT[]onToggleAction<int>The event fired when the button is pressed.
startBoundsElementBoundsThe bounds of the buttons.
maxLineWidthintkeystringThe key given to the bundle of buttons.
Returns
Type Parameters
T
AddEmbossedText(GuiComposer, string, CairoFont, ElementBounds, string)
Adds an embossed text component to the GUI.
public static GuiComposer AddEmbossedText(this GuiComposer composer, string text, CairoFont font, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the component.
fontCairoFontThe font of the text.
boundsElementBoundsThe bounds of the component.
keystringThe name of the component.
Returns
AddHorizontalTabs(GuiComposer, GuiTab[], ElementBounds, Action<int>, CairoFont, CairoFont, string)
Adds a set of horizontal tabs to the GUI.
public static GuiComposer AddHorizontalTabs(this GuiComposer composer, GuiTab[] tabs, ElementBounds bounds, Action<int> onTabClicked, CairoFont font, CairoFont selectedFont, string key = null)
Parameters
composerGuiComposertabsGuiTab[]The collection of tabs.
boundsElementBoundsThe bounds of the horizontal tabs.
onTabClickedAction<int>The event fired when the tab is clicked.
fontCairoFontThe font of the tabs.
selectedFontCairoFontkeystringThe key for the added horizontal tabs.
Returns
AddHoverText(GuiComposer, string, CairoFont, int, ElementBounds, string)
Adds a hover text to the GUI.
public static GuiComposer AddHoverText(this GuiComposer composer, string text, CairoFont font, int width, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text.
fontCairoFontThe font of the text.
widthintThe width of the text.
boundsElementBoundsThe bounds of the text.
keystringThe name of this hover text component.
Returns
AddHoverText(GuiComposer, string, CairoFont, int, ElementBounds, TextBackground, string)
Adds a hover text to the GUI.
public static GuiComposer AddHoverText(this GuiComposer composer, string text, CairoFont font, int width, ElementBounds bounds, TextBackground background, string key = null)
Parameters
composerGuiComposertextstringThe text of the text.
fontCairoFontThe font of the text.
widthintThe width of the text.
boundsElementBoundsThe bounds of the text.
backgroundTextBackgroundkeystringThe name of this hover text component.
Returns
AddIconButton(GuiComposer, string, Action<bool>, ElementBounds, string)
Adds an icon button.
public static GuiComposer AddIconButton(this GuiComposer composer, string icon, Action<bool> onToggle, ElementBounds bounds, string key = null)
Parameters
composerGuiComposericonstringThe name of the icon.
onToggleAction<bool>The event that happens once the button is toggled.
boundsElementBoundsThe bounding box of the button.
keystringThe name of the button for easy access.
Returns
AddIconButton(GuiComposer, string, CairoFont, Action<bool>, ElementBounds, string)
public static GuiComposer AddIconButton(this GuiComposer composer, string icon, CairoFont font, Action<bool> onToggle, ElementBounds bounds, string key = null)
Parameters
composerGuiComposericonstringfontCairoFontonToggleAction<bool>boundsElementBoundskeystring
Returns
AddIconListPicker(GuiComposer, string[], Action<int>, ElementBounds, int, string)
Adds multiple clickable icons
public static GuiComposer AddIconListPicker(this GuiComposer composer, string[] icons, Action<int> onToggle, ElementBounds startBounds, int maxLineWidth, string key = null)
Parameters
composerGuiComposericonsstring[]onToggleAction<int>startBoundsElementBoundsmaxLineWidthintkeystring
Returns
AddIconToggleButtons(GuiComposer, string[], CairoFont, Action<int>, ElementBounds[], string)
Adds multiple buttons with icons.
public static GuiComposer AddIconToggleButtons(this GuiComposer composer, string[] icons, CairoFont font, Action<int> onToggle, ElementBounds[] bounds, string key = null)
Parameters
composerGuiComposericonsstring[]The collection of icons for the buttons.
fontCairoFontThe font for the buttons.
onToggleAction<int>The event called when the buttons are pressed.
boundsElementBounds[]The bounds of the buttons.
keystringThe key given to the bundle of buttons.
Returns
AddInvStatbar(GuiComposer, ElementBounds, double[], string)
Adds a stat bar with filling in the opposite direction. Default values are from 0 to 100.
public static GuiComposer AddInvStatbar(this GuiComposer composer, ElementBounds bounds, double[] color, string key = null)
Parameters
composerGuiComposerboundsElementBoundsthe bounds of the stat bar.
colordouble[]the color of the stat bar.
keystringThe internal name of the stat bar.
Returns
AddItemSlotGrid(GuiComposer, IInventory, Action<object>, int, int[], ElementBounds, string)
Adds an item slot grid to the GUI.
public static GuiComposer AddItemSlotGrid(this GuiComposer composer, IInventory inventory, Action<object> sendPacket, int columns, int[] selectiveSlots, ElementBounds bounds, string key = null)
Parameters
composerGuiComposerinventoryIInventoryThe inventory attached to the slot grid.
sendPacketAction<object>A handler that should send supplied network packet to the server, if the inventory modifications should be synced
columnsintThe number of columns in the slot grid.
selectiveSlotsint[]The slots within the inventory that are currently accessible.
boundsElementBoundsthe bounds of the slot grid.
keystringThe key for this particular slot grid.
Returns
AddItemSlotGrid(GuiComposer, IInventory, Action<object>, int, ElementBounds, string)
Adds an item slot grid to the GUI.
public static GuiComposer AddItemSlotGrid(this GuiComposer composer, IInventory inventory, Action<object> sendPacket, int columns, ElementBounds bounds, string key = null)
Parameters
composerGuiComposerinventoryIInventoryThe inventory attached to the slot grid.
sendPacketAction<object>A handler that should send supplied network packet to the server, if the inventory modifications should be synced
columnsintThe number of columns in the slot grid.
boundsElementBoundsthe bounds of the slot grid.
keystringThe key for this particular slot grid.
Returns
AddItemSlotGridExcl(GuiComposer, IInventory, Action<object>, int, int[], ElementBounds, string)
Adds an ItemSlotGrid with Exclusions.
public static GuiComposer AddItemSlotGridExcl(this GuiComposer composer, IInventory inventory, Action<object> sendPacket, int columns, int[] excludingSlots, ElementBounds bounds, string key = null)
Parameters
composerGuiComposerinventoryIInventoryThe attached inventory.
sendPacketAction<object>A handler that should send supplied network packet to the server, if the inventory modifications should be synced
columnsintThe number of columns.
excludingSlotsint[]The slots that have been excluded from the slot grid.
boundsElementBoundsThe bounds of the slot grid.
keystringThe name of the slot grid.
Returns
AddMultiSelectDropDown(GuiComposer, string[], string[], int, SelectionChangedDelegate, ElementBounds, string)
Adds a multiple select dropdown to the current GUI instance.
public static GuiComposer AddMultiSelectDropDown(this GuiComposer composer, string[] values, string[] names, int selectedIndex, SelectionChangedDelegate onSelectionChanged, ElementBounds bounds, string key = null)
Parameters
composerGuiComposervaluesstring[]The values of the current drodown.
namesstring[]The names of those values.
selectedIndexintThe default selected index.
onSelectionChangedSelectionChangedDelegateThe event fired when the index is changed.
boundsElementBoundsThe bounds of the index.
keystringThe name of this dropdown.
Returns
AddNumberInput(GuiComposer, ElementBounds, Action<string>, CairoFont, string)
Adds a numeric input for the current GUI.
public static GuiComposer AddNumberInput(this GuiComposer composer, ElementBounds bounds, Action<string> onTextChanged, CairoFont font = null, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the number input.
onTextChangedAction<string>The event fired when the number is changed.
fontCairoFontThe font for the numbers.
keystringThe name for this GuiElementNumberInput
Returns
AddPassiveItemSlot(GuiComposer, ElementBounds, IInventory, ItemSlot, bool)
Adds a passive item slot to the GUI.
public static GuiComposer AddPassiveItemSlot(this GuiComposer composer, ElementBounds bounds, IInventory inventory, ItemSlot slot, bool drawBackground = true)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the Slot
inventoryIInventoryThe inventory attached to the slot.
slotItemSlotThe internal slot of the slot.
drawBackgroundboolDo we draw the background for this slot? (Default: true)
Returns
AddRichtext(GuiComposer, string, CairoFont, ElementBounds, Action<LinkTextComponent>, string)
Adds a rich text element to the GUI
public static GuiComposer AddRichtext(this GuiComposer composer, string vtmlCode, CairoFont baseFont, ElementBounds bounds, Action<LinkTextComponent> didClickLink, string key = null)
Parameters
composerGuiComposervtmlCodestringbaseFontCairoFontboundsElementBoundsdidClickLinkAction<LinkTextComponent>keystring
Returns
AddRichtext(GuiComposer, string, CairoFont, ElementBounds, string)
Adds a rich text element to the GUI
public static GuiComposer AddRichtext(this GuiComposer composer, string vtmlCode, CairoFont baseFont, ElementBounds bounds, string key = null)
Parameters
composerGuiComposervtmlCodestringbaseFontCairoFontboundsElementBoundskeystring
Returns
AddRichtext(GuiComposer, RichTextComponentBase[], ElementBounds, string)
Adds a rich text element to the GUI
public static GuiComposer AddRichtext(this GuiComposer composer, RichTextComponentBase[] components, ElementBounds bounds, string key = null)
Parameters
composerGuiComposercomponentsRichTextComponentBase[]boundsElementBoundskeystring
Returns
AddShadedDialogBG(GuiComposer, ElementBounds, bool, double, float)
Adds shaded, slighlty dirt textured background to the GUI.
public static GuiComposer AddShadedDialogBG(this GuiComposer composer, ElementBounds bounds, bool withTitleBar = true, double strokeWidth = 5, float alpha = 0.75)
Parameters
composerGuiComposerboundsElementBoundswithTitleBarboolstrokeWidthdoublealphafloat
Returns
AddSkillItemGrid(GuiComposer, List<SkillItem>, int, int, Action<int>, ElementBounds, string)
Adds a skill item grid to the GUI.
public static GuiComposer AddSkillItemGrid(this GuiComposer composer, List<SkillItem> skillItems, int columns, int rows, Action<int> onSlotClick, ElementBounds bounds, string key = null)
Parameters
composerGuiComposerskillItemsList<SkillItem>The items that represent skills.
columnsintthe columns in the skill item grid.
rowsintThe rows in the skill item grid.
onSlotClickAction<int>The effect when a slot is clicked.
boundsElementBoundsThe bounds of the item grid.
keystringThe name of the item grid to add.
Returns
AddSlider(GuiComposer, ActionConsumable<int>, ElementBounds, string)
Adds a slider to the current GUI.
public static GuiComposer AddSlider(this GuiComposer composer, ActionConsumable<int> onNewSliderValue, ElementBounds bounds, string key = null)
Parameters
composerGuiComposeronNewSliderValueActionConsumable<int>The event that fires when the slider's value is changed.
boundsElementBoundsThe bounds of the slider.
keystringthe internal name of the slider.
Returns
AddSmallButton(GuiComposer, string, ActionConsumable, ElementBounds, EnumButtonStyle, string)
Adds a small clickable button with font size GuiStyle.SmallFontSize
public static GuiComposer AddSmallButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, EnumButtonStyle style = EnumButtonStyle.Normal, string key = null)
Parameters
composerGuiComposertextstringThe text displayed inside the button
onClickActionConsumableHandler for when the button is clicked
boundsElementBoundsstyleEnumButtonStylekeystring
Returns
AddSmallButton(GuiComposer, string, ActionConsumable, ElementBounds, EnumButtonStyle, EnumTextOrientation, string)
[Obsolete("Use Method without orientation argument")]
public static GuiComposer AddSmallButton(this GuiComposer composer, string text, ActionConsumable onClick, ElementBounds bounds, EnumButtonStyle style, EnumTextOrientation orientation, string key = null)
Parameters
composerGuiComposertextstringonClickActionConsumableboundsElementBoundsstyleEnumButtonStyleorientationEnumTextOrientationkeystring
Returns
AddStatbar(GuiComposer, ElementBounds, double[], bool, string)
Adds a stat bar to the current GUI with a minimum of 0 and a maximum of 100.
public static GuiComposer AddStatbar(this GuiComposer composer, ElementBounds bounds, double[] color, bool hideable, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the stat bar.
colordouble[]The color of the stat bar.
hideableboolIf true, the element can be fully hidden without recompose.
keystringThe internal name of the stat bar.
Returns
AddStatbar(GuiComposer, ElementBounds, double[], string)
public static GuiComposer AddStatbar(this GuiComposer composer, ElementBounds bounds, double[] color, string key = null)
Parameters
composerGuiComposerboundsElementBoundscolordouble[]keystring
Returns
AddStaticCustomDraw(GuiComposer, ElementBounds, DrawDelegateWithBounds)
Adds a static custom draw component to the GUI.
public static GuiComposer AddStaticCustomDraw(this GuiComposer composer, ElementBounds bounds, DrawDelegateWithBounds onDraw)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the component.
onDrawDrawDelegateWithBoundsThe event fired when the element is drawn.
Returns
AddStaticText(GuiComposer, string, CairoFont, ElementBounds, string)
Adds a static text component to the GUI
public static GuiComposer AddStaticText(this GuiComposer composer, string text, CairoFont font, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text component.
fontCairoFontThe font of the text.
boundsElementBoundsThe bounds of the text container.
keystringThe name of the component.
Returns
AddStaticText(GuiComposer, string, CairoFont, EnumTextOrientation, ElementBounds, string)
Adds a static text component to the GUI
public static GuiComposer AddStaticText(this GuiComposer composer, string text, CairoFont font, EnumTextOrientation orientation, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text component.
fontCairoFontThe font of the text.
orientationEnumTextOrientationThe orientation of the text.
boundsElementBoundsThe bounds of the text container.
keystringThe name of the component.
Returns
AddStaticTextAutoBoxSize(GuiComposer, string, CairoFont, EnumTextOrientation, ElementBounds, string)
Adds a static text component to the GUI that automatically resizes as necessary.
public static GuiComposer AddStaticTextAutoBoxSize(this GuiComposer composer, string text, CairoFont font, EnumTextOrientation orientation, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text component.
fontCairoFontThe font of the text.
orientationEnumTextOrientationThe orientation of the text.
boundsElementBoundsThe bounds of the text container.
keystringThe name of the component.
Returns
AddStaticTextAutoFontSize(GuiComposer, string, CairoFont, ElementBounds, string)
Adds a static text component to the GUI that automatically resizes as necessary.
public static GuiComposer AddStaticTextAutoFontSize(this GuiComposer composer, string text, CairoFont font, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text component.
fontCairoFontThe font of the text.
boundsElementBoundsThe bounds of the text container.
keystringThe name of the component.
Returns
AddSwitch(GuiComposer, Action<bool>, ElementBounds, string, double, double)
Adds a switch to the GUI.
public static GuiComposer AddSwitch(this GuiComposer composer, Action<bool> onToggle, ElementBounds bounds, string key = null, double size = 30, double padding = 4)
Parameters
composerGuiComposeronToggleAction<bool>The event that happens when the switch is toggled.
boundsElementBoundsThe bounds of the switch.
keystringthe name of the switch. (Default: null)
sizedoubleThe size of the switch (Default: 30)
paddingdoubleThe padding around the switch (Default: 5)
Returns
AddTextArea(GuiComposer, ElementBounds, Action<string>, CairoFont, string)
Adds a text area to the GUI.
public static GuiComposer AddTextArea(this GuiComposer composer, ElementBounds bounds, Action<string> onTextChanged, CairoFont font = null, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the Text Area
onTextChangedAction<string>The event fired when the text is changed.
fontCairoFontThe font of the text.
keystringThe name of the text area.
Returns
AddTextInput(GuiComposer, ElementBounds, Action<string>, CairoFont, string)
Adds a text input to the current GUI.
public static GuiComposer AddTextInput(this GuiComposer composer, ElementBounds bounds, Action<string> onTextChanged, CairoFont font = null, string key = null)
Parameters
composerGuiComposerboundsElementBoundsThe bounds of the text input.
onTextChangedAction<string>The event fired when the text is changed.
fontCairoFontThe font of the text.
keystringThe name of this text component.
Returns
AddTextToggleButtons(GuiComposer, string[], CairoFont, Action<int>, ElementBounds[], string)
Adds multiple buttons with Text.
public static GuiComposer AddTextToggleButtons(this GuiComposer composer, string[] texts, CairoFont font, Action<int> onToggle, ElementBounds[] bounds, string key = null)
Parameters
composerGuiComposertextsstring[]The texts on all the buttons.
fontCairoFontThe font for the buttons
onToggleAction<int>The event fired when the button is pressed.
boundsElementBounds[]The bounds of the buttons.
keystringThe key given to the bundle of buttons.
Returns
AddToggleButton(GuiComposer, string, CairoFont, Action<bool>, ElementBounds, string)
Creates a toggle button with the given parameters.
public static GuiComposer AddToggleButton(this GuiComposer composer, string text, CairoFont font, Action<bool> onToggle, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the button.
fontCairoFontThe font of the text.
onToggleAction<bool>The event that happens once the button is toggled.
boundsElementBoundsThe bounding box of the button.
keystringThe name of the button for easy access.
Returns
AddTranspHoverText(GuiComposer, string, CairoFont, int, ElementBounds, string)
Adds a hover text to the GUI.
public static GuiComposer AddTranspHoverText(this GuiComposer composer, string text, CairoFont font, int width, ElementBounds bounds, string key = null)
Parameters
composerGuiComposertextstringThe text of the text.
fontCairoFontThe font of the text.
widthintThe width of the text.
boundsElementBoundsThe bounds of the text.
keystringThe name of this hover text component.
Returns
AddVerticalScrollbar(GuiComposer, Action<float>, ElementBounds, string)
Adds a vertical scrollbar to the GUI.
public static GuiComposer AddVerticalScrollbar(this GuiComposer composer, Action<float> onNewScrollbarValue, ElementBounds bounds, string key = null)
Parameters
composerGuiComposeronNewScrollbarValueAction<float>The action when the scrollbar changes.
boundsElementBoundsThe bounds of the scrollbar.
keystringThe name of the scrollbar.
Returns
AddVerticalTabs(GuiComposer, GuiTab[], ElementBounds, Action<int, GuiTab>, string)
Adds multiple tabs to a group of vertical tabs.
public static GuiComposer AddVerticalTabs(this GuiComposer composer, GuiTab[] tabs, ElementBounds bounds, Action<int, GuiTab> onTabClicked, string key = null)
Parameters
composerGuiComposertabsGuiTab[]The tabs being added.
boundsElementBoundsThe boundaries of the tab group.
onTabClickedAction<int, GuiTab>The event fired when any of the tabs are clicked.
keystringThe name of this tab group.
Returns
AddVerticalToggleTabs(GuiComposer, GuiTab[], ElementBounds, Action<int, GuiTab>, string)
Adds multiple tabs to a group of vertical tabs.
public static GuiComposer AddVerticalToggleTabs(this GuiComposer composer, GuiTab[] tabs, ElementBounds bounds, Action<int, GuiTab> onTabClicked, string key = null)
Parameters
composerGuiComposertabsGuiTab[]The tabs being added.
boundsElementBoundsThe boundaries of the tab group.
onTabClickedAction<int, GuiTab>The event fired when any of the tabs are clicked.
keystringThe name of this tab group.
Returns
ColorListPickerSetValue(GuiComposer, string, int)
Selects one of the colors from a color list picker
public static void ColorListPickerSetValue(this GuiComposer composer, string key, int selectedIndex)
Parameters
composerGuiComposerkeystringselectedIndexint
GetButton(GuiComposer, string)
Gets the button by name
public static GuiElementTextButton GetButton(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetCellList<T>(GuiComposer, string)
Gets the list by name.
public static GuiElementCellList<T> GetCellList<T>(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the list to get.
Returns
Type Parameters
T
GetChatInput(GuiComposer, string)
Gets the chat input by name.
public static GuiElementChatInput GetChatInput(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the chat input component.
Returns
- GuiElementChatInput
The named component.
GetColorListPicker(GuiComposer, string)
Returns a previously added color list picker element
public static GuiElementColorListPicker GetColorListPicker(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetCompactScrollbar(GuiComposer, string)
Gets the scrollbar from the dialogue.
public static GuiElementCompactScrollbar GetCompactScrollbar(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringthe internal name of the scrollbar to be gotten
Returns
- GuiElementCompactScrollbar
The scrollbar with the given key.
GetConfigList(GuiComposer, string)
Gets the config list by name.
public static GuiElementConfigList GetConfigList(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the config list.
Returns
GetContainer(GuiComposer, string)
Gets the container by key
public static GuiElementContainer GetContainer(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the list to get.
Returns
GetCustomDraw(GuiComposer, string)
public static GuiElementCustomDraw GetCustomDraw(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetCustomRender(GuiComposer, string)
public static GuiElementCustomRender GetCustomRender(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetDropDown(GuiComposer, string)
Gets the Drop Down element from the GUIComposer by their key.
public static GuiElementDropDown GetDropDown(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringthe name of the dropdown to fetch.
Returns
GetEmbossedText(GuiComposer, string)
Gets the EmbossedText component by name.
public static GuiElementEmbossedText GetEmbossedText(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the component.
Returns
- GuiElementEmbossedText
the named component of the text.
GetHorizontalTabs(GuiComposer, string)
Gets the HorizontalTabs element from the GUI by name.
public static GuiElementHorizontalTabs GetHorizontalTabs(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe key for the horizontal tabs you want to get.
Returns
GetHoverText(GuiComposer, string)
Fetches the hover text component by name.
public static GuiElementHoverText GetHoverText(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the text component.
Returns
GetIconListPicker(GuiComposer, string)
Returns the icon list picker
public static GuiElementIconListPicker GetIconListPicker(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetNumberInput(GuiComposer, string)
Gets the number input by name.
public static GuiElementNumberInput GetNumberInput(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe internal name of the numeric input.
Returns
- GuiElementNumberInput
The named numeric input.
GetRichtext(GuiComposer, string)
Gets the chat input by name.
public static GuiElementRichtext GetRichtext(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the chat input component.
Returns
- GuiElementRichtext
The named component.
GetScrollbar(GuiComposer, string)
Gets the scrollbar by name.
public static GuiElementScrollbar GetScrollbar(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the scrollbar.
Returns
- GuiElementScrollbar
The scrollbar itself.
GetSkillItemGrid(GuiComposer, string)
Fetches the skill item grid by name
public static GuiElementSkillItemGrid GetSkillItemGrid(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the skill item grid to get.
Returns
- GuiElementSkillItemGrid
The skill item grid to get.
GetSlider(GuiComposer, string)
Gets the slider by name from the GUI.
public static GuiElementSlider GetSlider(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringthe internal name of the slider.
Returns
- GuiElementSlider
the slider.
GetSlotGrid(GuiComposer, string)
Gets the slot grid by name.
public static GuiElementItemSlotGrid GetSlotGrid(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the slot grid to get.
Returns
GetSlotGridExcl(GuiComposer, string)
Gets the ItemSlotGridExcl by name.
public static GuiElementItemSlotGridExcl GetSlotGridExcl(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the ItemSlotGridExcl
Returns
GetStatbar(GuiComposer, string)
Gets the stat bar by name.
public static GuiElementStatbar GetStatbar(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe internal name of the stat bar to fetch.
Returns
- GuiElementStatbar
The named stat bar.
GetStaticText(GuiComposer, string)
Gets the static text component by name.
public static GuiElementStaticText GetStaticText(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the component.
Returns
GetSwitch(GuiComposer, string)
Gets the switch by name.
public static GuiElementSwitch GetSwitch(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe internal name of the switch.
Returns
- GuiElementSwitch
Returns the named switch.
GetTextArea(GuiComposer, string)
Gets the text area by name.
public static GuiElementTextArea GetTextArea(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the text area.
Returns
- GuiElementTextArea
The named Text Area.
GetTextInput(GuiComposer, string)
Gets the text input by input name.
public static GuiElementTextInput GetTextInput(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the text input to get.
Returns
- GuiElementTextInput
The named text input
GetTitleBar(GuiComposer, string)
public static GuiElementDialogTitleBar GetTitleBar(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystring
Returns
GetToggleButton(GuiComposer, string)
Gets the toggle button by name in the GUIComposer.
public static GuiElementToggleButton GetToggleButton(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the button.
Returns
- GuiElementToggleButton
A button.
GetVerticalTab(GuiComposer, string)
Gets the vertical tab group as declared by name.
public static GuiElementVerticalTabs GetVerticalTab(this GuiComposer composer, string key)
Parameters
composerGuiComposerkeystringThe name of the vertical tab group to get.
Returns
IconListPickerSetValue(GuiComposer, string, int)
Selects one of the clickable icons
public static void IconListPickerSetValue(this GuiComposer composer, string key, int selectedIndex)
Parameters
composerGuiComposerkeystringselectedIndexint
ToggleButtonsSetValue(GuiComposer, string, int)
Toggles the given button.
public static void ToggleButtonsSetValue(this GuiComposer composer, string key, int selectedIndex)
Parameters
composerGuiComposerkeystringThe name of the button that was set.
selectedIndexintthe index of the button.