Added four new script functions:

"get_sfall_arg_at", "show_window", "hide_window", "set_window_flag"

Improved the functionality of "inventory_redraw" function.
This commit is contained in:
NovaRain
2019-11-16 22:36:53 +08:00
parent 996dd293c0
commit 18c10d8911
15 changed files with 179 additions and 26 deletions
+22 -1
View File
@@ -517,9 +517,10 @@ Some utility/math functions are available:
- adds one custom box to the current boxes, and returns the number of the added tag (-1 if the tags limit is exceeded)
- The maximum number of boxes is limited to 126 tags
> void sfall_func0("inventory_redraw")
> void sfall_func1("inventory_redraw", int invSide)
- redraws inventory list in the inventory/use inventory item on/loot/barter screens
- invSide specifies which side needs to be redrawn: 0 - the player, 1 - target (container/NPC in loot/barter screens)
- invSide specifies which side needs to be redrawn: 0 - the player, 1 - target (container/NPC in loot/barter screens), -1 - both sides
> void sfall_func3("item_make_explosive", int pid, int activePid, int damage)
> void sfall_func4("item_make_explosive", int pid, int activePid, int min, int max)
@@ -647,6 +648,26 @@ optional argument:
> void sfall_func1("remove_timer_event", int param)
- removes all timer events with the specified 'param' value for the current global script
> mixed sfall_func1("get_sfall_arg_at", int argNum)
- gets the value of hook argument with the specified argument number (argNum, first argument starts from 0)
> void sfall_func0("hide_window")
> void sfall_func1("hide_window", string winName)
- hides the specified or currently selected/active script window
- winName: the window name, assigned to the window by the CreateWin/create_win function
> void sfall_func0("show_window")
> void sfall_func1("show_window", string winName)
- displays the specified hidden script window or the one previously hidden with the sfall_func0("hide_window") function
- winName: the window name, assigned to the window by the CreateWin/create_win function
> void sfall_func3("set_window_flag", string/int winName/winID, int flag, bool value)
- changes the specified flag for the created script or game interface window
- winName: the window name, assigned to the window by the CreateWin/create_win function
- winID: the ID number of the interface or script window obtained with the get_window_under_mouse function
- flag: the flag to change (see WIN_FLAG_* constants in define_extra.h)
- value: true - set the flag, false - unset the flag
------------------------
------ MORE INFO -------
------------------------