$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
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <vector>
#include <sstream>
#include "stratagus.h"
#include "unit.h"
#include "unittype.h"
#include "upgrade.h"
#include "interface.h"
#include "ui.h"
#include "player.h"
#include "spells.h"
#include "depend.h"
#include "sound.h"
#include "map.h"
#include "commands.h"
#include "video.h"
#include "font.h"
#include "guichan/key.h"
#include "guichan/sdl/sdlinput.h"
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) |
Make a new button. | |
void | CleanButtons () |
Free memory for buttons. | |
static int | GetButtonStatus (const ButtonAction *button, int UnderCursor) |
static int | GetPopupCostsWidth (const CFont *font, const int *Costs) |
static int | DrawPopupCosts (int x, int y, const CLabel &label, const int *Costs) |
void | DrawPopupUnitInfo (const CUnitType *type, int player_index, CFont *font, Uint32 backgroundColor, int buttonX, int buttonY) |
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 | |||
) |
Make a new button.
FIXME: docu
void CleanButtons | ( | ) |
Free memory for buttons.
Cleanup buttons.
static void DrawPopup | ( | const ButtonAction * | button, | |
const CUIButton * | uibutton | |||
) | [static] |
Draw popup
static int DrawPopupCosts | ( | int | x, | |
int | y, | |||
const CLabel & | label, | |||
const int * | Costs | |||
) | [static] |
void DrawPopupUnitInfo | ( | const CUnitType * | type, | |
int | player_index, | |||
CFont * | font, | |||
Uint32 | backgroundColor, | |||
int | buttonX, | |||
int | buttonY | |||
) |
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 int GetPopupCostsWidth | ( | const CFont * | font, | |
const 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.