Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Formation and Status merge

merged some of the code from formation to status

still buggy tho...

second option box + protrait swap

code cleanup
  • Loading branch information...
commit 9ad448ffb3e49920b20d36c47e410a2d3d0fda12 1 parent b95583e
@IkarusDowned IkarusDowned authored
View
114 src/modes/menu/menu.cpp
@@ -210,8 +210,7 @@ void MainMenuState::Reset()
std::vector<ustring> options;
options.push_back(UTranslate("Inventory"));
options.push_back(UTranslate("Skills"));
- options.push_back(UTranslate("Status"));
- options.push_back(UTranslate("Formation"));
+ options.push_back(UTranslate("Party"));
// Add strings and set default selection.
_options.SetOptions(options);
@@ -229,10 +228,7 @@ AbstractMenuState* MainMenuState::GetTransitionState(uint32 selection)
return &(_menu_mode->_skills_state);
break;
case MAIN_OPTIONS_STATUS:
- return &(_menu_mode->_status_state);
- break;
- case MAIN_OPTIONS_FORMATION:
- return &(_menu_mode->_formation_state);
+ return &(_menu_mode->_party_state);
break;
default:
PRINT_ERROR << "MENU ERROR: Invalid option in " << GetStateName() << "::GetTransitionState" << std::endl;
@@ -253,69 +249,19 @@ void MainMenuState::_OnDraw()
_menu_mode->_inventory_window.Draw();
break;
- case MAIN_OPTIONS_STATUS:
- _menu_mode->_status_window.Draw();
- break;
-
case MAIN_OPTIONS_SKILLS:
_menu_mode->_skills_window.Draw();
break;
- case MAIN_OPTIONS_FORMATION:
+
+ case MAIN_OPTIONS_STATUS:
default:
- _menu_mode->_formation_window.Draw();
+ _menu_mode->_party_window.Draw();
break;
} // switch draw_window
}
-void FormationState::_ActiveWindowUpdate()
-{
- _menu_mode->_formation_window.Update();
-}
-bool FormationState::_IsActive()
-{
- return _menu_mode->_formation_window.IsActive();
-}
-
-void FormationState::Reset()
-{
- // setup the save options box
- SetupOptionBoxCommonSettings(&_options);
- _options.SetDimensions(415.0f, 50.0f, FORMATION_OPTIONS_SIZE, 1, FORMATION_OPTIONS_SIZE, 1);
-
- // Generate the strings
- std::vector<ustring> options;
- options.push_back(UTranslate("Switch"));
- options.push_back(UTranslate("Back"));
-
- // Add strings and set default selection.
- _options.SetOptions(options);
- _options.SetSelection(FORMATION_OPTIONS_SWITCH);
-}
-AbstractMenuState* FormationState::GetTransitionState(uint32 selection)
-{
- switch(selection)
- {
- case FORMATION_OPTIONS_BACK:
- return &(_menu_mode->_main_menu_state);
- break;
- case FORMATION_OPTIONS_SWITCH:
- _menu_mode->_formation_window.Activate(true);
- default:
- break;
-
- };
- return NULL;
-}
-void FormationState::_OnDraw()
-{
-
- AbstractMenuState::_DrawBottomMenu();
- _menu_mode->_formation_window.Draw();
-
-}
-
void InventoryState::Reset()
{
// Setup the option box
@@ -428,39 +374,39 @@ void InventoryState::_DrawBottomMenu()
}
-void StatusState::_ActiveWindowUpdate()
+void PartyState::_ActiveWindowUpdate()
{
- _menu_mode->_status_window.Update();
+ _menu_mode->_party_window.Update();
}
-bool StatusState::_IsActive(){
- return _menu_mode->_status_window.IsActive();
+bool PartyState::_IsActive(){
+ return _menu_mode->_party_window.IsActive();
}
-void StatusState::Reset()
+void PartyState::Reset()
{
// Setup the status option box
SetupOptionBoxCommonSettings(&_options);
- _options.SetDimensions(415.0f, 50.0f, STATUS_OPTIONS_SIZE, 1, STATUS_OPTIONS_SIZE, 1);
+ _options.SetDimensions(415.0f, 50.0f, PARTY_OPTIONS_SIZE, 1, PARTY_OPTIONS_SIZE, 1);
// Generate the strings
std::vector<ustring> options;
- options.push_back(UTranslate("View"));
+ options.push_back(UTranslate("View/Reorder"));
options.push_back(UTranslate("Back"));
// Add strings and set default selection.
_options.SetOptions(options);
- _options.SetSelection(STATUS_OPTIONS_VIEW);
+ _options.SetSelection(PARTY_OPTIONS_VIEW_ALTER);
}
-AbstractMenuState* StatusState::GetTransitionState(uint32 selection)
+AbstractMenuState* PartyState::GetTransitionState(uint32 selection)
{
switch(selection)
{
- case STATUS_OPTIONS_BACK:
+ case PARTY_OPTIONS_BACK:
return &(_menu_mode->_main_menu_state);
- case STATUS_OPTIONS_VIEW:
- _menu_mode->_status_window.Activate(true);
+ case PARTY_OPTIONS_VIEW_ALTER:
+ _menu_mode->_party_window.Activate(true);
break;
default:
break;
@@ -468,11 +414,11 @@ AbstractMenuState* StatusState::GetTransitionState(uint32 selection)
return NULL;
}
-void StatusState::_OnDraw()
+void PartyState::_OnDraw()
{
AbstractMenuState::_DrawBottomMenu();
- _menu_mode->_status_window.Draw();
+ _menu_mode->_party_window.Draw();
}
@@ -845,9 +791,8 @@ const uint32 win_width = 208;
MenuMode::MenuMode(const ustring &locale_name, const std::string &locale_image) :
_main_menu_state(this),
- _formation_state(this),
_inventory_state(this),
- _status_state(this),
+ _party_state(this),
_skills_state(this),
_equip_state(this),
_message_window(NULL)
@@ -907,9 +852,9 @@ MenuMode::MenuMode(const ustring &locale_name, const std::string &locale_image)
_main_options_window.Create(static_cast<float>(win_width * 4 + 16), 60, ~VIDEO_MENU_EDGE_BOTTOM, VIDEO_MENU_EDGE_BOTTOM);
_main_options_window.SetPosition(static_cast<float>(win_start_x), static_cast<float>(win_start_y - 50));
- // Set up the status window
- _status_window.Create(static_cast<float>(win_width * 4 + 16), 448, VIDEO_MENU_EDGE_ALL);
- _status_window.SetPosition(static_cast<float>(win_start_x), static_cast<float>(win_start_y + 10));
+ // Set up the party window
+ _party_window.Create(static_cast<float>(win_width * 4 + 16), 448, VIDEO_MENU_EDGE_ALL);
+ _party_window.SetPosition(static_cast<float>(win_start_x), static_cast<float>(win_start_y + 10));
//Set up the skills window
_skills_window.Create(static_cast<float>(win_width * 4 + 16), 448, VIDEO_MENU_EDGE_ALL);
@@ -923,10 +868,6 @@ MenuMode::MenuMode(const ustring &locale_name, const std::string &locale_image)
_inventory_window.Create(static_cast<float>(win_width * 4 + 16), 448, VIDEO_MENU_EDGE_ALL);
_inventory_window.SetPosition(static_cast<float>(win_start_x), static_cast<float>(win_start_y + 10));
- // Set up the formation window
- _formation_window.Create(static_cast<float>(win_width * 4 + 16), 448, VIDEO_MENU_EDGE_ALL);
- _formation_window.SetPosition(static_cast<float>(win_start_x), static_cast<float>(win_start_y + 10));
-
_current_menu_state = &_main_menu_state;
// Load menu sounds
@@ -958,11 +899,10 @@ MenuMode::~MenuMode()
_character_window2.Destroy();
_character_window3.Destroy();
_inventory_window.Destroy();
- _status_window.Destroy();
+ _party_window.Destroy();
_skills_window.Destroy();
_main_options_window.Destroy();
_equip_window.Destroy();
- _formation_window.Destroy();
// Free sounds
_menu_sounds["confirm"].FreeAudio();
@@ -990,18 +930,16 @@ void MenuMode::Reset()
_character_window2.Show();
_character_window3.Show();
_inventory_window.Show();
- _status_window.Show();
+ _party_window.Show();
_skills_window.Show();
_equip_window.Show();
- _formation_window.Show();
_inventory_window.Activate(false);
// Reset states
_main_menu_state.Reset();
- _formation_state.Reset();
_inventory_state.Reset();
- _status_state.Reset();
+ _party_state.Reset();
_skills_state.Reset();
_equip_state.Reset();
View
60 src/modes/menu/menu.h
@@ -142,7 +142,6 @@ class MainMenuState : virtual public AbstractMenuState {
MAIN_OPTIONS_INVENTORY,
MAIN_OPTIONS_SKILLS,
MAIN_OPTIONS_STATUS,
- MAIN_OPTIONS_FORMATION,
MAIN_OPTIONS_SIZE
};
@@ -160,32 +159,6 @@ class MainMenuState : virtual public AbstractMenuState {
};
/**
-*** \brief Formation state. This state allows players to change their character position
-**/
-class FormationState : virtual public AbstractMenuState {
-public:
- //! \brief transition states for formation state
- enum FORMATION_CATEGORY {
- FORMATION_OPTIONS_SWITCH,
- FORMATION_OPTIONS_BACK,
- FORMATION_OPTIONS_SIZE
- };
-
- FormationState(MenuMode* menu_mode):
- AbstractMenuState("Formation Menu",menu_mode)
- {}
- ~FormationState(){}
- void Reset();
- AbstractMenuState* GetTransitionState(uint32 selection);
-
-
-protected:
-
- void _OnDraw();
- void _ActiveWindowUpdate();
- bool _IsActive();
-};
-/**
*** \brief Inventory State. Handles user interactions for item use and equiping
**/
class InventoryState : virtual public AbstractMenuState {
@@ -213,22 +186,23 @@ class InventoryState : virtual public AbstractMenuState {
};
/**
-*** \brief Status state. shows the user the character status information
+*** \brief Party state. shows the user the character status information. Allows
+*** switching of formation
**/
-class StatusState : virtual public AbstractMenuState {
+class PartyState : virtual public AbstractMenuState {
public:
- enum STATUS_CATEGORY {
- STATUS_OPTIONS_VIEW,
- STATUS_OPTIONS_BACK,
- STATUS_OPTIONS_SIZE
+ enum PARTY_CATEGORY {
+ PARTY_OPTIONS_VIEW_ALTER,
+ PARTY_OPTIONS_BACK,
+ PARTY_OPTIONS_SIZE
};
- //! \brief Status state constructor
- StatusState(MenuMode* menu_mode):
- AbstractMenuState("Status State",menu_mode)
+ //! \brief Party state constructor
+ PartyState(MenuMode* menu_mode):
+ AbstractMenuState("Party State",menu_mode)
{}
- ~StatusState(){}
+ ~PartyState(){}
void Reset();
AbstractMenuState* GetTransitionState(uint32 selection);
protected:
@@ -305,16 +279,14 @@ class MenuMode : public hoa_mode_manager::GameMode
{
friend class private_menu::CharacterWindow;
friend class private_menu::InventoryWindow;
- friend class private_menu::StatusWindow;
+ friend class private_menu::PartyWindow;
friend class private_menu::SkillsWindow;
friend class private_menu::EquipWindow;
- friend class private_menu::FormationWindow;
friend class private_menu::AbstractMenuState;
friend class private_menu::MainMenuState;
- friend class private_menu::FormationState;
friend class private_menu::InventoryState;
- friend class private_menu::StatusState;
+ friend class private_menu::PartyState;
friend class private_menu::SkillsState;
friend class private_menu::EquipState;
public:
@@ -382,9 +354,8 @@ class MenuMode : public hoa_mode_manager::GameMode
**/
//@{
private_menu::MainMenuState _main_menu_state;
- private_menu::FormationState _formation_state;
private_menu::InventoryState _inventory_state;
- private_menu::StatusState _status_state;
+ private_menu::PartyState _party_state;
private_menu::SkillsState _skills_state;
private_menu::EquipState _equip_state;
//@}
@@ -397,10 +368,9 @@ class MenuMode : public hoa_mode_manager::GameMode
private_menu::CharacterWindow _character_window2;
private_menu::CharacterWindow _character_window3;
private_menu::InventoryWindow _inventory_window;
- private_menu::StatusWindow _status_window;
+ private_menu::PartyWindow _party_window;
private_menu::SkillsWindow _skills_window;
private_menu::EquipWindow _equip_window;
- private_menu::FormationWindow _formation_window;
MessageWindow *_message_window;
//! \brief A map of the sounds used while in MenuMode
View
262 src/modes/menu/menu_views.cpp
@@ -11,6 +11,7 @@
* \file menu_views.cpp
* \author Daniel Steuernol steu@allacrost.org
* \author Andy Gardner chopperdave@allacrost.org
+ * \author Nik Nadig (IkarusDowned) nihonnik@gmail.com
* \brief Source file for various menu views.
*****************************************************************************/
@@ -454,11 +455,11 @@ void InventoryWindow::Draw()
////////////////////////////////////////////////////////////////////////////////
-// StatusWindow Class
+// PartyWindow Class
////////////////////////////////////////////////////////////////////////////////
-StatusWindow::StatusWindow() :
- _char_select_active(false)
+PartyWindow::PartyWindow() :
+ _char_select_active(FORM_ACTIVE_NONE)
{
// Get party size for iteration
uint32 partysize = GlobalManager->GetActiveParty()->GetPartySize();
@@ -473,27 +474,29 @@ StatusWindow::StatusWindow() :
// Init char select option box
_InitCharSelect();
-} // StatusWindow::StatusWindow()
+} // PartyWindow::PartyWindow()
-StatusWindow::~StatusWindow()
+PartyWindow::~PartyWindow()
{
}
// Activate/deactivate window
-void StatusWindow::Activate(bool new_value)
+void PartyWindow::Activate(bool new_value)
{
- _char_select_active = new_value;
-
- if(_char_select_active)
+ if(new_value) {
+ _char_select_active = FORM_ACTIVE_CHAR;
_char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
- else
+ } else {
+ _char_select_active = FORM_ACTIVE_NONE;
_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
+ _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
+ }
}
-void StatusWindow::_InitCharSelect()
+void PartyWindow::_InitCharSelect()
{
//character selection set up
std::vector<ustring> options;
@@ -507,6 +510,14 @@ void StatusWindow::_InitCharSelect()
_char_select.SetVerticalWrapMode(VIDEO_WRAP_MODE_STRAIGHT);
_char_select.SetOptionAlignment(VIDEO_X_LEFT, VIDEO_Y_CENTER);
+ _second_char_select.SetPosition(72.0f, 109.0f);
+ _second_char_select.SetDimensions(360.0f, 432.0f, 1, 4, 1, 4);
+ _second_char_select.SetCursorOffset(-50.0f, -6.0f);
+ _second_char_select.SetTextStyle(TextStyle("text20"));
+ _second_char_select.SetHorizontalWrapMode(VIDEO_WRAP_MODE_SHIFTED);
+ _second_char_select.SetVerticalWrapMode(VIDEO_WRAP_MODE_STRAIGHT);
+ _second_char_select.SetOptionAlignment(VIDEO_X_LEFT, VIDEO_Y_CENTER);
+
// Use blank string so cursor can point somewhere
for(uint32 i = 0; i < size; i++) {
options.push_back(MakeUnicodeString(" "));
@@ -515,32 +526,88 @@ void StatusWindow::_InitCharSelect()
_char_select.SetOptions(options);
_char_select.SetSelection(0);
_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
+
+ _second_char_select.SetOptions(options);
+ _second_char_select.SetSelection(0);
+ _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
}
// Updates the status window
-void StatusWindow::Update()
+void PartyWindow::Update()
{
- // check input values
- if(InputManager->UpPress()) {
- _char_select.InputUp();
- } else if(InputManager->DownPress()) {
- _char_select.InputDown();
- } else if(InputManager->CancelPress()) {
- _char_select.InputCancel();
+ // Points to the active option box
+ OptionBox *active_option = NULL;
+ //choose correct menu
+ switch(_char_select_active) {
+ case FORM_ACTIVE_CHAR:
+ active_option = &_char_select;
+ break;
+ case FORM_ACTIVE_SECOND:
+ active_option = &_second_char_select;
+ break;
}
- if(_char_select.GetEvent() == VIDEO_OPTION_CANCEL) {
- Activate(false);
- MenuMode::CurrentInstance()->_menu_sounds["cancel"].Play();
+ // Handle the appropriate input events
+ if(InputManager->ConfirmPress()) {
+ active_option->InputConfirm();
+ } else if(InputManager->CancelPress()) {
+ active_option->InputCancel();
+ } else if(InputManager->LeftPress()) {
+ active_option->InputLeft();
+ } else if(InputManager->RightPress()) {
+ active_option->InputRight();
+ } else if(InputManager->UpPress()) {
+ active_option->InputUp();
+ } else if(InputManager->DownPress()) {
+ active_option->InputDown();
}
+
+ uint32 event = active_option->GetEvent();
+ active_option->Update();
+
+ switch(_char_select_active) {
+ case FORM_ACTIVE_CHAR:
+ if(event == VIDEO_OPTION_CONFIRM) {
+ _char_select_active = FORM_ACTIVE_SECOND;
+ _char_select.SetCursorState(VIDEO_CURSOR_STATE_DARKEN);
+ _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
+ MenuMode::CurrentInstance()->_menu_sounds["confirm"].Play();
+ } else if(event == VIDEO_OPTION_CANCEL) {
+ Activate(false);
+ MenuMode::CurrentInstance()->_menu_sounds["cancel"].Play();
+ }
+ break;
+
+ case FORM_ACTIVE_SECOND:
+ if(event == VIDEO_OPTION_CONFIRM) {
+ // Switch Characters
+ GlobalManager->SwapCharactersByIndex(_char_select.GetSelection(), _second_char_select.GetSelection());
+ std::swap(_full_portraits[_char_select.GetSelection()],_full_portraits[_second_char_select.GetSelection()]);
+
+ // Update the character's view
+ MenuMode::CurrentInstance()->ReloadCharacterWindows();
+
+ _char_select_active = FORM_ACTIVE_CHAR;
+ _char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
+ _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
+ } else if(event == VIDEO_OPTION_CANCEL) {
+ _char_select_active = FORM_ACTIVE_CHAR;
+ _char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
+ _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
+ MenuMode::CurrentInstance()->_menu_sounds["cancel"].Play();
+ }
+ break;
+ } // switch
_char_select.Update();
-} // void StatusWindow::Update()
+} // void PartyWindow::Update()
-// Draws the status window
-void StatusWindow::Draw()
+// Draws the party window
+void PartyWindow::Draw()
{
MenuWindow::Draw();
+ _char_select.Draw();
+ _second_char_select.Draw();
GlobalCharacter *ch = dynamic_cast<GlobalCharacter *>(GlobalManager->GetActiveParty()->GetActorAtIndex(_char_select.GetSelection()));
@@ -597,8 +664,8 @@ void StatusWindow::Draw()
VideoManager->SetDrawFlags(VIDEO_X_LEFT, VIDEO_Y_TOP, 0);
- _char_select.Draw();
-} // void StatusWindow::Draw()
+
+} // void PartyWindow::Draw()
////////////////////////////////////////////////////////////////////////////////
// SkillsWindow Class
@@ -1421,147 +1488,6 @@ void EquipWindow::Draw()
} // void EquipWindow::Draw()
-
-FormationWindow::FormationWindow() : _active_box(FORM_ACTIVE_NONE)
-{
- _InitCharSelect();
-}
-
-
-FormationWindow::~FormationWindow()
-{
-}
-
-
-void FormationWindow::_InitCharSelect()
-{
- //character selection set up
- std::vector<ustring> options;
- uint32 size = GlobalManager->GetActiveParty()->GetPartySize();
-
- _char_select.SetPosition(72.0f, 109.0f);
- _char_select.SetDimensions(360.0f, 432.0f, 1, 4, 1, 4);
- _char_select.SetCursorOffset(-50.0f, -6.0f);
- _char_select.SetTextStyle(TextStyle("text20"));
- _char_select.SetHorizontalWrapMode(VIDEO_WRAP_MODE_SHIFTED);
- _char_select.SetVerticalWrapMode(VIDEO_WRAP_MODE_STRAIGHT);
- _char_select.SetOptionAlignment(VIDEO_X_LEFT, VIDEO_Y_CENTER);
-
- _second_char_select.SetPosition(72.0f, 109.0f);
- _second_char_select.SetDimensions(360.0f, 432.0f, 1, 4, 1, 4);
- _second_char_select.SetCursorOffset(-50.0f, -6.0f);
- _second_char_select.SetTextStyle(TextStyle("text20"));
- _second_char_select.SetHorizontalWrapMode(VIDEO_WRAP_MODE_SHIFTED);
- _second_char_select.SetVerticalWrapMode(VIDEO_WRAP_MODE_STRAIGHT);
- _second_char_select.SetOptionAlignment(VIDEO_X_LEFT, VIDEO_Y_CENTER);
-
-
- // Use blank string so cursor can point somewhere
- for(uint32 i = 0; i < size; i++) {
- options.push_back(MakeUnicodeString(" "));
- }
-
- _char_select.SetOptions(options);
- _char_select.SetSelection(0);
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
-
- _second_char_select.SetOptions(options);
- _second_char_select.SetSelection(0);
- _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
-
-}
-
-
-void FormationWindow::Update()
-{
- // Points to the active option box
- OptionBox *active_option = NULL;
-
- //choose correct menu
- switch(_active_box) {
- case FORM_ACTIVE_CHAR:
- active_option = &_char_select;
- break;
- case FORM_ACTIVE_SECOND:
- active_option = &_second_char_select;
- break;
- }
-
- // Handle the appropriate input events
- if(InputManager->ConfirmPress()) {
- active_option->InputConfirm();
- } else if(InputManager->CancelPress()) {
- active_option->InputCancel();
- } else if(InputManager->LeftPress()) {
- active_option->InputLeft();
- } else if(InputManager->RightPress()) {
- active_option->InputRight();
- } else if(InputManager->UpPress()) {
- active_option->InputUp();
- } else if(InputManager->DownPress()) {
- active_option->InputDown();
- }
-
- uint32 event = active_option->GetEvent();
- active_option->Update();
-
- switch(_active_box) {
- case FORM_ACTIVE_CHAR:
- if(event == VIDEO_OPTION_CONFIRM) {
- _active_box = FORM_ACTIVE_SECOND;
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_DARKEN);
- _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
- MenuMode::CurrentInstance()->_menu_sounds["confirm"].Play();
- } else if(event == VIDEO_OPTION_CANCEL) {
- Activate(false);
- MenuMode::CurrentInstance()->_menu_sounds["cancel"].Play();
- }
- break;
-
- case FORM_ACTIVE_SECOND:
- if(event == VIDEO_OPTION_CONFIRM) {
- // Switch Characters
- GlobalManager->SwapCharactersByIndex(_char_select.GetSelection(), _second_char_select.GetSelection());
-
- // Update the character's view
- MenuMode::CurrentInstance()->ReloadCharacterWindows();
-
- _active_box = FORM_ACTIVE_CHAR;
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
- _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
- } else if(event == VIDEO_OPTION_CANCEL) {
- _active_box = FORM_ACTIVE_CHAR;
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
- _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
- MenuMode::CurrentInstance()->_menu_sounds["cancel"].Play();
- }
- break;
- } // switch
- _char_select.Update();
-}
-
-
-void FormationWindow::Draw()
-{
- MenuWindow::Draw();
- _char_select.Draw();
- _second_char_select.Draw();
-}
-
-
-void FormationWindow::Activate(bool new_status)
-{
- if(new_status) {
- _active_box = FORM_ACTIVE_CHAR;
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_VISIBLE);
- } else {
- _active_box = FORM_ACTIVE_NONE;
- _char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
- _second_char_select.SetCursorState(VIDEO_CURSOR_STATE_HIDDEN);
- }
-}
-
-
} // namespace private_menu
View
69 src/modes/menu/menu_views.h
@@ -11,6 +11,7 @@
*** \file menu_views.h
*** \author Daniel Steuernol steu@allacrost.org
*** \author Andy Gardner chopperdave@allacrost.org
+*** \author Nik Nadig (IkarusDowned) nihonnik@gmail.com
*** \brief Header file for various menu views.
***
*** This code handles the different menu windows that the user will see while the
@@ -91,7 +92,7 @@ enum EQUIP_ACTIVE_OPTION {
EQUIP_ACTIVE_SIZE = 4
};
-//! \brief The different option boxes that can be active for equipment
+//! \brief The different option boxes that can be active for party formation
enum FORM_ACTIVE_OPTION {
FORM_ACTIVE_NONE = 0,
FORM_ACTIVE_CHAR = 1,
@@ -235,23 +236,29 @@ class InventoryWindow : public hoa_gui::MenuWindow
/** ****************************************************************************
-*** \brief Represents the Status window, displaying all the information about the character.
+*** \brief Represents the Party window, displaying all the information about the character.
***
*** This window display all the attributes of the character.
*** You can scroll through them all as well, to view all the different characters.
+*** You can also reorder the position of characters
*** ***************************************************************************/
-class StatusWindow : public hoa_gui::MenuWindow
+class PartyWindow : public hoa_gui::MenuWindow
{
+ friend class hoa_menu::MenuMode;
private:
+
//! char portraits
std::vector<hoa_video::StillImage> _full_portraits;
//! if the window is active or not
- bool _char_select_active;
+ uint32 _char_select_active;
//! character selection option box
hoa_gui::OptionBox _char_select;
+ //! The character select option box once first character has been selected
+ hoa_gui::OptionBox _second_char_select;
+
/*!
* \brief initialize character selection option box
*/
@@ -259,8 +266,8 @@ class StatusWindow : public hoa_gui::MenuWindow
public:
- StatusWindow();
- ~StatusWindow();
+ PartyWindow();
+ ~PartyWindow();
/*!
* \brief render this window to the screen
@@ -287,7 +294,7 @@ class StatusWindow : public hoa_gui::MenuWindow
*/
void Activate(bool new_value);
-}; // class StatusWindow : public hoa_video::MenuWindow
+}; // class PartyWindow : public hoa_video::MenuWindow
@@ -474,54 +481,6 @@ class EquipWindow : public hoa_gui::MenuWindow
}; // class EquipWindow : public hoa_video::MenuWindow
-
-
-/** ****************************************************************************
-*** \brief Represents the Formation window, allowing the party to change order.
-***
-*** This window changes party order.
-*** ***************************************************************************/
-class FormationWindow : public hoa_gui::MenuWindow
-{
- friend class hoa_menu::MenuMode;
-
-public:
- FormationWindow();
- ~FormationWindow();
- void Update();
- void Draw();
-
- /*!
- * \brief Activates the window
- * \param new_value true to activate window, false to deactivate window
- */
- void Activate(bool new_status);
-
- /*!
- * \brief Checks to see if the skills window is active
- * \return true if the window is active, false if it's not
- */
- bool IsActive() {
- return _active_box;
- }
-
-private:
- //! Flag to specify the active option box
- uint32 _active_box;
-
- //! The character select option box
- hoa_gui::OptionBox _char_select;
-
- //! The character select option box once first character has been selected
- hoa_gui::OptionBox _second_char_select;
-
- /*!
- * \brief initialize character selection option box
- */
- void _InitCharSelect();
-
-}; // class FormationWindow : public hoa_video::MenuWindow
-
/*!
* \brief Converts a vector of GlobalItem*, etc. to a vector of GlobalObjects*
* \return the same vector, with elements of type GlobalObject*
Please sign in to comment.
Something went wrong with that request. Please try again.