Added "dialog_box" script function

Added a new attrType value to "get_window_attribute" function.

Tweaked the arg type check for "force_encounter_with_flags" function.
This commit is contained in:
NovaRain
2020-01-27 20:52:01 +08:00
parent 6b1fffded1
commit 893847cc6a
10 changed files with 143 additions and 67 deletions
+12 -2
View File
@@ -611,15 +611,25 @@ optional arguments:
> void sfall_func3("set_terrain_name", int x, int y, string name)
- overrides the terrain type name for the sub-tile on the world map by the specified coordinates
int sfall_func2("get_window_attribute", int winType, int attrType)
> int sfall_func1("get_window_attribute", int winType)
> int sfall_func2("get_window_attribute", int winType, int attrType)
- returns the attribute of the specified interface window by the attrType argument
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
- attrType: 0 - X position, 1 - Y position (relative to the top-left corner of the game screen)
- attrType: 0 - returns a value of 1 if the specified interface window is created by the game (same as without the argument)
1 - X position, 2 - Y position (relative to the top-left corner of the game screen)
- returns -1 if the specified attribute cannot be obtained
> void sfall_func2("set_town_title", int areaID, string title)
- sets a floating text for a town on the world map when hovering the cursor over the player's marker
- areaID: the ID number of the town from city.txt
> int sfall_func1("dialog_box", string text1)
> int sfall_func2("dialog_box", string text1, string text2)
> int sfall_func3("dialog_box", string text1, string text2, string text3)
- creates a dialog box with text and returns the result of pressing the button: 0 - No, 1 - Yes
- text1/text2/text3: corresponding text in the dialog box for the first, second, and third lines
- returns -1 if for some reason the dialog box cannot be created
------------------------
------ MORE INFO -------
------------------------