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 [https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/gadgets.lua gadgets.lua] file in Zero-K/LuaRules/gadgets.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.  
+
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 [https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/cawidgets.lua 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 [https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/gadgets.lua gadgets.lua] file, you should not modify this file, as this has a high likelihood of breaking its ability to interface with existing widgets.
+
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 '''[https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaRules/gadgets.lua Zero-K/LuaRules/gadgets.lua]'''
+
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 '''[https://github.com/ZeroK-RTS/Zero-K/blob/master/LuaUI/cawidgets.lua Zero-K/LuaUI/cawidgets.lua]'''
+
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.

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)