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

Public Attributes | List of all members
CUserInterface Class Reference

#include <ui.h>

Public Member Functions

ui.cpp - The user interface globals.
 CUserInterface ()
 
 ~CUserInterface ()
 
void Load ()
 

Public Attributes

bool MouseScroll
 
bool KeyScroll
 Enable mouse scrolling. More...
 
int KeyScrollSpeed
 Key Scroll Speed. More...
 
int MouseScrollSpeed
 Mouse Scroll Speed (screenpixels per mousepixel) More...
 
int MouseScrollSpeedDefault
 Middle-Mouse Scroll Speed (screenpixels per mousepixel) More...
 
int MouseScrollSpeedControl
 Middle-Mouse Scroll Speed with Control pressed. More...
 
PixelPos MouseWarpPos
 
std::string NormalFontColor
 Cursor warp screen position. More...
 
std::string ReverseFontColor
 Color for normal text displayed. More...
 
std::vector< CFillerFillers
 Color for reverse text displayed. More...
 
CResourceInfo Resources [MaxResourceInfo]
 Filler graphics. More...
 
CInfoPanel InfoPanel
 Icon+Text of all resources. More...
 
std::vector< CUnitInfoPanel * > InfoPanelContents
 Info panel. More...
 
std::string DefaultUnitPortrait
 Info panel contents. More...
 
std::vector< CPopup * > ButtonPopups
 Name of the unit portrait to show when there is no selection. More...
 
CUIButtonSingleSelectedButton
 Popup windows for buttons. More...
 
std::vector< CUIButtonSelectedButtons
 Button for single selected unit. More...
 
CFontMaxSelectedFont
 Selected buttons. More...
 
int MaxSelectedTextX
 Font type to use. More...
 
int MaxSelectedTextY
 position to place '+#' text More...
 
CUIButtonSingleTrainingButton
 if > maximum units selected More...
 
std::string SingleTrainingText
 Button for single training. More...
 
CFontSingleTrainingFont
 Text for single training. More...
 
int SingleTrainingTextX
 Font for single traning. More...
 
int SingleTrainingTextY
 X text position single training. More...
 
std::vector< CUIButtonTrainingButtons
 Y text position single training. More...
 
std::string TrainingText
 Training buttons. More...
 
CFontTrainingFont
 Multiple Training Text. More...
 
int TrainingTextX
 Multiple Training Font. More...
 
int TrainingTextY
 Multiple Training X Text position. More...
 
CUIButtonUpgradingButton
 Multiple Training Y Text position. More...
 
CUIButtonResearchingButton
 Button info for upgrade. More...
 
std::vector< CUIButtonTransportingButtons
 Button info for researching. More...
 
std::vector< std::string > LifeBarColorNames
 Button info for transporting. More...
 
std::vector< int > LifeBarPercents
 
std::vector< IntColorLifeBarColorsInt
 
int8_t LifeBarYOffset
 
int8_t LifeBarPadding
 
bool LifeBarBorder
 
CColor CompletedBarColorRGB
 
IntColor CompletedBarColor
 color for completed bar More...
 
bool CompletedBarShadow
 color for completed bar More...
 
CButtonPanel ButtonPanel
 should complete bar have shadow More...
 
CPieMenu PieMenu
 
ViewportModeType ViewportMode
 
CViewportMouseViewport
 Current viewport mode. More...
 
CViewportSelectedViewport
 Viewport containing mouse. More...
 
int NumViewports
 Current selected active viewport. More...
 
CViewport Viewports [MAX_NUM_VIEWPORTS]
 
CMapArea MapArea
 Parameters of all viewports. More...
 
CFontMessageFont
 geometry of the whole map area More...
 
int MessageScrollSpeed
 Font used for messages. More...
 
CUIButton MenuButton
 Scroll speed in seconds for messages. More...
 
CUIButton NetworkMenuButton
 menu button More...
 
CUIButton NetworkDiplomacyButton
 network menu button More...
 
std::vector< CUIUserButtonUserButtons
 network diplomacy button More...
 
CMinimap Minimap
 User buttons. More...
 
IntColor ViewportCursorColor
 minimap More...
 
CStatusLine StatusLine
 minimap cursor color More...
 
CUITimer Timer
 status line More...
 
Vec2i EditorSettingsAreaTopLeft
 game timer More...
 
Vec2i EditorSettingsAreaBottomRight
 
Vec2i EditorButtonAreaTopLeft
 
Vec2i EditorButtonAreaBottomRight
 
int Offset640X
 
int Offset480Y
 Offset for 640x480 X position. More...
 
CursorConfig Point
 Offset for 640x480 Y position. More...
 
CursorConfig Glass
 General pointing cursor. More...
 
CursorConfig Cross
 HourGlass, system is waiting. More...
 
CursorConfig YellowHair
 Multi-select cursor. More...
 
CursorConfig GreenHair
 Yellow action,attack cursor. More...
 
CursorConfig RedHair
 Green action,attack cursor. More...
 
CursorConfig Scroll
 Red action,attack cursor. More...
 
