ReGui
  • Introduction
  • Getting Started
    • Installing
    • Creating windows
  • Plugins
    • Custom elements
    • Custom flags
    • Custom themes
  • Examples
    • Demo window
    • Example scripts
  • Methods
  • ReGui functions
  • Canvas functions
  • Configuration saving
  • Elements
    • :Label
    • :Error
    • Code Editor
    • :Button
    • :SmallButton
    • :RadioButton
    • :Image
    • :VideoPlayer
    • :Checkbox
    • :Radiobox
    • :Viewport
    • :Console
    • :Region
    • :List
    • :CollapsingHeader
    • :TreeNode
    • :Separator
    • :Indent
    • :BulletText
    • :Bullet
    • :Row
    • :SliderInt
    • :SliderFloat
    • :SliderEnum
    • :SliderColor3
    • :SliderCFrame
    • :SliderProgress
    • :DragInt
    • :DragFloat
    • :DragColor3
    • :DragCFrame
    • :InputText
    • :InputTextMultiline
    • :InputInt
    • :InputColor3
    • :InputCFrame
    • :ProgressBar
    • :Combo
    • :Keybind
    • :PlotHistogram
    • :Table
    • :TabSelector
    • :Window
    • :TabsWindow
    • :PopupModal
Powered by GitBook
On this page
  1. Plugins

Custom flags

When ReGui generates an element such as a Label from invoking Canvas:Label, it will check if the flag is a property or a global flag. If it is a global flag it will call the defined function but if it's a property such as Size it will be set as a property to the element as it is not a global flag

Examples of some built-in flags are: Icon, Border, and Ratio

type Data = {
	Object: Instance,
	Class: table,
	WindowClass: table? --// May not exist in some cases
}

Basic flag example for visibility:

ReGui:DefineGlobalFlag({
	Properties = {"Hidden"}, --// These are trigger strings in the element flags
	Callback = function(Data, Object, Value)
		Object.Visible = not Value
	end
})
PreviousCustom elementsNextCustom themes

Last updated 2 months ago