1 #summary little tidbits that await proper structuring |
1 #summary little tidbits that await proper structuring |
2 |
2 |
3 how to add a settings option |
3 = Introduction = |
4 QStringList HWGame::setArguments() in game.cpp is the function that prepares the argument list |
4 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. |
5 void GameUIConfig::SaveOptions() in gameuiconfig.cpp loads (or initializes) values and set the widgets to those values |
5 |
6 PageOptions::PageOptions(QWidget* parent) : AbstractPage(parent) is where you would add your widget |
6 This page is intentionally chaotic and may change rapidliy at any time. |
|
7 |
|
8 = Undocumented LuaAPI functions = |
|
9 Full list (without parameters, but automatically generated) at http://hw.ercatec.net/docs/lua_wiki_check.php. |
|
10 |
|
11 * CampaignLock |
|
12 * Marked as “TODO” in source code |
|
13 * CampaignUnlock |
|
14 * Marked as “TODO” in source code |
|
15 * SetGearCollisionMask(gearUid, mask) |
|
16 * GetGearCollisionMask(gearUid) |
|
17 * DeclareAchievement(achievementId, teamname, location, value) |
|
18 * EndLuaTest(state) |
|
19 * state is TEST_SUCCESSFUL or TEST_FAILED |
|
20 * GetCampaignVar(varname) |
|
21 * SaveCampaignVar(varname, value) |
|
22 * GetFlightTime(gearUid) |
|
23 * SetFlightTime(gearUid, flighttime) |
|
24 * PlaceSprite(x, y, sprite, frameIdx, ...) |
|
25 * SetAmmoDelay(ammoType, delay) |
|
26 * Changes delay of ammoType to delay, the question remains where it is safe to be called. |
|
27 * SetAmmoStore(loadouts, probabilities, delays, reinforcements) |
|
28 * SetGearAIHints(gearUid, aiHints) |
|
29 * onAchievementsDeclaration() |
|
30 * onParameters() |
|
31 * onSpecialPoint(x, y, flags) |
|
32 |
|
33 = How to add a settings option = |
|
34 * `QStringList HWGame::setArguments()` in `game.cpp` is the function that prepares the argument list |
|
35 * `void GameUIConfig::SaveOptions()` in `gameuiconfig.cpp` loads (or initializes) values and set the widgets to those values |
|
36 * `PageOptions::PageOptions(QWidget* parent) : AbstractPage(parent)` is where you would add your widget |