CursorConfig ArrowE
 Cursor for scrolling map around. More...
 
CursorConfig ArrowNE
 Cursor pointing east. More...
 
CursorConfig ArrowN
 Cursor pointing north east. More...
 
CursorConfig ArrowNW
 Cursor pointing north. More...
 
CursorConfig ArrowW
 Cursor pointing north west. More...
 
CursorConfig ArrowSW
 Cursor pointing west. More...
 
CursorConfig ArrowS
 Cursor pointing south west. More...
 
CursorConfig ArrowSE
 Cursor pointing south. More...
 
CGraphicVictoryBackgroundG
 Cursor pointing south east. More...
 
CGraphicDefeatBackgroundG
 Victory background graphic. More...
 

Detailed Description

Defines the user interface.

Constructor & Destructor Documentation

◆ CUserInterface()

CUserInterface::CUserInterface ( )

◆ ~CUserInterface()

CUserInterface::~CUserInterface ( )

Clean up a user interface.

Member Function Documentation

◆ Load()

void CUserInterface::Load ( )

Load the user interface graphics.

Member Data Documentation

◆ ArrowE

CursorConfig CUserInterface::ArrowE

Cursor for scrolling map around.

◆ ArrowN

CursorConfig CUserInterface::ArrowN

Cursor pointing north east.

◆ ArrowNE

CursorConfig CUserInterface::ArrowNE

Cursor pointing east.

◆ ArrowNW

CursorConfig CUserInterface::ArrowNW

Cursor pointing north.

◆ ArrowS

CursorConfig CUserInterface::ArrowS

Cursor pointing south west.

◆ ArrowSE

CursorConfig CUserInterface::ArrowSE

Cursor pointing south.

◆ ArrowSW

CursorConfig CUserInterface::ArrowSW

Cursor pointing west.

◆ ArrowW

CursorConfig CUserInterface::ArrowW

Cursor pointing north west.

◆ ButtonPanel

CButtonPanel CUserInterface::ButtonPanel

should complete bar have shadow

◆ ButtonPopups

std::vector<CPopup *> CUserInterface::ButtonPopups

Name of the unit portrait to show when there is no selection.

◆ CompletedBarColor

IntColor CUserInterface::CompletedBarColor

color for completed bar

◆ CompletedBarColorRGB

CColor CUserInterface::CompletedBarColorRGB

◆ CompletedBarShadow

bool CUserInterface::CompletedBarShadow

color for completed bar

◆ Cross

CursorConfig CUserInterface::Cross

HourGlass, system is waiting.

◆ DefaultUnitPortrait

std::string CUserInterface::DefaultUnitPortrait

Info panel contents.

◆ DefeatBackgroundG

CGraphic* CUserInterface::DefeatBackgroundG

Victory background graphic.

◆ EditorButtonAreaBottomRight

Vec2i CUserInterface::EditorButtonAreaBottomRight

◆ EditorButtonAreaTopLeft

Vec2i CUserInterface::EditorButtonAreaTopLeft

◆ EditorSettingsAreaBottomRight

Vec2i CUserInterface::EditorSettingsAreaBottomRight

◆ EditorSettingsAreaTopLeft

Vec2i CUserInterface::EditorSettingsAreaTopLeft

game timer

◆ Fillers

std::vector<CFiller> CUserInterface::Fillers

Color for reverse text displayed.

◆ Glass

CursorConfig CUserInterface::Glass

General pointing cursor.

◆ GreenHair

CursorConfig CUserInterface::GreenHair

Yellow action,attack cursor.

◆ InfoPanel

CInfoPanel CUserInterface::InfoPanel

Icon+Text of all resources.

◆ InfoPanelContents

std::vector<CUnitInfoPanel *> CUserInterface::InfoPanelContents

Info panel.

◆ KeyScroll

bool CUserInterface::KeyScroll

Enable mouse scrolling.

◆ KeyScrollSpeed

int CUserInterface::KeyScrollSpeed

Key Scroll Speed.

Enable keyboard scrolling

◆ LifeBarBorder

bool CUserInterface::LifeBarBorder

◆ LifeBarColorNames

std::vector<std::string> CUserInterface::LifeBarColorNames

Button info for transporting.

◆ LifeBarColorsInt

std::vector<IntColor> CUserInterface::LifeBarColorsInt

◆ LifeBarPadding

int8_t CUserInterface::LifeBarPadding

◆ LifeBarPercents

std::vector<int> CUserInterface::LifeBarPercents

◆ LifeBarYOffset

int8_t CUserInterface::LifeBarYOffset

◆ MapArea

CMapArea CUserInterface::MapArea

Parameters of all viewports.

◆ MaxSelectedFont

CFont* CUserInterface::MaxSelectedFont

Selected buttons.

◆ MaxSelectedTextX

int CUserInterface::MaxSelectedTextX

Font type to use.

◆ MaxSelectedTextY

int CUserInterface::MaxSelectedTextY

position to place '+#' text

◆ MenuButton

