RandomNotes.wiki
author Wuzzy
Fri, 19 Apr 2019 16:07:50 +0100
changeset 1831 365c30b4c669
parent 1814 e6e9ed9d2626
child 1834 323d6e659cd7
permissions -rw-r--r--
LuaGears: Add temporary mistake to test documentation script

#summary Little tidbits that await proper structuring

= Introduction =
This page is a collection of random unsorted or unfinished stuff which is not good or structured enough to be put into one of the “real” wiki pages. Wiki editors: If something becomes actually useable, please move it to the appropriate wiki page and remove it from this page.

This page is intentionally chaotic and may change rapidliy at any time.

= How to add a settings option =
 * `QStringList HWGame::setArguments()` in `game.cpp` is the function that prepares the argument list
 * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values
 * `PageOptions::PageOptions(QWidget* parent) :  AbstractPage(parent)` is where you would add your widget

= How to convert a `.hwmap` file to a Lua string =

Run the shell script `tools/hwmap2lua.sh` found in the Hedgewars repository. Help is included in the source code.

= Undocumented Lua functions =
This script was used on [LuaAPI] to detect undocumented functions:

[http://hw.ercatec.net/docs/lua_wiki_check.php]

But due to a restructuring, this script no longer works, it needs to be updated. Functions are now located on LuaEvents, LuaGameplay, LuaGears, LuaStats, LuaGUI, LuaAudio and LuaUtil.