$treeview $search $mathjax
Stratagus  2.2.6
$projectbrief
$projectbrief
$searchbox
-->
         _________ __                 __
        /   _____//  |_____________ _/  |______     ____  __ __  ______
        \_____  \\   __\_  __ \__  \\   __\__  \   / ___\|  |  \/  ___/
        /        \|  |  |  | \// __ \|  |  / __ \_/ /_/  >  |  /\___ \
       /_______  /|__|  |__|  (____  /__| (____  /\___  /|____//____  >
               \/                  \/          \//_____/            \/
    ______________________                           ______________________
                          T H E   W A R   B E G I N S
           Stratagus - A free fantasy real time strategy game engine

src/ui/script_ui.cpp File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "script.h"
#include "interface.h"
#include "ui.h"
#include "video.h"
#include "map.h"
#include "menus.h"
#include "font.h"
#include "util.h"
#include "unit.h"
#include "unit_manager.h"
#include "unittype.h"
#include "spells.h"
#include "title.h"

script_ui.cpp - The ui ccl functions.

std::string ClickMissile
 Full Name of the game.
std::string DamageMissile
 FIXME:docu.
std::map< std::string,
ButtonStyle * > 
ButtonStyleHash
 FIXME:docu.
static int HandleCount = 1
CPreference Preference
 Lua handler count.
static int CclSetMouseScrollSpeed (lua_State *l)
static int CclSetMouseScrollSpeedDefault (lua_State *l)
static int CclSetMouseScrollSpeedControl (lua_State *l)
static int CclSetClickMissile (lua_State *l)
static int CclSetDamageMissile (lua_State *l)
static int CclSetMaxOpenGLTexture (lua_State *l)
static int CclSetUseOpenGL (lua_State *l)
static int CclSetVideoResolution (lua_State *l)
static int CclGetVideoResolution (lua_State *l)
static int CclSetVideoFullScreen (lua_State *l)
static int CclGetVideoFullScreen (lua_State *l)
static int CclSetTitleScreens (lua_State *l)
static int CclDefineCursor (lua_State *l)
static int CclSetGameCursor (lua_State *l)
EnumVariable Str2EnumVariable (lua_State *l, const char *s)
 Damage calculation for missile.
static EnumUnit Str2EnumUnit (lua_State *l, const char *s)
static ConditionPanelParseConditionPanel (lua_State *l)
static CContentTypeCclParseContent (lua_State *l)
static int CclDefinePanelContents (lua_State *l)
static int CclDefineViewports (lua_State *l)
static int CclRightButtonAttacks (lua_State *l)
static int CclRightButtonMoves (lua_State *l)
static int CclSetFancyBuildings (lua_State *l)
ButtonStyleFindButtonStyle (const std::string &style)
 Find a button style.
static void ParseButtonStyleProperties (lua_State *l, ButtonStyleProperties *p)
static int CclDefineButtonStyle (lua_State *l)
int AddHandler (lua_State *l)
void CallHandler (unsigned int handle, int value)
static int CclDefineButton (lua_State *l)
void SelectionChanged ()
 Called whenever the units selection is altered.
void SelectedUnitChanged ()
 Called whenever the selected unit was updated.
static int CclSetSelectionStyle (lua_State *l)
static int CclAddMessage (lua_State *l)
static int CclSetGroupKeys (lua_State *l)
static int CclPresentMap (lua_State *l)
static int CclDefineMapSetup (lua_State *l)
void UserInterfaceCclRegister ()
 Register ccl features.

Function Documentation

int AddHandler ( lua_State *  l  ) 

Add a Lua handler FIXME: when should these be freed?

void CallHandler ( unsigned int  handle,
int  value 
)

Call a Lua handler

static int CclAddMessage ( lua_State *  l  )  [static]

Add a new message.

Parameters:
l Lua state.

static int CclDefineButton ( lua_State *  l  )  [static]

Define a button.

Parameters:
l Lua state.

static int CclDefineButtonStyle ( lua_State *  l  )  [static]

Define a button style

Parameters:
l Lua state.

static int CclDefineCursor ( lua_State *  l  )  [static]

Define a cursor.

Parameters:
l Lua state.

static int CclDefineMapSetup ( lua_State *  l  )  [static]

Define the lua file that will build the map

Parameters:
l Lua state.

static int CclDefinePanelContents ( lua_State *  l  )  [static]

Define the Panels. Define what is shown in the panel(text, icon, variables)

Parameters:
l Lua state.
Returns:
0.

static int CclDefineViewports ( lua_State *  l  )  [static]

Define the viewports.

Parameters:
l Lua state.

static int CclGetVideoFullScreen ( lua_State *  l  )  [static]

Get the video fullscreen mode.

Parameters:
l Lua state.

static int CclGetVideoResolution ( lua_State *  l  )  [static]

Get the video resolution.

Parameters:
l Lua state.

static CContentType* CclParseContent ( lua_State *  l  )  [static]

static int CclPresentMap ( lua_State *  l  )  [static]

Set basic map caracteristics.

Parameters:
l Lua state.

static int CclRightButtonAttacks ( lua_State *  l  )  [static]

Fighter right button attacks as default.

Parameters:
l Lua state.

static int CclRightButtonMoves ( lua_State *  l  )  [static]

Fighter right button moves as default.

Parameters:
l Lua state.

static int CclSetClickMissile ( lua_State *  l  )  [static]

Set which missile is used for right click

Parameters:
l Lua state.

static int CclSetDamageMissile ( lua_State *  l  )  [static]

Set which missile shows Damage

Parameters:
l Lua state.

static int CclSetFancyBuildings ( lua_State *  l  )  [static]

Enable/disable the fancy buildings.

Parameters:
l Lua state.

static int CclSetGameCursor ( lua_State *  l  )  [static]

Set the current game cursor.

Parameters:
l Lua state.

static int CclSetGroupKeys ( lua_State *  l  )  [static]

Set the keys which are use for grouping units, helpful for other keyboards

Parameters:
l Lua state.

static int CclSetMaxOpenGLTexture ( lua_State *  l  )  [static]

static int CclSetMouseScrollSpeed ( lua_State *  l  )  [static]

Set speed of mouse scroll

Parameters:
l Lua state.

static int CclSetMouseScrollSpeedControl ( lua_State *  l  )  [static]

Set speed of ctrl-middle-mouse scroll

Parameters:
l Lua state.

static int CclSetMouseScrollSpeedDefault ( lua_State *  l  )  [static]

Set speed of middle-mouse scroll

Parameters:
l Lua state.

static int CclSetSelectionStyle ( lua_State *  l  )  [static]

Set selection style.

Parameters:
l Lua state.

static int CclSetTitleScreens ( lua_State *  l  )  [static]

Default title screens.

Parameters:
l Lua state.

static int CclSetUseOpenGL ( lua_State *  l  )  [static]

static int CclSetVideoFullScreen ( lua_State *  l  )  [static]

Set the video fullscreen mode.

Parameters:
l Lua state.

static int CclSetVideoResolution ( lua_State *  l  )  [static]

Set the video resolution.

Parameters:
l Lua state.

ButtonStyle* FindButtonStyle ( const std::string &  style  ) 

Find a button style.

Find a button style

Parameters:
style Name of the style to find.
Returns:
Button style, NULL if not found.

static void ParseButtonStyleProperties ( lua_State *  l,
ButtonStyleProperties p 
) [static]

Parse button style properties

Parameters:
l Lua state.
p Properties to fill in.

static ConditionPanel* ParseConditionPanel ( lua_State *  l  )  [static]

Parse the condition Panel.

Parameters:
l Lua State.

void SelectedUnitChanged (  ) 

Called whenever the selected unit was updated.

The selected unit has been altered.

void SelectionChanged (  ) 

Called whenever the units selection is altered.

Run the set-selection-changed-hook.

static EnumUnit Str2EnumUnit ( lua_State *  l,
const char *  s 
) [static]

Return enum from string about variable component.

Parameters:
l Lua State.
s string to convert.
Returns:
Corresponding value.
Note:
Stop on error.

EnumVariable Str2EnumVariable ( lua_State *  l,
const char *  s 
)

Damage calculation for missile.

Return enum from string about variable component.

Parameters:
l Lua State.
s string to convert.
Returns:
Corresponding value.
Note:
Stop on error.

void UserInterfaceCclRegister (  ) 

Register ccl features.

Register CCL features for UI.


Variable Documentation

std::map<std::string, ButtonStyle *> ButtonStyleHash

FIXME:docu.

The user interface.

std::string ClickMissile

Full Name of the game.

std::string DamageMissile

FIXME:docu.

Missile to show when you click.

int HandleCount = 1 [static]

Lua handler count.

(C) Copyright 1998-2011 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.