Lua Widgets: Difference between revisions
fix category |
m info about Lua tweaking mode. |
||
| Line 34: | Line 34: | ||
'''NOTE:''' Before you can use widgets, you MUST make sure that you have checked the "Enable LuaUI widgets" box in SpringSettings. | '''NOTE:''' Before you can use widgets, you MUST make sure that you have checked the "Enable LuaUI widgets" box in SpringSettings. | ||
To list/manage all available widgets, press F11 while ingame. Each widget is listed by name and sorted alphabetically, and mod included widgets appear first on the list with their names surrounded by asterisks. You may click on each widget name to enable/disable that widget. <font color="green">'''Green'''</font> widgets are currently running, <font color="red">'''red'''</font> widgets are currently disabled and <font color="orange">'''orange'''</font> widgets have malfunctioned or turned themselves off. | To list/manage all available widgets, press F11 while ingame. Each widget is listed by name and sorted alphabetically, and mod included widgets appear first on the list with their names surrounded by asterisks. You may click on each widget name to enable/disable that widget. <font color="green">'''Green'''</font> widgets are currently running, <font color="red">'''red'''</font> widgets are currently disabled and <font color="orange">'''orange'''</font> widgets have malfunctioned or turned themselves off. | ||
To rearrange the Lua widgets, press Ctrl-F11 while ingame. To escape Lua tweaking mode, just hit Esc. | |||
In the case that you begin to see Lua errors and/or your user interface inexplicably crashes or becomes "messed up", you can use the command '''/luaui reload''' in order to restart the Lua user interface. If for any reason you wish to shutdown the Lua user interface while ingame, you may issue the command '''/luaui disable'''. | In the case that you begin to see Lua errors and/or your user interface inexplicably crashes or becomes "messed up", you can use the command '''/luaui reload''' in order to restart the Lua user interface. If for any reason you wish to shutdown the Lua user interface while ingame, you may issue the command '''/luaui disable'''. | ||
|} | |} | ||
[[Category: Lua]] | [[Category: Lua]] | ||
Revision as of 21:01, 11 June 2010
GeneralLuaUI Widget Directory - A list of cross-mod compatible LuaUI widgets |
Introduction: What's a "Widget"?LuaUI widgets are files containing Lua code that you can run while playing a Spring game in order to assist you with unit management, provide you with valuable information, or otherwise supplement the basic Spring user interface. They are easy to install, easy to run and manage ingame, and relatively easy to write should you choose to learn how to do so. |
Getting WidgetsWidget code and files are quite often released as posts in the Spring Lua Forum. In addition, they are also mirrored at popular Spring file sites such as JobJol. It is also highly recommended that you visit the wiki's LuaUI Widget Directory, which contains a list of many widgets, along with mod compatibility information and possible additional installation instructions. |
Installing WidgetsWidget files have the extension .lua, but only contain plain text. To install widgets you've downloaded, just move the .lua file to the LuaUI\Widgets folder in your Spring installation directory. Sometimes, a widget file may come in a zip archive, or be bundled with other dependent files. These files will need to be unarchived, then moved to their proper respective folders in the LuaUI folder. Look for a help or readme file included in the package, or read any installation instructions listed with the widget at the LuaUI Widget Directory. |
Using WidgetsNOTE: Before you can use widgets, you MUST make sure that you have checked the "Enable LuaUI widgets" box in SpringSettings. To list/manage all available widgets, press F11 while ingame. Each widget is listed by name and sorted alphabetically, and mod included widgets appear first on the list with their names surrounded by asterisks. You may click on each widget name to enable/disable that widget. Green widgets are currently running, red widgets are currently disabled and orange widgets have malfunctioned or turned themselves off. To rearrange the Lua widgets, press Ctrl-F11 while ingame. To escape Lua tweaking mode, just hit Esc. In the case that you begin to see Lua errors and/or your user interface inexplicably crashes or becomes "messed up", you can use the command /luaui reload in order to restart the Lua user interface. If for any reason you wish to shutdown the Lua user interface while ingame, you may issue the command /luaui disable. |