CUIButton CUserInterface::MenuButton

Scroll speed in seconds for messages.

◆ MessageFont

CFont* CUserInterface::MessageFont

geometry of the whole map area

◆ MessageScrollSpeed

int CUserInterface::MessageScrollSpeed

Font used for messages.

◆ Minimap

CMinimap CUserInterface::Minimap

User buttons.

◆ MouseScroll

bool CUserInterface::MouseScroll

◆ MouseScrollSpeed

int CUserInterface::MouseScrollSpeed

Mouse Scroll Speed (screenpixels per mousepixel)

◆ MouseScrollSpeedControl

int CUserInterface::MouseScrollSpeedControl

Middle-Mouse Scroll Speed with Control pressed.

◆ MouseScrollSpeedDefault

int CUserInterface::MouseScrollSpeedDefault

Middle-Mouse Scroll Speed (screenpixels per mousepixel)

◆ MouseViewport

CViewport* CUserInterface::MouseViewport

Current viewport mode.

◆ MouseWarpPos

PixelPos CUserInterface::MouseWarpPos

◆ NetworkDiplomacyButton

CUIButton CUserInterface::NetworkDiplomacyButton

network menu button

◆ NetworkMenuButton

CUIButton CUserInterface::NetworkMenuButton

menu button

◆ NormalFontColor

std::string CUserInterface::NormalFontColor

Cursor warp screen position.

◆ NumViewports

int CUserInterface::NumViewports

Current selected active viewport.

◆ Offset480Y

int CUserInterface::Offset480Y

Offset for 640x480 X position.

◆ Offset640X

int CUserInterface::Offset640X

◆ PieMenu

CPieMenu CUserInterface::PieMenu

◆ Point

CursorConfig CUserInterface::Point

Offset for 640x480 Y position.

◆ RedHair

CursorConfig CUserInterface::RedHair

Green action,attack cursor.

◆ ResearchingButton

CUIButton* CUserInterface::ResearchingButton

Button info for upgrade.

◆ Resources

CResourceInfo CUserInterface::Resources[MaxResourceInfo]

Filler graphics.

◆ ReverseFontColor

std::string CUserInterface::ReverseFontColor

Color for normal text displayed.

◆ Scroll

CursorConfig CUserInterface::Scroll

Red action,attack cursor.

◆ SelectedButtons

std::vector<CUIButton> CUserInterface::SelectedButtons

Button for single selected unit.

◆ SelectedViewport

CViewport* CUserInterface::SelectedViewport

Viewport containing mouse.

◆ SingleSelectedButton

CUIButton* CUserInterface::SingleSelectedButton

Popup windows for buttons.

◆ SingleTrainingButton

CUIButton* CUserInterface::SingleTrainingButton

if > maximum units selected

◆ SingleTrainingFont

CFont* CUserInterface::SingleTrainingFont

Text for single training.

◆ SingleTrainingText

std::string CUserInterface::SingleTrainingText

Button for single training.

◆ SingleTrainingTextX

int CUserInterface::SingleTrainingTextX

Font for single traning.

◆ SingleTrainingTextY

int CUserInterface::SingleTrainingTextY

X text position single training.

◆ StatusLine

CStatusLine CUserInterface::StatusLine

minimap cursor color

◆ Timer

CUITimer CUserInterface::Timer

status line

◆ TrainingButtons

std::vector<CUIButton> CUserInterface::TrainingButtons

Y text position single training.

◆ TrainingFont

CFont* CUserInterface::TrainingFont

Multiple Training Text.

◆ TrainingText

std::string CUserInterface::TrainingText

Training buttons.

◆ TrainingTextX

int CUserInterface::TrainingTextX

Multiple Training Font.

◆ TrainingTextY

int CUserInterface::TrainingTextY

Multiple Training X Text position.

◆ TransportingButtons

std::vector<CUIButton> CUserInterface::TransportingButtons

Button info for researching.

◆ UpgradingButton

CUIButton* CUserInterface::UpgradingButton

Multiple Training Y Text position.

◆ UserButtons

std::vector<CUIUserButton> CUserInterface::UserButtons

network diplomacy button

◆ VictoryBackgroundG

CGraphic* CUserInterface::VictoryBackgroundG

Cursor pointing south east.

Todo:
could use different sounds/speech for the errors Is in gamesounds? SoundConfig PlacementError; /// played on placements errors SoundConfig PlacementSuccess; /// played on placements success SoundConfig Click; /// click noice used often

◆ ViewportCursorColor

IntColor CUserInterface::ViewportCursorColor

minimap

◆ ViewportMode

ViewportModeType CUserInterface::ViewportMode

◆ Viewports

CViewport CUserInterface::Viewports[MAX_NUM_VIEWPORTS]

Viewports currently used

◆ YellowHair

CursorConfig CUserInterface::YellowHair

Multi-select cursor.


The documentation for this class was generated from the following files:
(C) Copyright 1998-2012 by The Stratagus Project under the GNU General Public License.
All trademarks and copyrights on this page are owned by their respective owners.