$treeview $search $mathjax
Stratagus
2.2.7
$projectbrief
|
$projectbrief
|
$searchbox |
_________ __ __ / _____// |_____________ _/ |______ ____ __ __ ______ \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ \ /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > \/ \/ \//_____/ \/ ______________________ ______________________ T H E W A R B E G I N S Stratagus - A free fantasy real time strategy game engine
#include "stratagus.h"
#include "ui.h"
#include "actions.h"
#include "commands.h"
#include "depend.h"
#include "font.h"
#include "guichan/key.h"
#include "guichan/sdl/sdlinput.h"
#include "interface.h"
#include "map.h"
#include "player.h"
#include "sound.h"
#include "spells.h"
#include "translate.h"
#include "trigger.h"
#include "unit.h"
#include "unittype.h"
#include "upgrade.h"
#include "video.h"
#include <ctype.h>
#include <vector>
#include <sstream>
botpanel.cpp - The bottom panel. | |
int | CurrentButtonLevel |
for unit buttons sub-menus etc. | |
std::vector< ButtonAction * > | UnitButtonTable |
All buttons for units. | |
ButtonActionProxy | CurrentButtons |
Pointer to current buttons. | |
void | InitButtons () |
Generate all buttons. | |
int | AddButton (int pos, int level, const std::string &icon_ident, ButtonCmd action, const std::string &value, const ButtonCheckFunc func, const std::string &allow, const std::string &hint, const std::string &descr, const std::string &sound, const std::string &cursor, const std::string &umask, const std::string &popup) |
Make a new button. | |
void | CleanButtons () |
Free memory for buttons. | |
static int | GetButtonStatus (const ButtonAction &button, int UnderCursor) |
static bool | CanShowPopupContent (const PopupConditionPanel *condition, const ButtonAction &button, CUnitType *type) |
static void | GetPopupSize (const CPopup &popup, const ButtonAction &button, int &popupWidth, int &popupHeight, int *Costs) |
static void | DrawPopup (const ButtonAction &button, const CUIButton &uibutton) |
void | UpdateStatusLineForButton (const ButtonAction &button) |
Update the status line with hints from the button. | |
static bool | IsButtonAllowed (const CUnit &unit, const ButtonAction &buttonaction) |
static ButtonAction * | UpdateButtonPanelMultipleUnits () |
static ButtonAction * | UpdateButtonPanelSingleUnit (const CUnit &unit) |
int AddButton | ( | int | pos, | |
int | level, | |||
const std::string & | icon_ident, | |||
ButtonCmd | action, | |||
const std::string & | value, | |||
const ButtonCheckFunc | func, | |||
const std::string & | allow, | |||
const std::string & | hint, | |||
const std::string & | descr, | |||
const std::string & | sound, | |||
const std::string & | cursor, | |||
const std::string & | umask, | |||
const std::string & | popup | |||
) |
Make a new button.
FIXME: docu
static bool CanShowPopupContent | ( | const PopupConditionPanel * | condition, | |
const ButtonAction & | button, | |||
CUnitType * | type | |||
) | [static] |
Tell if we can show the popup content. verify each sub condition for that.
condition | condition to verify. | |
unit | unit that certain condition can refer. |
void CleanButtons | ( | ) |
Free memory for buttons.
Cleanup buttons.
static void DrawPopup | ( | const ButtonAction & | button, | |
const CUIButton & | uibutton | |||
) | [static] |
Draw popup
static int GetButtonStatus | ( | const ButtonAction & | button, | |
int | UnderCursor | |||
) | [static] |
Return Status of button.
button | button to check status | |
UnderCursor | Current Button Under Cursor |
Icon(Active | Selected | Clicked | AutoCast | Disabled).
static void GetPopupSize | ( | const CPopup & | popup, | |
const ButtonAction & | button, | |||
int & | popupWidth, | |||
int & | popupHeight, | |||
int * | Costs | |||
) | [static] |
void InitButtons | ( | ) |
Generate all buttons.
Initialize the buttons.
static bool IsButtonAllowed | ( | const CUnit & | unit, | |
const ButtonAction & | buttonaction | |||
) | [static] |
static ButtonAction* UpdateButtonPanelMultipleUnits | ( | ) | [static] |
static ButtonAction* UpdateButtonPanelSingleUnit | ( | const CUnit & | unit | ) | [static] |
Update bottom panel for single unit. or unit group with the same type.
unit | unit which has actions shown with buttons. |
void UpdateStatusLineForButton | ( | const ButtonAction & | button | ) |
Update the status line with hints from the button.
Update the status line with hints from the button
button | Button |
for unit buttons sub-menus etc.
vladi: used for unit buttons sub-menus etc
Pointer to current buttons.
std::vector<ButtonAction *> UnitButtonTable |
All buttons for units.