____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"#include <ui.h>
Public Member Functions | |
| CButtonPanel () | |
| void | Draw () |
| void | Update () |
| void | DoClicked (int button) |
| int | DoKey (int key) |
Public Attributes | |
| CGraphic * | G |
| int | X |
| int | Y |
| std::vector< CUIButton > | Buttons |
| SDL_Color | AutoCastBorderColorRGB |
| bool | ShowCommandKey |
Definition at line 239 of file ui.h.
| CButtonPanel::CButtonPanel | ( | ) | [inline] |
| void CButtonPanel::Draw | ( | void | ) |
Draw button panel.
Draw all action buttons.
Definition at line 410 of file botpanel.cpp.
References Assert, ButtonAreaButton, ButtonAreaUnderCursor, CUserInterface::ButtonPanel, Buttons, ButtonUnderCursor, CGraphic::DrawClip(), DrawPopup(), CIcon::DrawUnitIcon(), gcn::Key::ESCAPE, G, GetButtonStatus(), IconConfig::Icon, ButtonAction::Icon, int(), KeyState, KeyStateInput, NumSelected, CUnit::Player, Selected, ShowCommandKey, strcpy_s(), UI, UpdateStatusLineForButton(), X, and Y.
Referenced by UpdateDisplay().
| void CButtonPanel::Update | ( | void | ) |
Update button panel.
Definition at line 697 of file botpanel.cpp.
References CPlayer::IsTeamed(), NumSelected, CUnit::Player, Selected, ThisPlayer, CUnit::Type, UpdateButtonPanelMultipleUnits(), and UpdateButtonPanelSingleUnit().
Referenced by CancelBuildingMode(), DoClicked(), HandleActionTrain(), SelectedUnitChanged(), SelectionChanged(), SendCommand(), and UISelectStateButtonDown().
| void CButtonPanel::DoClicked | ( | int | button | ) |
Handle bottom button clicked.
| button | Button that was clicked. |
Definition at line 740 of file botpanel.cpp.
References _, ButtonAction::Action, Assert, AutoCast(), AutoCastSpell(), AutoRepair(), ButtonAttack, ButtonAttackGround, ButtonBuild, ButtonButton, ButtonCancel, ButtonCancelBuild, ButtonCancelTrain, ButtonHarvest, ButtonMove, CUserInterface::ButtonPanel, ButtonPatrol, ButtonRepair, Buttons, ButtonSpellCast, ButtonStandGround, ButtonStop, ButtonTrain, ButtonUnload, CanMove(), CStatusLine::Clear(), ClearCosts(), GameSound::Click, CMap::CoastOnMap(), CurrentButtonLevel, CursorConfig::Cursor, CursorAction, CursorBuilding, CursorState, CursorStatePoint, CursorStateSelect, CursorValue, GameCursor, GameSounds, CPlayer::IsTeamed(), KeyModifiers, Map, MaxSampleVolume, ModifierControl, ModifierShift, NoUnitP, NumSelected, GameSound::PlacementError, PlayGameSound(), CUserInterface::Point, Selected, SendCommandAutoRepair(), SendCommandAutoSpellCast(), SendCommandCancelTraining(), SendCommandDismiss(), SendCommandStandGround(), SendCommandStopUnit(), SendCommandTrainUnit(), SendCommandUnload(), CStatusLine::Set(), SoundConfig::Sound, SpellTypeTable, CUserInterface::StatusLine, ThisPlayer, UI, UnitActionBuilt, UnitActionStill, UnitActionTrain, UnitTypes, Update(), ButtonAction::Value, X, CUnit::X, Y, CUnit::Y, and CUserInterface::YellowHair.
Referenced by DoKey(), HandlePieMenuMouseSelection(), UIHandleButtonDown(), and UISelectStateButtonDown().
| int CButtonPanel::DoKey | ( | int | key | ) |
Lookup key for bottom panel buttons.
| key | Internal key symbol for pressed key. |
Definition at line 928 of file botpanel.cpp.
References CUserInterface::ButtonPanel, Buttons, gcn::SDLInput::convertKeyCharacter(), DoClicked(), gcn::Key::getValue(), int(), and UI.
Referenced by HandleKeyDown().
Definition at line 254 of file ui.h.
Referenced by CleanUserInterface(), Draw(), EditorUpdateDisplay(), and CUserInterface::Load().
| int CButtonPanel::X |
Definition at line 255 of file ui.h.
Referenced by CalculateVisibleIcons(), DoClicked(), Draw(), DrawPatchIcons(), DrawUnitIcons(), EditorCallbackMouse(), EditorMainLoop(), and EditorUpdateDisplay().
| int CButtonPanel::Y |
Definition at line 256 of file ui.h.
Referenced by CalculateVisibleIcons(), DoClicked(), Draw(), DrawPatchIcons(), DrawUnitIcons(), EditorCallbackMouse(), EditorMainLoop(), and EditorUpdateDisplay().
| std::vector<CUIButton> CButtonPanel::Buttons |
Definition at line 257 of file ui.h.
Referenced by DoClicked(), DoKey(), Draw(), DrawPieMenu(), DrawPopup(), HandleMouseOn(), UpdateButtonPanelMultipleUnits(), and UpdateButtonPanelSingleUnit().
| SDL_Color CButtonPanel::AutoCastBorderColorRGB |
1.5.6