$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 <vector>
#include <string>
#include <map>
#include "SDL.h"
#include "upgrade_structs.h"
#include "cursor.h"
#include "interface.h"
#include "script.h"
#include "minimap.h"
Go to the source code of this file.
Classes | |
class | ButtonStyleProperties |
class | ButtonStyle |
class | CUIButton |
buttons on screen themselves More... | |
class | CViewport |
class | CMapArea |
class | ConditionPanel |
class | CContentType |
class | CContentTypeText |
class | CContentTypeFormattedText |
class | CContentTypeFormattedText2 |
class | CContentTypeIcon |
class | CContentTypeLifeBar |
class | CContentTypeCompleteBar |
class | CUnitInfoPanel |
class | CFiller |
struct | CFiller::bits_map |
class | CButtonPanel |
class | CPieMenu |
class | CResourceInfo |
class | CInfoPanel |
class | CStatusLine |
class | CUITimer |
class | CUserInterface |
class | ButtonActionProxy |
ui.h - The user interface header file. | |
#define | MAX_NUM_VIEWPORTS 8 |
#define | MaxResourceInfo MaxCosts + 2 |
enum | TextAlignment { TextAlignUndefined, TextAlignCenter, TextAlignLeft, TextAlignRight } |
enum | ViewportModeType { VIEWPORT_SINGLE = 0, VIEWPORT_SPLIT_HORIZ, VIEWPORT_SPLIT_HORIZ3, VIEWPORT_SPLIT_VERT, VIEWPORT_QUAD, NUM_VIEWPORT_MODES } |
ButtonActionProxy | CurrentButtons |
Pointer to current buttons. | |
CUserInterface | UI |
Current Selected Buttons. | |
std::map< std::string, ButtonStyle * > | ButtonStyleHash |
The user interface. | |
bool | RightButtonAttacks |
const char | DefaultGroupKeys [] |
right button attacks | |
const char * | UiGroupKeys |
Default group keys. | |
bool | FancyBuildings |
Up to 11 keys used for group selection. | |
void | InitUserInterface () |
Mirror buildings 1 yes, 0 now. | |
void | SaveUserInterface (CFile *file) |
Save the ui state. | |
void | CleanUserInterface () |
Clean up the ui module. | |
void | UserInterfaceCclRegister () |
Register ccl features. | |
ButtonStyle * | FindButtonStyle (const std::string &style) |
Find a button style. | |
void | UIHandleMouseMove (int x, int y) |
Called if the mouse is moved in Normal interface state. | |
void | UIHandleButtonDown (unsigned button) |
Called if any mouse button is pressed down. | |
void | UIHandleButtonUp (unsigned button) |
Called if any mouse button is released up. | |
void | RestrictCursorToViewport () |
Restrict mouse cursor to viewport. | |
void | RestrictCursorToMinimap () |
Restrict mouse cursor to minimap. | |
CViewport * | GetViewport (int x, int y) |
Get viewport for screen pixel position. | |
void | CycleViewportMode (int) |
Cycle through all available viewport modes. | |
void | SetViewportMode (ViewportModeType mode) |
Select viewport mode. | |
void | CheckViewportMode () |
void | UpdateViewports () |
void | MouseScrollMap (int x, int y) |
Use the mouse to scroll the map. | |
bool | GetMouseScroll () |
Check if mouse scrolling is enabled. | |
void | SetMouseScroll (bool enabled) |
Enable/disable scrolling with the mouse. | |
bool | GetKeyScroll () |
Check if keyboard scrolling is enabled. | |
void | SetKeyScroll (bool enabled) |
Enable/disable scrolling with the keyboard. | |
bool | GetGrabMouse () |
Check if mouse grabbing is enabled. | |
void | SetGrabMouse (bool enabled) |
Enable/disable grabbing the mouse. | |
bool | GetLeaveStops () |
Check if scrolling stops when leaving the window. | |
void | SetLeaveStops (bool enabled) |
Enable/disable leaving the window stops scrolling. | |
int | AddHandler (lua_State *l) |
void | CallHandler (unsigned int handle, int value) |
#define MAX_NUM_VIEWPORTS 8 |
#define MaxResourceInfo MaxCosts + 2 |
enum TextAlignment |
enum ViewportModeType |
Enumeration of the different predefined viewport configurations.
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
void CheckViewportMode | ( | ) |
void CleanUserInterface | ( | ) |
Clean up the ui module.
Clean up the user interface module.
void CycleViewportMode | ( | int | step | ) |
Cycle through all available viewport modes.
Cycles through predefined viewport modes (geometry configurations) in order defined by the ViewportMode enumerated type.
step | The size of step used for cycling. Values that make sense are mostly 1 (next viewport mode) and -1 (previous viewport mode). |
ButtonStyle* FindButtonStyle | ( | const std::string & | style | ) |
Find a button style.
Find a button style
style | Name of the style to find. |
bool GetGrabMouse | ( | ) |
Check if mouse grabbing is enabled.
Check if mouse grabbing is enabled
bool GetKeyScroll | ( | ) |
Check if keyboard scrolling is enabled.
Check if keyboard scrolling is enabled
bool GetLeaveStops | ( | ) |
Check if scrolling stops when leaving the window.
Check if scrolling stops when leaving the window
bool GetMouseScroll | ( | ) |
Check if mouse scrolling is enabled.
Check if mouse scrolling is enabled
CViewport* GetViewport | ( | int | x, | |
int | y | |||
) |
Get viewport for screen pixel position.
Takes coordinates of a pixel in stratagus's window and computes the map viewport which contains this pixel.
x | x pixel coordinate with origin at UL corner of screen | |
y | y pixel coordinate with origin at UL corner of screen |
void InitUserInterface | ( | ) |
Mirror buildings 1 yes, 0 now.
Initialize the ui
Initialize the user interface.
void MouseScrollMap | ( | int | x, | |
int | y | |||
) |
Use the mouse to scroll the map.
Use the mouse to scroll the map
x | Screen X position. | |
y | Screen Y position. |
void RestrictCursorToMinimap | ( | ) |
Restrict mouse cursor to minimap.
Restrict mouse cursor to minimap
void RestrictCursorToViewport | ( | ) |
Restrict mouse cursor to viewport.
Restrict mouse cursor to viewport.
void SaveUserInterface | ( | CFile * | file | ) |
Save the ui state.
Save the user interface module.
file | Save file handle |
void SetGrabMouse | ( | bool | enabled | ) |
Enable/disable grabbing the mouse.
Enable/disable grabbing the mouse
enabled | True to enable mouse grabbing, false to disable |
void SetKeyScroll | ( | bool | enabled | ) |
Enable/disable scrolling with the keyboard.
Enable/disable scrolling with the keyboard
enabled | True to enable keyboard scrolling, false to disable |
void SetLeaveStops | ( | bool | enabled | ) |
Enable/disable leaving the window stops scrolling.
Enable/disable leaving the window stops scrolling
enabled | True to stop scrolling, false to disable |
void SetMouseScroll | ( | bool | enabled | ) |
Enable/disable scrolling with the mouse.
Enable/disable scrolling with the mouse
enabled | True to enable mouse scrolling, false to disable |
void SetViewportMode | ( | ViewportModeType | new_mode | ) |
Select viewport mode.
Sets up (calls geometry setup routines for) a new viewport mode.
new_mode | New mode's number. |
void UIHandleButtonDown | ( | unsigned | button | ) |
Called if any mouse button is pressed down.
Called if mouse button pressed down.
button | Button pressed down. |
Detect long left selection click
Detect double left click
void UIHandleButtonUp | ( | unsigned | button | ) |
Called if any mouse button is released up.
Called if mouse button released.
button | Button released. |
void UIHandleMouseMove | ( | int | x, | |
int | y | |||
) |
Called if the mouse is moved in Normal interface state.
Handle movement of the cursor.
x | Screen X position. | |
y | Screen Y position. |
void UpdateViewports | ( | ) |
void UserInterfaceCclRegister | ( | ) |
Register ccl features.
Register CCL features for UI.
std::map<std::string, ButtonStyle *> ButtonStyleHash |
The user interface.
Hash table of all the button styles
Pointer to current buttons.
const char DefaultGroupKeys[] |
right button attacks
bool FancyBuildings |
Up to 11 keys used for group selection.
bool RightButtonAttacks |
Current Selected Buttons.
Current Selected Buttons.
The user interface configuration
const char* UiGroupKeys |
Default group keys.