#include <menu_views.h>
Inheritance diagram for hoa_menu::private_menu::InventoryWindow:


Public Member Functions | |
| void | Activate (bool new_status) |
| Toggles the inventory window being in the active context for the player. | |
| void | Draw () |
| Draw the inventory window. | |
| InventoryWindow () | |
| bool | IsActive () |
| Indicates whether the inventory window is in the active context. | |
| void | Update () |
| If the inventory window is ready to cancel out, or cancel out a sub-window Updates the inventory window. Handles key presses, switches window context, etc. | |
| ~InventoryWindow () | |
Private Member Functions | |
| void | _InitCategory () |
| Initializes item category select option box. | |
| void | _InitCharSelect () |
| Initializes char select option box. | |
| void | _InitInventoryItems () |
| Initializes inventory items option box. | |
| void | _UpdateItemText () |
| Updates the item text in the inventory items. | |
Private Attributes | |
| uint32 | _active_box |
| Flag to specify the active option box. | |
| hoa_video::OptionBox | _char_select |
| OptionBox to choose character. | |
| hoa_video::TextBox | _description |
| TextBox that holds the selected object's description. | |
| hoa_video::OptionBox | _inventory_items |
| OptionBox to display all of the items. | |
| hoa_video::OptionBox | _item_categories |
| OptionBox to choose item category. | |
| std::vector< hoa_global::GlobalObject * > | _item_objects |
| Vector of GlobalObjects that corresponds to _inventory_items. | |
| hoa_video::StillImage | _location_graphic |
| Used for the current dungeon. | |
| std::vector< hoa_video::StillImage > | _portraits |
| Used for char portraits in bottom menu. | |
****************************************************************************
This handles item use. You can also view all items by category.
Definition at line 184 of file menu_views.h.
| hoa_menu::private_menu::InventoryWindow::InventoryWindow | ( | ) |
Definition at line 146 of file menu_views.cpp.
References _description, _InitCategory(), _InitCharSelect(), _InitInventoryItems(), hoa_video::TextBox::SetDimensions(), hoa_video::TextBox::SetDisplayMode(), hoa_video::TextBox::SetDisplaySpeed(), hoa_video::TextBox::SetFont(), hoa_video::private_video::GUIControl::SetOwner(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::TextBox::SetTextAlignment(), hoa_video::VIDEO_TEXT_INSTANT, hoa_video::VIDEO_X_LEFT, and hoa_video::VIDEO_Y_TOP.
Here is the call graph for this function:

| hoa_menu::private_menu::InventoryWindow::~InventoryWindow | ( | ) |
Definition at line 163 of file menu_views.cpp.
| void hoa_menu::private_menu::InventoryWindow::_InitCategory | ( | ) | [private] |
Initializes item category select option box.
Definition at line 216 of file menu_views.cpp.
References _item_categories, hoa_menu::private_menu::ITEM_ALL, hoa_menu::private_menu::ITEM_CATEGORY_SIZE, hoa_utils::MakeUnicodeString(), hoa_video::OptionBox::SetCellSize(), hoa_video::OptionBox::SetCursorOffset(), hoa_video::OptionBox::SetCursorState(), hoa_video::OptionBox::SetFont(), hoa_video::OptionBox::SetHorizontalWrapMode(), hoa_video::OptionBox::SetOptionAlignment(), hoa_video::OptionBox::SetOptions(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::OptionBox::SetSelection(), hoa_video::OptionBox::SetSize(), hoa_video::OptionBox::SetVerticalWrapMode(), hoa_video::VIDEO_CURSOR_STATE_HIDDEN, hoa_video::VIDEO_WRAP_MODE_SHIFTED, hoa_video::VIDEO_WRAP_MODE_STRAIGHT, hoa_video::VIDEO_X_CENTER, and hoa_video::VIDEO_Y_CENTER.
Referenced by InventoryWindow().
Here is the call graph for this function:

| void hoa_menu::private_menu::InventoryWindow::_InitCharSelect | ( | ) | [private] |
Initializes char select option box.
Definition at line 189 of file menu_views.cpp.
References _char_select, hoa_global::GameGlobal::GetActiveParty(), hoa_global::GlobalParty::GetPartySize(), hoa_global::GlobalManager, hoa_utils::MakeUnicodeString(), hoa_video::OptionBox::SetCellSize(), hoa_video::OptionBox::SetCursorOffset(), hoa_video::OptionBox::SetCursorState(), hoa_video::OptionBox::SetFont(), hoa_video::OptionBox::SetHorizontalWrapMode(), hoa_video::OptionBox::SetOptionAlignment(), hoa_video::OptionBox::SetOptions(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::OptionBox::SetSelection(), hoa_video::OptionBox::SetSize(), hoa_video::OptionBox::SetVerticalWrapMode(), hoa_video::VIDEO_CURSOR_STATE_HIDDEN, hoa_video::VIDEO_WRAP_MODE_SHIFTED, hoa_video::VIDEO_WRAP_MODE_STRAIGHT, hoa_video::VIDEO_X_LEFT, and hoa_video::VIDEO_Y_CENTER.
Referenced by InventoryWindow().
Here is the call graph for this function:

| void hoa_menu::private_menu::InventoryWindow::_InitInventoryItems | ( | ) | [private] |
Initializes inventory items option box.
Definition at line 168 of file menu_views.cpp.
References _inventory_items, _UpdateItemText(), hoa_video::GameVideo::MoveRelative(), hoa_video::OptionBox::SetCellSize(), hoa_video::OptionBox::SetCursorOffset(), hoa_video::OptionBox::SetCursorState(), hoa_video::OptionBox::SetFont(), hoa_video::OptionBox::SetHorizontalWrapMode(), hoa_video::OptionBox::SetOptionAlignment(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::OptionBox::SetSelection(), hoa_video::OptionBox::SetVerticalWrapMode(), hoa_video::OptionBox::TEMP_OverideScissorring(), hoa_video::VIDEO_CURSOR_STATE_HIDDEN, hoa_video::VIDEO_WRAP_MODE_SHIFTED, hoa_video::VIDEO_WRAP_MODE_STRAIGHT, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_CENTER, and hoa_video::VideoManager.
Referenced by InventoryWindow().
Here is the call graph for this function:

| void hoa_menu::private_menu::InventoryWindow::_UpdateItemText | ( | ) | [private] |
Updates the item text in the inventory items.
Definition at line 395 of file menu_views.cpp.
References _inventory_items, _item_categories, _item_objects, hoa_global::GlobalObject::GetCount(), hoa_video::StillImage::GetFilename(), hoa_global::GlobalObject::GetIconImage(), hoa_global::GameGlobal::GetInventory(), hoa_global::GameGlobal::GetInventoryArmArmor(), hoa_global::GameGlobal::GetInventoryHeadArmor(), hoa_global::GameGlobal::GetInventoryItems(), hoa_global::GameGlobal::GetInventoryKeyItems(), hoa_global::GameGlobal::GetInventoryLegArmor(), hoa_global::GameGlobal::GetInventoryTorsoArmor(), hoa_global::GameGlobal::GetInventoryWeapons(), hoa_global::GlobalObject::GetName(), hoa_video::OptionBox::GetSelection(), hoa_global::GlobalItem::GetUsage(), hoa_global::GLOBAL_USE_ALL, hoa_global::GLOBAL_USE_BATTLE, hoa_global::GLOBAL_USE_MENU, hoa_global::GlobalManager, hoa_menu::private_menu::ITEM_ALL, hoa_menu::private_menu::ITEM_BATTLE, hoa_menu::private_menu::ITEM_EQUIPMENT, hoa_menu::private_menu::ITEM_FIELD, hoa_menu::private_menu::ITEM_KEY, hoa_utils::MakeStandardString(), hoa_utils::MakeUnicodeString(), hoa_utils::NumberToString(), hoa_video::OptionBox::SetOptions(), and hoa_video::OptionBox::SetSize().
Referenced by _InitInventoryItems(), Draw(), and Update().
Here is the call graph for this function:

| void hoa_menu::private_menu::InventoryWindow::Activate | ( | bool | new_status | ) |
Toggles the inventory window being in the active context for the player.
| new_status | Activates the inventory window when true, de-activates it when false |
Definition at line 243 of file menu_views.cpp.
References _active_box, _inventory_items, _item_categories, hoa_video::OptionBox::GetNumberOptions(), hoa_menu::private_menu::ITEM_ACTIVE_CATEGORY, hoa_menu::private_menu::ITEM_ACTIVE_NONE, hoa_video::OptionBox::SetCursorState(), hoa_video::VIDEO_CURSOR_STATE_HIDDEN, and hoa_video::VIDEO_CURSOR_STATE_VISIBLE.
Referenced by hoa_menu::MenuMode::_HandleInventoryMenu(), and Update().
Here is the call graph for this function:

| void hoa_menu::private_menu::InventoryWindow::Draw | ( | ) | [virtual] |
Draw the inventory window.
Reimplemented from hoa_video::MenuWindow.
Definition at line 523 of file menu_views.cpp.
References _active_box, _char_select, _description, _inventory_items, _item_categories, _item_objects, _UpdateItemText(), hoa_video::OptionBox::Draw(), hoa_video::TextBox::Draw(), hoa_video::GameVideo::DrawImage(), hoa_video::GameVideo::DrawText(), hoa_global::GlobalObject::GetIconImage(), hoa_global::GlobalObject::GetName(), hoa_video::OptionBox::GetSelection(), hoa_menu::private_menu::ITEM_ACTIVE_LIST, hoa_video::GameVideo::Move(), hoa_video::GameVideo::MoveRelative(), hoa_video::GameVideo::SetDrawFlags(), hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_BOTTOM, hoa_video::VIDEO_Y_CENTER, and hoa_video::VideoManager.
Referenced by hoa_menu::MenuMode::Draw().
Here is the call graph for this function:

| bool hoa_menu::private_menu::InventoryWindow::IsActive | ( | ) | [inline] |
Indicates whether the inventory window is in the active context.
Definition at line 198 of file menu_views.h.
References _active_box.
Referenced by hoa_menu::MenuMode::Update().
| void hoa_menu::private_menu::InventoryWindow::Update | ( | ) |
If the inventory window is ready to cancel out, or cancel out a sub-window Updates the inventory window. Handles key presses, switches window context, etc.
Definition at line 259 of file menu_views.cpp.
References _active_box, _char_select, _description, hoa_menu::MenuMode::_instance, _inventory_items, _item_categories, _item_objects, hoa_menu::MenuMode::_menu_sounds, _UpdateItemText(), Activate(), hoa_input::GameInput::CancelPress(), hoa_input::GameInput::ConfirmPress(), hoa_global::GlobalObject::DecrementCount(), hoa_input::GameInput::DownPress(), hoa_global::GameGlobal::GetActiveParty(), hoa_global::GlobalParty::GetActorAtIndex(), hoa_video::OptionBox::GetEvent(), hoa_global::GameGlobal::GetInventory(), hoa_video::OptionBox::GetNumberOptions(), hoa_global::GlobalObject::GetObjectType(), hoa_video::OptionBox::GetSelection(), hoa_system::GameSystem::GetUpdateTime(), hoa_global::GLOBAL_OBJECT_ITEM, hoa_global::GlobalManager, hoa_video::OptionBox::HandleCancelKey(), hoa_video::OptionBox::HandleConfirmKey(), hoa_video::OptionBox::HandleDownKey(), hoa_video::OptionBox::HandleLeftKey(), hoa_video::OptionBox::HandleRightKey(), hoa_video::OptionBox::HandleUpKey(), hoa_input::InputManager, hoa_menu::private_menu::ITEM_ACTIVE_CATEGORY, hoa_menu::private_menu::ITEM_ACTIVE_CHAR, hoa_menu::private_menu::ITEM_ACTIVE_LIST, hoa_menu::private_menu::ITEM_ACTIVE_NONE, hoa_input::GameInput::LeftPress(), hoa_global::GameGlobal::RemoveFromInventory(), hoa_input::GameInput::RightPress(), hoa_video::OptionBox::SetCursorState(), hoa_video::TextBox::SetDisplayText(), hoa_video::OptionBox::SetSelection(), hoa_system::SystemManager, hoa_video::OptionBox::Update(), hoa_input::GameInput::UpPress(), hoa_video::VIDEO_CURSOR_STATE_BLINKING, hoa_video::VIDEO_CURSOR_STATE_HIDDEN, hoa_video::VIDEO_CURSOR_STATE_VISIBLE, hoa_video::VIDEO_OPTION_BOUNDS_DOWN, hoa_video::VIDEO_OPTION_BOUNDS_UP, hoa_video::VIDEO_OPTION_CANCEL, and hoa_video::VIDEO_OPTION_CONFIRM.
Referenced by hoa_menu::MenuMode::Update().
Here is the call graph for this function:

Flag to specify the active option box.
Definition at line 223 of file menu_views.h.
Referenced by Activate(), Draw(), IsActive(), and Update().
OptionBox to choose character.
Definition at line 229 of file menu_views.h.
Referenced by _InitCharSelect(), Draw(), and Update().
TextBox that holds the selected object's description.
Definition at line 235 of file menu_views.h.
Referenced by Draw(), InventoryWindow(), and Update().
OptionBox to display all of the items.
Definition at line 226 of file menu_views.h.
Referenced by _InitInventoryItems(), _UpdateItemText(), Activate(), Draw(), and Update().
OptionBox to choose item category.
Definition at line 232 of file menu_views.h.
Referenced by _InitCategory(), _UpdateItemText(), Activate(), Draw(), and Update().
std::vector< hoa_global::GlobalObject* > hoa_menu::private_menu::InventoryWindow::_item_objects [private] |
Vector of GlobalObjects that corresponds to _inventory_items.
Definition at line 238 of file menu_views.h.
Referenced by _UpdateItemText(), Draw(), and Update().
std::vector<hoa_video::StillImage> hoa_menu::private_menu::InventoryWindow::_portraits [private] |
1.5.1