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
})

Last updated