Configuration saving

In ReGui, this is called the Ini service. There is example usage of the Ini service in the demo window

ReGui does not have a built-in file system interface. Therefore, you will need to create your own to handle the Ini service. Enabling JsonEncode will return a string which should be used for the save file content

ReGui:DumpIni(JsonEncode: boolean?): (table|string)

  • Returns the table or json string of the Ini settings

ReGui:LoadIni(NewSettings: (table|string), JsonEncoded: boolean?)

  • Loads the Ini into the Elements

ReGui:AddIniFlag(Flag: string, Element)

  • Manually declare an Element for a IniFlag

  • This is done automatically when an Element is created if the flags contain IniFlag

ReGui:LoadIniIntoElement(Element, Values: table)

  • Loads the values from the Value table into the Element

  • This function is used by :LoadIni

  • Passed values will be checked in the ValueFunctions dict to check whether it should invoke a function, e.g :SetValue is required for Value

Last updated