Editing Lua Architecture
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 3: | Line 3: | ||
== Gadgets == | == Gadgets == | ||
− | Gadgets should all be placed in the Zero-K/LuaRules/Gadgets/ folder. Gadgets are loaded and handled by the | + | Gadgets should all be placed in the Zero-K/LuaRules/Gadgets/ folder. Gadgets are loaded and handled by the gadget.lua file in Zero-K/LuaRules/gadget.lua. You may review this file to understand how gadgets are handled by Zero-K, however you should not modify the file, as this has a high likelihood of breaking its ability to interface with existing gadgets. |
For details on the Call-ins used by Gadgets, please refer to the [[Lua Architecture#Event Call-ins|Event Call-ins]] section | For details on the Call-ins used by Gadgets, please refer to the [[Lua Architecture#Event Call-ins|Event Call-ins]] section | ||
== Widgets == | == Widgets == | ||
− | Widgets should all be placed in the Zero-K/LuaRules/Widgets/ folder. Widgets are loaded and handled by the | + | Widgets should all be placed in the Zero-K/LuaRules/Widgets/ folder. Widgets are loaded and handled by the cawidgets.lua file in Zero-K/LuaUI/cawidgets.lua. You may review this file to understand how widgets are handled by Zero-K, however as with the gadgets.lua file, you should not modify this file, as this has a high likelihood of breaking its ability to interface with existing widgets. |
For details on the Call-ins used by Widgets, please refer to the [[Lua Architecture#Event Call-ins|Event Call-ins]] section | For details on the Call-ins used by Widgets, please refer to the [[Lua Architecture#Event Call-ins|Event Call-ins]] section | ||
Line 16: | Line 16: | ||
==== Gadget Call-Ins ==== | ==== Gadget Call-Ins ==== | ||
− | See the table "callInLists" within the file ''' | + | See the table "callInLists" within the file '''Zero-K/LuaRules/gadget.lua''' |
==== Widget Call-Ins ==== | ==== Widget Call-Ins ==== | ||
− | See the tables "callInLists", "flexCallIns", and "reverseCallIns" within the file ''' | + | See the tables "callInLists", "flexCallIns", and "reverseCallIns" within the file '''Zero-K/LuaUI/cawidgets.lua''' |
There are also a list of call-ins that originate from Spring, these may or may not be compatible with the aforementioned gadgets and widgets. | There are also a list of call-ins that originate from Spring, these may or may not be compatible with the aforementioned gadgets and widgets. |