http://ufoai.org/w/api.php?action=feedcontributions&user=Xray&feedformat=atomUFO:AI - User contributions [en]2024-03-29T05:17:13ZUser contributionsMediaWiki 1.35.4http://ufoai.org/w/index.php?title=Mapping/Compile&diff=42472Mapping/Compile2017-08-27T12:34:00Z<p>Xray: /* Windows */</p>
<hr />
<div>==Introduction==<br />
In order to see a map in game it must be compiled. Compiling can be very [[Mapping/Compile_time|time consuming]]. If you don't want to compile yourself, you can use the {{path|contrib/map-get/update.py}} script to download the latest version of the compiled maps. You need python 2.x to do so. Grab it from {{http|python.org|www.python.org}}. Windows users should right click the file and select 'Open with' and choose the python binary (e.g. in {{path|c:\python23}}).<br />
<br />
The rest of this page is designed for mappers who are compiling their own maps, and for information on ufo2map's settings.<br />
<br />
==Compiling your own map==<br />
To compile your own map it must be saved in the <code>/base/maps/</code> folder. You should use <code>ufo2map.exe</code>, which is located in the folder where you installed the game, alongside the game's executable (<code>ufo2map.exe</code>). Running it is different for different platforms<br />
<br />
===Windows===<br />
To run <code>ufo2map.exe</code>, go to the Start Menu. For Windows XP, click Run and then type cmd. It should open a small black window with an old dos-like prompt. Browse to your game's installation folder. If you game is in <code>c:\Program Files\ufoai</code>, you would type <code>cd "c:\Program Files\ufoai"</code> and hit enter.<br />
<br />
Once you're in the directory, type <code>ufo2map maps/yourmap.map</code>.<br />
<br />
Important:<br><br />
To compile the map from inside the UFORadiant editor on windows, make sure to have <code>gspawn-win32-helper.exe</code> and <code>gspawn-win32-helper-console.exe</code> available on youre path, else you'll get an error on the UFORadiant console telling you the command could not be spawned. The best is to just have them alongside the <code>uforadiant.exe</code> program.<br />
<br />
Also, you might encounter the situation that <code>ufo2map.exe</code> and other command line tools are running but not displaying any output. However the output is send to files like <code>stdout.txt</code> and <code>stderr.txt</code>. This is caused by a configuration issue in SDL.<br />
If this happens, running <code>ufo2map.exe</code> from inside UFORadiant will not work properly. To resolve this, add the following environment variable to you system:<br><br><br />
<pre><br />
SDL_STDIO_REDIRECT=0<br />
</pre><br />
<br />
===Linux===<br />
Under Linux we use <code>ufo2map</code> - which is a binary including the bsping and the radiosity part.<br />
<br />
Just type <code>make maps</code> from {{path|master/}}. This will compile all maps in the first run and subsequently all changed maps.<br />
<br />
You can also compile just one specific map:<br />
Once you're in the master directory, type <code>./ufo2map maps/yourmap.map</code>.<br />
<br />
==Loading the map in game==<br />
To play the map in game, you will need to add the map to a .ufo file in the <code>/base/ufos/</code> directory. You can either add the entry to your existing <code>maps.ufo</code> file or make a new file for your map. If you're just testing, making a new file can be easier to work with. The file should look something like this for a test map, though you can look at other maps in <code>maps.ufo</code> to see other options:<br />
<br />
<pre>mapdef yourmap<br />
{<br />
map "yourmap"<br />
description "_Your map description"<br />
teams 2<br />
multiplayer false<br />
maxaliens 8<br />
aircraft <br />
{<br />
}<br />
<br />
ufos<br />
{<br />
//any<br />
}<br />
<br />
terrains<br />
{<br />
//any<br />
}<br />
<br />
cultures<br />
{<br />
//any<br />
}<br />
<br />
populations<br />
{<br />
//any<br />
}<br />
}</pre><br />
<br />
You can also get some more detailed information about the map definition [[UFO-Scripts/maps.ufo|here.]]. <BR><br />
Once you have this file in the '''/base/ufos/''' folder, you can load your map in Skirmish mode.<br />
<br />
==Errors you may get==<br />
* '''mixed face contents'''<br />
: Example: Entity 0, Brush 12: mixed face contents<br />
: All brushsides should have the same content and surfaceflags set - but there may be exceptions like nodraw faces<br />
* '''MAX_POINTS_ON_WINDING'''<br />
: this happens if more than the allowed number of brushes touches one brush - e.g. a long stair<br />
* '''MAX_MAP_LIGHTING'''<br />
: this means that there are "too many lightmap pages". Concretely, this may happen if there are too many surfaces in the map, or textures scaled too small.<br />
<br />
==Advanced Parameters for ufo2map==<br />
<br />
If you type '''ufo2map --help''', you will get a long list of supported parameters. Here are a few:<br />
<br />
;-extra:Extra light samples for better lighting<br />
;-quant NUMBER:The default is currently 4, but you can reduce this for much better lighting (cleaner lines). But this will dramatically increase compile times.<br />
;-nolighting:This will bypass the lighting stage if you just want a quick test. You can add '''day''' or '''night''' parameters behind it to bypass just that lighting stage.<br />
;-check:This will check the map file, but it will not make any changes. Instead, it will print out a list of found problems. It will report about mixed levelflags, z-fighting and more.<br />
;-fix:This will check the map file and try to fix a number of problems. So it fixes surfaces that ought to be nodraw and more.<br />
<br />
<br />
Another article related to the advanced parameters of ufo2map can be found in the [[Mapping_for_Dummies/Lesson3#Using_advanced_parameters_of_ufo2map|Mapping for Dummies: Lesson 3]].<br />
<br />
==Batch File==<br />
There is a batch file with some useful options, e.g. you can compile all the maps in one directory (when dealing with a random map assembly). Look for '''contrib/scripts/compile_maps.bat''' and run <pre>compile_maps.bat /help</pre> for information.<br />
<br />
==Statistics==<br />
* [[Mapping/Compile time|Compile time]]<br />
<br />
[[Category:Contribute]]<br />
[[Category:Mapping]]</div>Xrayhttp://ufoai.org/w/index.php?title=UFO-Scripts/ui/LUA-scripts&diff=42401UFO-Scripts/ui/LUA-scripts2016-02-10T18:54:49Z<p>Xray: added section on creating and using confunc's</p>
<hr />
<div>==Basic processing==<br />
<br />
In ufo, scripts create (among other things), the user interface. These scripts all have extension .ufo. When ufo encounters such a script it is processed. Ufo now accepts two script languages to create the user interface: a custom script language, called ufo script and a lua script. Both script languages can be used side-by-side. Ufo<br />
determines the script type by scanning the first line of the script file. If it starts with:<br />
<br />
<pre><br />
--!/usr/bin/lua<br />
</pre><br />
<br />
the script is considered to be a lua script and is processed by the embedded lua interpreter, else the script is considered to be ufo script and is processed by ufo script parser.<br />
<br />
For a lua script, the entire script is first parsed by the lua interpreter. If no errors are found, the lua script is then executed by the lua interpreter. This is the moment youre script actually gets executed for the first time. <br />
Scripts are loaded in the order as they appear in the folder. This is why files containing generic stuff usually start with an underscore.<br />
<br />
==UI-scripting 'The lua way...'==<br />
<br />
Before you start, you should become familiair with the lua language itself and most of all with the fact that lua is not an object oriented language. Objects in lua are represented by a data structure called a table, essentially being a container holding data and functions. This mechanism is broadly used since every user interface node becomes a table. However, since lua is not an OO-language, there is no mechanism to add the "self" parameter in a method call. To solve this, lua programmers since long have used the following trick:<br />
<br />
<pre><br />
function fooTable.fooMethod(self, arg1)<br />
-- the code<br />
end<br />
</pre><br />
<br />
Since it was so broadly use, eventually Lua added a second function call mechanism that does add implicitly a "self" parameter. It uses the ":", like this:<br />
<br />
<pre><br />
function fooTable:fooMethod(arg1)<br />
-- the code<br />
end<br />
</pre><br />
<br />
Be aware however that this calling mechanism applies only for functions calls and not for data fields. So to access a data field on a table you use the "." seperator, like this:<br />
<br />
<pre><br />
local x = fooTable()<br />
x.fooData = 123<br />
</pre><br />
<br />
This distinction is important since everything in the UFO lua API is exposed using functions with the exception of event handlers (note the ":" when accessing functions on a table and the "." when accessing the field holding the on_click event handler. Here is some sample code:<br />
<br />
<pre><br />
-- get the window node<br />
local x = node:root()<br />
-- attach an event handler to respond to a mouseclick<br />
x.on_click = function (sender)<br />
-- do whatever you want to do when the user clicks<br />
end<br />
</pre><br />
<br />
==Accessing the API==<br />
<br />
All parts of ufo exposed to lua is accessible from within lua using the "ufo" namespace. It contains the global functions, classes and constants. For a complete list of the API see [...].<br />
<br />
The API follows the naming of properties and methods in the ufo script language with a few exceptions. In general this is the case when the naming in the ufo script is either ambigious or confusing. For instance, in ufo script the property "string" in general is being used to refer to the text displayed by a control, so it was renamed to "text".<br />
<br />
The lua API uses the following naming convention:<br />
- Getters are not prefixed, so e.g. to get the name of the node you call "name()"<br />
- Getters for flags however are prefixed by "is_", e.g. "is_virtual()"<br />
- Setters are prefixed by "set_", e.g. "set_background("icon/windowplusb")"<br />
<br />
==Processing after loading==<br />
<br />
After a script is processed it is possible to run a onload event. To do so, just put a call to register_onload somewhere in the script. A sample is given below:<br />
<br />
<pre><br />
function foo_onload ()<br />
-- do whatever you want to do after the script is processed<br />
end<br />
<br />
register_onload (foo_onload)<br />
</pre><br />
<br />
The difference by the way is subtle. The onload is executed just after the lua script is processed so in theory it is possible to achieve the same result by positioning foo_onload at the end of the script (it is then executed last). However, in future, it might be that onload will be executed after the loading/processing of all ufo lua scripts.<br />
<br />
==Creating a user interface==<br />
<br />
To create a user interface, the second step in processing of the .ufo file should yield a uiNode (single node or tree of nodes). To create nodes, the api exposes node creation functions through the common ufo namespace. Even though lua will allow it, you should never create a uiNode directly. With the uiNode object (or any of its descendents) in hand, you can start calling methods to alter the desired behaviour (e.g. set the background).<br />
<br />
<pre><br />
main = ufo.create_window ("main", nil)<br />
main::set_background("ui/main_bg")<br />
</pre><br />
<br />
The user interface makes a distinction between "controls", "windows" and "components". Controls are user interface elements, e.g. buttons. Controls are always located inside a container. A "window" is a top-level user interface element. A "component" is a clonable group of controls. A component typically is created around a container control (e.g. a panel). Like controls, components can be created and added to windows.<br />
<br />
<pre><br />
local smallstring = ufo.create_component ("string", "smallstring", nil)<br />
smallstring:set_font("f_verysmall")<br />
smallstring:set_color(0.56, 0.81, 0.76, 1.0)<br />
</pre><br />
<br />
==Creating functions in lua==<br />
<br />
It is easy to write functions in lua. Functions can be shared through the entire lua environment, just make sure that the function is known at the moment it is used. It is also possible to attach a function to a user interface node. If you declare a function on a lua node, it is reusable anywhere else even in the old script language. For example, the code below creates a panel<br />
component to be reused. It defines two functions on the node. These functions do not exist in the C++ side of ufo, only on the lua side. However they can now be used in the user interface. Even if the old style script is used.<br />
<br />
<pre><br />
local common_panel = ufo.create_component ("panel", "common_panel", nil)<br />
common_panel.enable = function (sender)<br />
common_panel:set_background("ui/enabled")<br />
end<br />
common_panel.disable = function (sender)<br />
common_panel:set_background("ui/disabled")<br />
end<br />
</pre><br />
<br />
==Creating and using confunc's==<br />
<br />
A confunc is a script defined node that can be called as a command either from the console or from any other script. To define a confunc, you must create a node of class "confunc". Then define an on_click event with the signature of the command. Any parameters to the confunc are accessible as additional parameters following "sender", the first parameter of any function.<br />
<br />
<pre><br />
local foo_func = ufo.create_confunc(parent_node, "pop_initready_aircraft", nil)<br />
foo_func.on_click = function (sender, arg1, arg2)<br />
sender:parent():child("craftname"):set_text(arg1)<br />
sender:parent():child("missionname"):set_text(arg2)<br />
end<br />
</pre><br />
<br />
Note that in the example above the arguments are named arg1 and arg2 but they can have any name. In this case a more logical name would be "craft" for arg1 and "mission" for arg2.<br />
<br />
==Storing data on a node==<br />
<br />
Like functions, in lua it is easy to add data fields to a table. However, using this mechanism is not advised since there is no guarantee that the lua table will not be destroyed by the garbage collector. Ufo has it's own mechanism to create persistent variables, either by creating a "cvar" or by using a data node.<br />
<br />
==Lua identifier scoping and the use of do..end==<br />
<br />
Identifiers have a scope (if you get lost here and don't know what 'scope' is, then I suggest you first start reading some books about programming before continuing). Defining the same identifier twice in a scope results in an error. Whenever you define a ui element, variables are prefixed with the keyword 'local', indicating that the scope of the variable is limited to this lua file only. If you forget the 'local' keyword the identifier becomes visible in all lua files, possibly resulting in a duplicate identifier error.<br />
<br />
Another way of limiting the scope of identifiers is to use the 'do..end' block. <br />
<pre><br />
do<br />
local foo_panel = ufo.create_component ("panel", "common_panel", nil)<br />
...<br />
end<br />
</pre><br />
<br />
In this case the identifier 'foo_panel' is visible only inside the 'do..end', thereby limiting the visibility to only a part of the file. The use of 'do..end' is strongly advised since it prevents accidental nameclash. Also it is a must in the asset files, wich define a number of generic ui components.<br />
<br />
==Utility libaries==<br />
<br />
One advantage of using lua is that it allows for libraries of support functions that can greatly enhance the process of creating the user interface. A most useful library is the ufox library. For more info, see [[UFO-Scripts/ui/LUA-utility-functions]]<br />
<br />
[[Category:Coding]]<br />
[[Category:Contribute]]</div>Xrayhttp://ufoai.org/w/index.php?title=UFO-Scripts&diff=42394UFO-Scripts2016-01-27T13:09:29Z<p>Xray: /* Scriptfiles */</p>
<hr />
<div>==General==<br />
The ufo script files can all be found in {{path|base/ufos}} (see [[Directory tree]]). These files include the [[UFO-Scripts/ui/*.ufo|menu definitions]], [[UFO-Scripts/weapon_*.ufo|weapon definitions]] and a lot more. You might first have to extract the [[pk3]] files in {{path|base}}<br />
<br />
Make sure, that you looked into the [[Coding/Guidelines|coding guidelines]] before submitting patches.<br />
<br />
You can also use comments here:<br />
<pre><br />
// this is a comment for one line<br />
/* this is<br />
a comment<br />
over<br />
several lines */<br />
</pre><br />
<br />
==Scriptfiles==<br />
* [[LUA-AI]]<br />
* [[UFO-Scripts/ui/LUA-scripts|UI lua scripting]]<br />
* [[UFO-Scripts/ui/LUA-utility-functions|ufox, a lua utility library for UI scripting]]<br />
* [[UFO-Scripts/ui/*.ufo|menu (UI) definitions]]<br />
* [[UFO-Scripts/aircraftmanagement.ufo|aircraft definition]]<br />
* [[UFO-Scripts/armour.ufo|armour definitions]]<br />
* [[UFO-Scripts/basemangement.ufo|base, buildings and autobuild]]<br />
* [[UFO-Scripts/campaign.ufo|campaign definitions]]<br />
* [[UFO-Scripts/team_templates.ufo|character template definitions]]<br />
* [[UFO-Scripts/cities.ufo|cities definitions]]<br />
* [[UFO-Scripts/entities.ufo|map entity definitions]]<br />
* [[UFO-Scripts/equipment.ufo|equipment definitions]]<br />
* [[UFO-Scripts/fonts.ufo|font definitions]]<br />
* [[UFO-Scripts/inventory.ufo|inventory definitions]]<br />
* [[UFO-Scripts/maps.ufo|maps definition]]<br />
* [[UFO-Scripts/msgoptions.ufo|message options]]<br />
* [[UFO-Scripts/msgcategories.ufo|message categories]]<br />
* [[UFO-Scripts/music.ufo|music definitions]]<br />
* [[UFO-Scripts/nations.ufo|nations definition]]<br />
* [[UFO-Scripts/ptl_*.ufo|particle definitions]]<br />
* [[UFO-Scripts/research.ufo|research definitions]]<br />
* [[UFO-Scripts/seq_*.ufo|sequence definitions]]<br />
* [[UFO-Scripts/skins.ufo|character skin definitions]]<br />
* [[UFO-Scripts/staticcampaign.ufo|static campaign]]<br />
* [[UFO-Scripts/team_*.ufo|team definitions]]<br />
* [[Tip_of_the_Day|tip of the day]]<br />
* [[UFO-Scripts/weapon_*.ufo|weapon definitions]]<br />
<br />
==Available [[commands]]==<br />
You can get a command list by typing <pre>cmdlist</pre> in the game [[console]]. There are some commands that are only available after starting a single player game.<br />
<br />
==Available [[cvars]]==<br />
You can get a cvar list by typing <pre>cvarlist</pre> in the game [[console]].<br />
<br />
==Offline viewing==<br />
You can view a command list or cvar list outside of the game by using the <pre>logfile 1</pre> command prior to using the cmdlist or cvarlist command, if it's not already in your console log file. This will have the list placed into the log file which can then be viewed directly after you exit the game and prior to running the game again. Keep in mind that you may have to clean this output up. Replacing the date and time with an empty string should do the trick quite well. You should be able to use a simple text editor like notepad for this task. You can find the console log at base/ufoconsole.log.<br />
<!--<br />
==Adding missions==<br />
* Add [[Adding mission|new mission]] to campaign definition<br />
--><br />
<br />
==Adding campaigns==<br />
* Add a [[Create campaign|new campaign]] to the game<br />
<br />
==Links==<br />
* [[UFO-Scripts/Datatypes|Datatypes]]<br />
<br />
[[Category:UFO-Scripts]]<br />
[[Category:Contribute]]</div>Xrayhttp://ufoai.org/w/index.php?title=Scripting&diff=42288Scripting2015-09-02T11:37:18Z<p>Xray: /* Links */</p>
<hr />
<div>{{NAV/Coding}}<br />
==General==<br />
UFO makes heavy use of script files. It uses scripts for particles, user interfaces, weapons, buildings, aircraft, equipment, technologies and so on. These script files can be found in your game directory in {{path|base/ufos}}. Every '''*.ufo''' will be parsed on UFO:AI start up.<br />
<br />
==UFO-script tutorials==<br />
* add a [[create campaign|new campaign]] to the game<br />
* add [[adding mission|new maps]] to a campaign<br />
* generate a [[create menu|new menu]]<br />
* create a [[create tutorial|new tutorial]]<br />
* [[Mapping:Random_map_assembly|random map assembly]]<br />
* [[tweak weapons]]<br />
<br />
==Links==<br />
* [[UFO-Scripts]]<br />
* [[UFO-Scripts/Datatypes|Datatypes]]<br />
* [[UFO-Scripts/Guidelines|Guidelines]]<br />
* [[UFO-Scripts/ui/LUA-scripts|UI Lua scripts]]<br />
* [[UFO-Scripts/ui/LUA-API|UI Lua API]]<br />
* [[UFO-Scripts/ui/LUA-utility-functions|UI Lua utility functions]]<br />
<br />
[[Category:Contribute]]<br />
[[Category:UFO-Scripts]]</div>Xrayhttp://ufoai.org/w/index.php?title=UFO-Scripts/ui/LUA-API&diff=42180UFO-Scripts/ui/LUA-API2014-11-30T10:25:02Z<p>Xray: UI lua api</p>
<hr />
<div>==global functions==<br />
<br />
<pre><br />
function ufo.findvar(string varName)<br />
function ufo.getvar(string var_name, string var_value, int flags, string desc)<br />
function ufo.getvar(string var_name, string var_value, int flags)<br />
function ufo.getvar(string var_name, string var_value)<br />
function ufo.getvar(string var_name)<br />
function ufo.create_control(uiNode parent, string type, string name, string super)<br />
function ufo.create_bar(uiNode parent, string name, string super)<br />
function ufo.create_button(uiNode parent, string name, string super)<br />
function ufo.create_basemap(uiNode parent, string name, string super)<br />
function ufo.create_baselayout(uiNode parent, string name, string super)<br />
function ufo.create_baseinventory(uiNode parent, string name, string super)<br />
function ufo.create_checkbox(uiNode parent, string name, string super)<br />
function ufo.create_confunc(uiNode parent, string name, string super)<br />
function ufo.create_container(uiNode parent, string name, string super)<br />
function ufo.create_data(uiNode parent, string name, string super)<br />
function ufo.create_ekg(uiNode parent, string name, string super)<br />
function ufo.create_geoscape(uiNode parent, string name, string super)<br />
function ufo.create_image(uiNode parent, string name, string super)<br />
function ufo.create_item(uiNode parent, string name, string super)<br />
function ufo.create_linechart(uiNode parent, string name, string super)<br />
function ufo.create_messagelist(uiNode parent, string name, string super)<br />
function ufo.create_model(uiNode parent, string name, string super)<br />
function ufo.create_option(uiNode parent, string name, string super)<br />
function ufo.create_optionlist(uiNode parent, string name, string super)<br />
function ufo.create_optiontree(uiNode parent, string name, string super)<br />
function ufo.create_panel(uiNode parent, string name, string super)<br />
function ufo.create_radar(uiNode parent, string name, string super)<br />
function ufo.create_radiobutton(uiNode parent, string name, string super)<br />
function ufo.create_rows(uiNode parent, string name, string super)<br />
function ufo.create_selectbox(uiNode parent, string name, string super)<br />
function ufo.create_sequence(uiNode parent, string name, string super)<br />
function ufo.create_spinner(uiNode parent, string name, string super)<br />
function ufo.create_string(uiNode parent, string name, string super)<br />
function ufo.create_tab(uiNode parent, string name, string super)<br />
function ufo.create_tbar(uiNode parent, string name, string super)<br />
function ufo.create_text(uiNode parent, string name, string super)<br />
function ufo.create_text2(uiNode parent, string name, string super)<br />
function ufo.create_textentry(uiNode parent, string name, string super)<br />
function ufo.create_textlist(uiNode parent, string name, string super)<br />
function ufo.create_texture(uiNode parent, string name, string super)<br />
function ufo.create_timer(uiNode parent, string name, string super)<br />
function ufo.create_video(uiNode parent, string name, string super)<br />
function ufo.create_vscrollbar(uiNode parent, string name, string super)<br />
function ufo.create_widget(uiNode parent, string name, string super)<br />
function ufo.create_window(string name, string super)<br />
function ufo.create_zone(string name, string super)<br />
function ufo.create_component(string type, string name, string super)<br />
function ufo.pop_window(bool all)<br />
function ufo.push_window(string name, string parentName, params)<br />
function ufo.cmd(string command)<br />
function ufo.print(string fmt)<br />
function ufo.dprint(int level, string fmt)<br />
function ufo.error(int code, string fmt)<br />
function ufo.nodetree(uiNode node)<br />
function ufo.register_onload(LUA_FUNCTION fcn)<br />
</pre><br />
<br />
==global classes==<br />
<br />
<pre><br />
class ufo.uiScroll: <br />
int viewpos ()<br />
int viewsize ()<br />
bool fullsize ()<br />
void set_fullsize (bool value)<br />
bool set_values (int pos, int size, bool full)<br />
bool moveto (int pos)<br />
bool movedelta (int delta)<br />
<br />
<br />
class ufo.cvar: <br />
char name ()<br />
char as_string ()<br />
float as_float ()<br />
int as_integer ()<br />
void set_value (float number)<br />
<br />
<br />
class ufo.invDef: <br />
char name ()<br />
<br />
<br />
class ufo.uiNode: <br />
bool is_window ()<br />
bool is_disabled ()<br />
bool is_invisible ()<br />
bool is_ghost ()<br />
bool is_flashing ()<br />
bool is_function ()<br />
bool is_virtual ()<br />
bool is_abstract ()<br />
float left ()<br />
float top ()<br />
float widht ()<br />
float height ()<br />
int bordersize ()<br />
char name ()<br />
char type ()<br />
char text ()<br />
char font ()<br />
char image ()<br />
int contentalign ()<br />
int layoutalign ()<br />
float flashspeed ()<br />
int padding ()<br />
uiNode_t first ()<br />
uiNode_t last ()<br />
uiNode_t next ()<br />
uiNode_t parent ()<br />
uiNode_t root ()<br />
uiNode_t child (string name)<br />
uiNode_t find (string name)<br />
void append_node (uiNode node)<br />
void insert_node (uiNode node, uiNode prev)<br />
void set_left (float value)<br />
void set_top (float value)<br />
void set_widht (float value)<br />
void set_height (float value)<br />
void set_box (float left, float top, float width, float height)<br />
void set_flashing (bool value)<br />
void set_flashspeed (float value)<br />
void set_invisible (bool value)<br />
void set_ghost (bool value)<br />
void set_pos (float x, float y)<br />
void set_size (float w, float h)<br />
void set_color (float r, float g, float b, float a)<br />
void set_disabledcolor (float r, float g, float b, float a)<br />
void set_flashcolor (float r, float g, float b, float a)<br />
void set_selectcolor (float r, float g, float b, float a)<br />
void set_backgroundcolor (float r, float g, float b, float a)<br />
void set_bordersize (int size)<br />
void set_bordercolor (float r, float g, float b, float a)<br />
void set_text (string text)<br />
void set_font (string name)<br />
void set_image (string name)<br />
void set_contentalign (int value)<br />
void set_layoutalign (int value)<br />
void set_tooltip (string text)<br />
void set_disabled (bool value)<br />
void set_borderthickness (int value)<br />
void set_padding (int value)<br />
void __setitem (string name, LUA_METHOD fcn)<br />
LUA_METHOD __getitem (string name)<br />
void add_classmethod (string name, LUA_METHOD fcn)<br />
void add_nodemethod (string name, LUA_METHOD fcn)<br />
<br />
<br />
class ufo.uiAbstractOptionNode: uiNode<br />
int dataid ()<br />
int count ()<br />
void set_dataid (string name)<br />
void set_background (string name)<br />
LUA_EVENT on_viewchange ()<br />
<br />
<br />
class ufo.uiAbstractScrollableNode: uiNode<br />
int viewpos ()<br />
int viewsize ()<br />
int fullsize ()<br />
void pageup ()<br />
void pagedown ()<br />
void moveup ()<br />
void movedown ()<br />
void movehome ()<br />
void moveend ()<br />
void set_viewpos (int pos)<br />
void set_viewsize (int size)<br />
void set_fullsize (int size)<br />
LUA_EVENT on_viewchange ()<br />
<br />
<br />
class ufo.uiAbstractScrollbarNode: uiNode<br />
bool is_autoshowscroll ()<br />
int current ()<br />
int viewsize ()<br />
int fullsize ()<br />
void set_autoshowscroll (bool value)<br />
void set_current (int pos)<br />
void set_viewsize (int size)<br />
void set_fullsize (int size)<br />
<br />
<br />
class ufo.uiAbstractValueNode: uiNode<br />
float min ()<br />
float max ()<br />
float value ()<br />
float delta ()<br />
float lastdiff ()<br />
float shiftmultiplier ()<br />
void inc_value ()<br />
void dec_value ()<br />
void set_range (float min, float max)<br />
void set_range (string min, string max)<br />
void set_min (float min)<br />
void set_max (float max)<br />
void set_value (float value)<br />
void set_min (string min)<br />
void set_max (string max)<br />
void set_value (string name)<br />
<br />
<br />
class ufo.uiBar: uiAbstractValueNode<br />
bool is_readonly ()<br />
bool is_nohover ()<br />
int direction ()<br />
void set_direction (int value)<br />
void set_readonly (bool value)<br />
void set_nohover (bool value)<br />
<br />
<br />
class ufo.uiAbstractBase: uiNode<br />
int baseid ()<br />
<br />
<br />
class ufo.uiBaseMap: uiAbstractBase<br />
<br />
<br />
class ufo.uiBaseLayout: uiAbstractBase<br />
<br />
<br />
class ufo.uiButton: uiNode<br />
bool flipicon ()<br />
void set_flipicon (bool value)<br />
void set_background (string name)<br />
void set_icon (string name)<br />
<br />
<br />
class ufo.uiCheckBox: uiNode<br />
void set_background (string name)<br />
void set_iconchecked (string name)<br />
void set_iconunchecked (string name)<br />
void set_iconunknown (string name)<br />
<br />
<br />
class ufo.uiConFunc: uiNode<br />
<br />
<br />
class ufo.uiContainer: uiNode<br />
int selectedid ()<br />
LUA_EVENT on_select ()<br />
<br />
<br />
class ufo.uiBaseInventory: uiContainer<br />
int filtertype ()<br />
int columns ()<br />
bool is_displayweapon ()<br />
bool is_displayweaponammo ()<br />
bool is_displayammo ()<br />
bool is_displayimplant ()<br />
bool is_displayunavailable ()<br />
bool is_displayunavailableammo ()<br />
bool is_displayavailableontop ()<br />
void set_displayweapon (bool value)<br />
void set_displayweaponammo (bool value)<br />
void set_displayammo (bool value)<br />
void set_displayimplant (bool value)<br />
void set_displayunavailable (bool value)<br />
void set_displayunavailableammo (bool value)<br />
void set_displayavailableontop (bool value)<br />
int viewpos ()<br />
int viewsize ()<br />
int fullsize ()<br />
void set_viewpos (int pos)<br />
void set_viewsize (int size)<br />
void set_fullsize (int size)<br />
LUA_EVENT on_viewchange ()<br />
<br />
<br />
class ufo.uiData: uiNode<br />
char as_string ()<br />
int as_integer ()<br />
float as_float ()<br />
void set_value (string value)<br />
void set_value (int value)<br />
void set_valuef (float value)<br />
<br />
<br />
class ufo.uiGeoscape: uiNode<br />
void zoomin ()<br />
void zoomout ()<br />
<br />
<br />
class ufo.uiImage: uiNode<br />
bool is_keepratio ()<br />
bool is_mousefx ()<br />
vec2_struct_t texh ()<br />
vec2_struct_t texl ()<br />
void set_keepratio (bool value)<br />
void set_mousefx (bool value)<br />
void set_source (string name)<br />
void set_texh (float v1, float v2)<br />
void set_texl (float v1, float v2)<br />
<br />
<br />
class ufo.uiEkg: uiImage<br />
float scrollspeed ()<br />
float cvarscale ()<br />
void set_scrollspeed (float value)<br />
void set_cvarscale (float value)<br />
<br />
<br />
class ufo.uiLineChart: uiNode<br />
bool is_showaxes ()<br />
int dataid ()<br />
void set_dataid (string name)<br />
void set_showaxes (bool value)<br />
void set_axescolor (float r, float g, float b, float a)<br />
<br />
<br />
class ufo.uiMessageList: uiAbstractScrollableNode<br />
<br />
<br />
class ufo.uiModel: uiNode<br />
bool is_autoscale ()<br />
bool is_mouserotate ()<br />
vec3_struct_t angles ()<br />
vec3_struct_t origin ()<br />
vec3_struct_t omega ()<br />
vec3_struct_t scale ()<br />
char model ()<br />
char skin ()<br />
char animation ()<br />
char tag ()<br />
void set_autoscale (bool value)<br />
void set_mouserotate (bool value)<br />
void set_angles (float a1, float a2, float a3)<br />
void set_origin (float a1, float a2, float a3)<br />
void set_omega (float a1, float a2, float a3)<br />
void set_scale (float a1, float a2, float a3)<br />
void set_model (string name)<br />
void set_skin (string name)<br />
void set_animation (string name)<br />
void set_tag (string name)<br />
<br />
<br />
class ufo.uiItem: uiModel<br />
bool is_containerlike ()<br />
void set_containerlike (bool value)<br />
<br />
<br />
class ufo.uiOption: uiNode<br />
bool is_collapsed ()<br />
bool is_flipicion ()<br />
bool is_truncated ()<br />
char label ()<br />
char value ()<br />
int count ()<br />
void set_label (string text)<br />
void set_value (string text)<br />
void set_collapsed (bool value)<br />
void set_flipicion (bool value)<br />
void set_truncated (bool value)<br />
void set_icon (string name)<br />
<br />
<br />
class ufo.uiOptionList: uiAbstractOptionNode<br />
<br />
<br />
class ufo.uiOptionTree: uiAbstractOptionNode<br />
void set_selectedvalue (string value)<br />
<br />
<br />
class ufo.uiPanel: uiAbstractScrollableNode<br />
bool is_wheelscrollable ()<br />
int layout ()<br />
int layoutmargin ()<br />
int layoutcolumns ()<br />
void set_layout (int value)<br />
void set_layoutmargin (int value)<br />
void set_layoutcolumns (int value)<br />
void set_wheelscrollable (bool value)<br />
void set_background (string name)<br />
<br />
<br />
class ufo.uiRadar: uiNode<br />
<br />
<br />
class ufo.uiRadioButton: uiNode<br />
bool is_flipicon ()<br />
char as_string ()<br />
float as_float ()<br />
void set_value (string value)<br />
void set_value (float value)<br />
void set_flipicon (bool value)<br />
void set_background (string name)<br />
void set_icon (string name)<br />
<br />
<br />
class ufo.uiRows: uiNode<br />
int current ()<br />
int lineheight ()<br />
void set_current (int value)<br />
void set_lineheight (int value)<br />
<br />
<br />
class ufo.uiSelectBox: uiNode<br />
<br />
<br />
class ufo.uiSequence: uiNode<br />
bool is_playing ()<br />
void set_source (string name)<br />
LUA_EVENT lua_onEnd ()<br />
<br />
<br />
class ufo.uiSpinner: uiAbstractValueNode<br />
bool is_horizontal ()<br />
bool is_inverted ()<br />
int mode ()<br />
void set_background (string name)<br />
void set_topicon (string name)<br />
void set_bottomicon (string name)<br />
void set_mode (int mode)<br />
void set_horizontal (bool value)<br />
void set_inverted (bool value)<br />
<br />
<br />
class ufo.uiString: uiNode<br />
int longlines ()<br />
void set_longlines (int value)<br />
<br />
<br />
class ufo.uiTab: uiAbstractOptionNode<br />
<br />
<br />
class ufo.uiTBar: uiAbstractValueNode<br />
vec2_struct_t texh ()<br />
vec2_struct_t texl ()<br />
void set_source (string name)<br />
void set_texh (float v1, float v2)<br />
void set_texl (float v1, float v2)<br />
<br />
<br />
class ufo.uiText: uiAbstractScrollableNode<br />
int dataid ()<br />
int lineheight ()<br />
int lineselected ()<br />
int longlines ()<br />
char textselected ()<br />
int tabwidth ()<br />
void set_dataid (int id)<br />
void set_longlines (int value)<br />
void set_lineheight (int value)<br />
void set_lineselected (int line)<br />
void set_tabwidth (int value)<br />
<br />
<br />
class ufo.uiText2: uiText<br />
<br />
<br />
class ufo.uiTextEntry: uiNode<br />
bool is_password ()<br />
bool is_clickoutabort ()<br />
int cursorposition ()<br />
void set_password (bool value)<br />
void set_clickoutabort (bool value)<br />
void set_background (string name)<br />
LUA_EVENT on_textabort ()<br />
<br />
<br />
class ufo.uiTextList: uiText<br />
<br />
<br />
class ufo.uiTexture: uiNode<br />
void set_source (string name)<br />
<br />
<br />
class ufo.uiTimer: uiNode<br />
int timeout ()<br />
void set_timeout (int value)<br />
LUA_EVENT lua_onEvent ()<br />
<br />
<br />
class ufo.uiVideo: uiNode<br />
bool is_nosound ()<br />
void set_nosound (bool value)<br />
void set_source (string name)<br />
LUA_EVENT lua_onEnd ()<br />
<br />
<br />
class ufo.uiVScrollbar: uiAbstractScrollbarNode<br />
<br />
<br />
class ufo.uiWidget: uiImage<br />
<br />
<br />
class ufo.uiWindow: uiNode<br />
bool is_fullscreen ()<br />
bool is_modal ()<br />
void close ()<br />
void open ()<br />
void set_background (string name)<br />
void set_fullscreen (bool value)<br />
void set_modal (bool value)<br />
void set_fill (bool value)<br />
void set_dragbutton (bool value)<br />
void set_closebutton (bool value)<br />
LUA_EVENT on_windowopened ()<br />
LUA_EVENT on_windowclosed ()<br />
<br />
<br />
class ufo.uiZone: uiNode<br />
bool is_repeat ()<br />
int clickdelay ()<br />
void set_repeat (bool value)<br />
void set_clickdelay (int value)<br />
</pre><br />
<br />
==global constants==<br />
<br />
<pre><br />
constants (from enum uiDataIDs_t): <br />
<br />
ufo.TEXT_NULL<br />
ufo.TEXT_STANDARD<br />
ufo.TEXT_LIST<br />
ufo.TEXT_LIST2<br />
ufo.TEXT_UFOPEDIA<br />
ufo.TEXT_UFOPEDIA_REQUIREMENT<br />
ufo.TEXT_BUILDINGS<br />
ufo.TEXT_BUILDING_INFO<br />
ufo.TEXT_RESEARCH<br />
ufo.TEXT_POPUP<br />
ufo.TEXT_POPUP_INFO<br />
ufo.TEXT_AIRCRAFT_LIST<br />
ufo.TEXT_AIRCRAFT_INFO<br />
ufo.TEXT_MULTISELECTION<br />
ufo.TEXT_PRODUCTION_LIST<br />
ufo.TEXT_PRODUCTION_AMOUNT<br />
ufo.TEXT_PRODUCTION_INFO<br />
ufo.TEXT_EMPLOYEE<br />
ufo.TEXT_MOUSECURSOR_RIGHT<br />
ufo.TEXT_PRODUCTION_QUEUED<br />
ufo.TEXT_STATS_MISSION<br />
ufo.TEXT_STATS_BASES<br />
ufo.TEXT_STATS_NATIONS<br />
ufo.TEXT_STATS_EMPLOYEES<br />
ufo.TEXT_STATS_COSTS<br />
ufo.TEXT_STATS_INSTALLATIONS<br />
ufo.TEXT_STATS_7<br />
ufo.TEXT_BASE_LIST<br />
ufo.TEXT_BASE_INFO<br />
ufo.TEXT_TRANSFER_LIST<br />
ufo.TEXT_TRANSFER_LIST_AMOUNT<br />
ufo.TEXT_TRANSFER_LIST_TRANSFERED<br />
ufo.TEXT_MOUSECURSOR_PLAYERNAMES<br />
ufo.TEXT_CARGO_LIST<br />
ufo.TEXT_CARGO_LIST_AMOUNT<br />
ufo.TEXT_UFOPEDIA_MAILHEADER<br />
ufo.TEXT_UFOPEDIA_MAIL<br />
ufo.TEXT_MARKET_NAMES<br />
ufo.TEXT_MARKET_STORAGE<br />
ufo.TEXT_MARKET_MARKET<br />
ufo.TEXT_MARKET_PRICES<br />
ufo.TEXT_CHAT_WINDOW<br />
ufo.TEXT_AIREQUIP_1<br />
ufo.TEXT_AIREQUIP_2<br />
ufo.TEXT_BASEDEFENCE_LIST<br />
ufo.TEXT_TIPOFTHEDAY<br />
ufo.TEXT_GENERIC<br />
ufo.TEXT_XVI<br />
ufo.TEXT_MOUSECURSOR_TOP<br />
ufo.TEXT_MOUSECURSOR_BOTTOM<br />
ufo.TEXT_MOUSECURSOR_LEFT<br />
ufo.TEXT_MESSAGEOPTIONS<br />
ufo.TEXT_UFORECOVERY_NATIONS<br />
ufo.TEXT_UFORECOVERY_UFOYARDS<br />
ufo.TEXT_UFORECOVERY_CAPACITIES<br />
ufo.TEXT_MATERIAL_STAGES<br />
ufo.TEXT_IRCCONTENT<br />
ufo.TEXT_IRCUSERS<br />
ufo.TEXT_MULTIPLAYER_USERLIST<br />
ufo.TEXT_MULTIPLAYER_USERTEAM<br />
ufo.TEXT_ITEMDESCRIPTION<br />
ufo.TEXT_MISSIONBRIEFING<br />
ufo.TEXT_MISSIONBRIEFING_TITLE<br />
ufo.TEXT_MISSIONBRIEFING_VICTORY_CONDITIONS<br />
ufo.OPTION_LANGUAGES<br />
ufo.OPTION_JOYSTICKS<br />
ufo.OPTION_VIDEO_RESOLUTIONS<br />
ufo.OPTION_SINGLEPLAYER_SKINS<br />
ufo.OPTION_MULTIPLAYER_SKINS<br />
ufo.OPTION_UFOPEDIA<br />
ufo.OPTION_UFOS<br />
ufo.OPTION_DROPSHIPS<br />
ufo.OPTION_BASELIST<br />
ufo.OPTION_TEAMDEFS<br />
ufo.OPTION_PRODUCTION_REQUIREMENTS<br />
ufo.OPTION_CAMPAIGN_LIST<br />
ufo.LINESTRIP_FUNDING<br />
ufo.LINESTRIP_COLOR<br />
ufo.UI_MAX_DATAID<br />
<br />
constants (from enum longlines_t): <br />
<br />
ufo.LONGLINES_WRAP<br />
ufo.LONGLINES_CHOP<br />
ufo.LONGLINES_PRETTYCHOP<br />
ufo.LONGLINES_LAST<br />
<br />
constants (from enum align_t): <br />
<br />
ufo.ALIGN_UL<br />
ufo.ALIGN_UC<br />
ufo.ALIGN_UR<br />
ufo.ALIGN_CL<br />
ufo.ALIGN_CC<br />
ufo.ALIGN_CR<br />
ufo.ALIGN_LL<br />
ufo.ALIGN_LC<br />
ufo.ALIGN_LR<br />
ufo.ALIGN_UL_RSL<br />
ufo.ALIGN_UC_RSL<br />
ufo.ALIGN_UR_RSL<br />
ufo.ALIGN_CL_RSL<br />
ufo.ALIGN_CC_RSL<br />
ufo.ALIGN_CR_RSL<br />
ufo.ALIGN_LL_RSL<br />
ufo.ALIGN_LC_RSL<br />
ufo.ALIGN_LR_RSL<br />
<br />
constants (from enum layoutAlign_t): <br />
<br />
ufo.LAYOUTALIGN_NONE<br />
ufo.LAYOUTALIGN_H_MASK<br />
ufo.LAYOUTALIGN_H_LEFT<br />
ufo.LAYOUTALIGN_H_MIDDLE<br />
ufo.LAYOUTALIGN_H_RIGHT<br />
ufo.LAYOUTALIGN_V_MASK<br />
ufo.LAYOUTALIGN_V_TOP<br />
ufo.LAYOUTALIGN_V_MIDDLE<br />
ufo.LAYOUTALIGN_V_BOTTOM<br />
ufo.LAYOUTALIGN_TOPLEFT<br />
ufo.LAYOUTALIGN_TOP<br />
ufo.LAYOUTALIGN_TOPRIGHT<br />
ufo.LAYOUTALIGN_LEFT<br />
ufo.LAYOUTALIGN_MIDDLE<br />
ufo.LAYOUTALIGN_RIGHT<br />
ufo.LAYOUTALIGN_BOTTOMLEFT<br />
ufo.LAYOUTALIGN_BOTTOM<br />
ufo.LAYOUTALIGN_BOTTOMRIGHT<br />
ufo.LAYOUTALIGN_SPECIAL<br />
ufo.LAYOUTALIGN_FILL<br />
ufo.LAYOUTALIGN_MAX<br />
ufo.LAYOUTALIGN_ENSURE_32BIT<br />
<br />
constants (from enum panelLayout_t): <br />
<br />
ufo.LAYOUT_NONE<br />
ufo.LAYOUT_TOP_DOWN_FLOW<br />
ufo.LAYOUT_LEFT_RIGHT_FLOW<br />
ufo.LAYOUT_BORDER<br />
ufo.LAYOUT_PACK<br />
ufo.LAYOUT_STAR<br />
ufo.LAYOUT_CLIENT<br />
ufo.LAYOUT_COLUMN<br />
ufo.LAYOUT_MAX<br />
ufo.LAYOUT_ENSURE_32BIT<br />
<br />
constants (from enum itemFilterTypes_t): <br />
<br />
ufo.FILTER_S_PRIMARY<br />
ufo.FILTER_S_SECONDARY<br />
ufo.FILTER_S_HEAVY<br />
ufo.FILTER_S_MISC<br />
ufo.FILTER_S_ARMOUR<br />
ufo.FILTER_S_IMPLANT<br />
ufo.MAX_SOLDIER_FILTERTYPES<br />
ufo.FILTER_CRAFTITEM<br />
ufo.FILTER_UGVITEM<br />
ufo.FILTER_AIRCRAFT<br />
ufo.FILTER_DUMMY<br />
ufo.FILTER_DISASSEMBLY<br />
ufo.MAX_FILTERTYPES<br />
ufo.FILTER_ENSURE_32BIT<br />
</pre></div>Xray