Added "interface_art_draw" script function

Added an argument to "intface_redraw" function to redraw all interfaces.
This commit is contained in:
NovaRain
2020-09-26 16:15:32 +08:00
parent 88d9126b18
commit e696db4b7b
12 changed files with 131 additions and 25 deletions
+24 -9
View File
@@ -356,7 +356,7 @@ Some utility/math functions are available:
- returns first object blocking given tile using given blocking function or 0 if tile is clear
> array tile_get_objs(int tileNum, int elevation)
- returns array of all objects at given tile
- returns an array of all objects at given tile
- it will include any hidden, dead or system objects (like cursor), so make sure to check properly when iterating
> array party_member_list(int includeHidden)
@@ -402,8 +402,9 @@ Some utility/math functions are available:
- works just like vanilla critter_inven_obj, but correctly reports item in player's inactive hand slot
> void sfall_func0("intface_redraw")
- redraws main game interface
- useful after direct changes to current player weapons or stats to reflect changes
> void sfall_func1("intface_redraw", bool eachWin)
- redraws main game interface, useful to reflect changes after directly changing current player weapons or stats
- eachWin: pass True to redraw all interface windows
> void sfall_func0("intface_hide")
- hides main interface
@@ -612,15 +613,15 @@ Some utility/math functions are available:
- there is also a unique ID number range for the player and party members from 18000 to 83535
- to assign a new ID number generated by the engine to the object (i.e. unassign a unique ID), call the function with two arguments and pass -1 for the flag argument
> void sfall_func5("draw_image", string/int pathFile/artId, int frame, int x, int y, bool noTransparent)
> void sfall_func6("draw_image_scaled", string/int pathFile/artId, int frame, int x, int y, int width, int height)
> void sfall_func5("draw_image", string/int artFile/artId, int frame, int x, int y, bool noTransparent)
> void sfall_func6("draw_image_scaled", string/int artFile/artId, int frame, int x, int y, int width, int height)
- displays the specified PCX or FRM image in the active window created by vanilla CreateWin or sfall's create_win script function
- pathFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
- artFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
optional arguments:
- frame: frame number, the first frame starts from zero
- x/y: offset relative to the top-left corner of the window
- width/height: image size, used to scale the image when displaying it. Pass -1 to either width or height to keep the aspect ratio when scaling
- noTransparent: pass true to display an image without transparent background
- width/height: the new width/height to scale the image to. Pass -1 to either width or height to keep the aspect ratio when scaling
- noTransparent: pass True to display an image without transparent background
- NOTE: to omit optional arguments starting from the right, call the functions with different sfall_funcX (e.g. sfall_func4("draw_image", pathFile, frame, x, y))
- if draw_image_scaled is called without x/y/width/height arguments, the image will be scaled to fit the window without transparent background
@@ -731,7 +732,7 @@ optional argument:
- message: the text in the dialog box. Use the \n control character to move text to a new line (example: "Hello\nWorld!")
optional arguments:
- flags: mode flags (see MSGBOX_* constants in define_extra.h). Pass -1 to skip setting the flags (default flags are NORMAL and YESNO)
- color1/2: the color index in Fallout palette. color1 sets the text color for the first line, and color2 for all subsequent lines of text (default color is 145)
- color1/color2: the color index in Fallout palette. color1 sets the text color for the first line, and color2 for all subsequent lines of text (default color is 145)
> int sfall_func1("get_stat_min", stat)
> int sfall_func1("get_stat_max", stat)
@@ -740,6 +741,20 @@ optional arguments:
- returns the maximum or minimum set value of the specified stat (see set_stat_max/min functions)
- who: 0 (false) or omitting the argument - returns the value of the player, 1 (true) - returns the value set for other critters
> int sfall_func4("interface_art_draw", int winType, string/int artFile/artId, int x, int y)
> int sfall_func5("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame)
> int sfall_func6("interface_art_draw", int winType, string/int artFile/artId, int x, int y, int frame, array param)
- draws the specified PCX or FRM image in the game interface window, returns -1 in case of any error
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
this also takes the value of the flag (0x10000) to prevent immediate redrawing of the interface window
- artFile/artId: path to the PCX/FRM file (e.g. "art\\inven\\5mmap.frm"), or its FRM ID number (e.g. 0x7000026, see specification of the FID format)
- x/y: offset relative to the top-left corner of the window
optional arguments:
- frame: frame number, the first frame starts from zero
- param: an array which specifies additional parameters:
index 0 - the direction of multi-directional FRM
index 1/index 2 - the new width/height to scale the image to. Pass -1 to width or height to use the original image size
------------------------
------ MORE INFO -------
------------------------