hoa_shop::private_shop::ObjectListWindow Class Reference

A window containing a list of objects and their price. More...

#include <shop_windows.h>

Inheritance diagram for hoa_shop::private_shop::ObjectListWindow:

Inheritance graph
[legend]
Collaboration diagram for hoa_shop::private_shop::ObjectListWindow:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void AddEntry (hoa_utils::ustring name, uint32 price, uint32 quantity)
 Adds a new entry to the option box.
void Clear ()
 Removes all object entries from the list.
void ConstructList ()
 Reconstructs the option box from the entries that have been added.
void Draw ()
 Draws the object list window and options to the screen.
 ObjectListWindow ()
void RefreshList ()
 Refreshes the option box and all entries.
void Update ()
 Processes user input and updates the cursor.
 ~ObjectListWindow ()

Public Attributes

bool hide_options
 When set to true, the OptionBox will not be drawn for this window.
hoa_video::OptionBox object_list
 Contains the list of objects for sale Each option includes the name of the object and its price.
std::vector< hoa_utils::ustringoption_text
 Contains the text that forms each option in the list.

Detailed Description

A window containing a list of objects and their price.

****************************************************************************

Definition at line 68 of file shop_windows.h.


Constructor & Destructor Documentation

hoa_shop::private_shop::ObjectListWindow::ObjectListWindow (  ) 

Definition at line 180 of file shop_windows.cpp.

References hide_options, object_list, hoa_video::OptionBox::SetCellSize(), hoa_video::OptionBox::SetCursorOffset(), hoa_video::OptionBox::SetFont(), hoa_video::OptionBox::SetHorizontalWrapMode(), hoa_video::OptionBox::SetOptionAlignment(), hoa_video::private_video::GUIControl::SetOwner(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::OptionBox::SetSelectMode(), hoa_video::VIDEO_MENU_EDGE_ALL, hoa_video::VIDEO_MENU_EDGE_BOTTOM, hoa_video::VIDEO_MENU_EDGE_LEFT, hoa_video::VIDEO_MENU_INSTANT, hoa_video::VIDEO_SELECT_SINGLE, hoa_video::VIDEO_WRAP_MODE_NONE, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_CENTER, and hoa_video::VIDEO_Y_TOP.

Here is the call graph for this function:

hoa_shop::private_shop::ObjectListWindow::~ObjectListWindow (  ) 

Definition at line 201 of file shop_windows.cpp.


Member Function Documentation

void hoa_shop::private_shop::ObjectListWindow::AddEntry ( hoa_utils::ustring  name,
uint32  price,
uint32  quantity 
)

Adds a new entry to the option box.

Parameters:
name The name of the object for this entry
price The price of the object in this entry

Definition at line 212 of file shop_windows.cpp.

References hoa_utils::MakeUnicodeString(), hoa_utils::NumberToString(), and option_text.

Referenced by RefreshList().

Here is the call graph for this function:

void hoa_shop::private_shop::ObjectListWindow::Clear (  ) 

Removes all object entries from the list.

Definition at line 205 of file shop_windows.cpp.

References object_list, option_text, and hoa_video::OptionBox::SetOptions().

Referenced by RefreshList().

Here is the call graph for this function:

void hoa_shop::private_shop::ObjectListWindow::ConstructList (  ) 

Reconstructs the option box from the entries that have been added.

Definition at line 218 of file shop_windows.cpp.

References object_list, option_text, hoa_video::OptionBox::SetOptions(), hoa_video::OptionBox::SetSelection(), and hoa_video::OptionBox::SetSize().

Referenced by RefreshList().

Here is the call graph for this function:

void hoa_shop::private_shop::ObjectListWindow::Draw (  )  [virtual]

Draws the object list window and options to the screen.

Reimplemented from hoa_video::MenuWindow.

Definition at line 289 of file shop_windows.cpp.

References hoa_shop::ShopMode::_state, hoa_shop::private_shop::current_shop, hoa_video::OptionBox::Draw(), hide_options, object_list, option_text, and hoa_shop::private_shop::SHOP_STATE_LIST.

Referenced by hoa_shop::ShopMode::Draw().

Here is the call graph for this function:

void hoa_shop::private_shop::ObjectListWindow::RefreshList (  ) 

Refreshes the option box and all entries.

Definition at line 226 of file shop_windows.cpp.

References hoa_shop::ShopMode::_all_objects, hoa_shop::ShopMode::_all_objects_quantities, hoa_shop::ShopMode::_list_window, AddEntry(), Clear(), ConstructList(), and hoa_shop::private_shop::current_shop.

Referenced by hoa_shop::ShopMode::Reset(), and hoa_shop::private_shop::ConfirmWindow::Update().

Here is the call graph for this function:

void hoa_shop::private_shop::ObjectListWindow::Update (  ) 

Processes user input and updates the cursor.

Definition at line 238 of file shop_windows.cpp.

References hoa_shop::ShopMode::_action_window, hoa_shop::ShopMode::_all_objects, hoa_shop::ShopMode::_all_objects_quantities, hoa_shop::ShopMode::_confirm_window, hoa_shop::ShopMode::_info_window, hoa_shop::ShopMode::_purchases_cost, hoa_shop::ShopMode::_shop_sounds, hoa_shop::ShopMode::_state, hoa_input::GameInput::CancelPress(), hoa_input::GameInput::ConfirmPress(), hoa_shop::private_shop::current_shop, hoa_input::GameInput::DownPress(), hoa_video::OptionBox::GetSelection(), hoa_shop::ShopMode::GetTotalRemaining(), hoa_system::GameSystem::GetUpdateTime(), hoa_video::OptionBox::HandleConfirmKey(), hoa_video::OptionBox::HandleDownKey(), hoa_video::OptionBox::HandleUpKey(), hide_options, hoa_input::InputManager, hoa_input::GameInput::LeftPress(), hoa_utils::MakeUnicodeString(), hoa_utils::NumberToString(), object_list, hoa_shop::private_shop::ShopActionWindow::options, hoa_shop::private_shop::ConfirmWindow::options, hoa_input::GameInput::RightPress(), hoa_video::OptionBox::SetCursorState(), hoa_shop::private_shop::ObjectInfoWindow::SetObject(), hoa_video::OptionBox::SetOptionText(), hoa_shop::private_shop::SHOP_STATE_ACTION, hoa_shop::private_shop::SHOP_STATE_CONFIRM, hoa_video::MenuWindow::Show(), hoa_system::SystemManager, hoa_video::OptionBox::Update(), hoa_shop::private_shop::ShopActionWindow::UpdateFinanceText(), hoa_input::GameInput::UpPress(), hoa_video::VIDEO_CURSOR_STATE_HIDDEN, and hoa_video::VIDEO_CURSOR_STATE_VISIBLE.

Referenced by hoa_shop::ShopMode::Update().

Here is the call graph for this function:


Member Data Documentation

bool hoa_shop::private_shop::ObjectListWindow::hide_options

When set to true, the OptionBox will not be drawn for this window.

Definition at line 100 of file shop_windows.h.

Referenced by Draw(), ObjectListWindow(), Update(), and hoa_shop::private_shop::ShopActionWindow::Update().

hoa_video::OptionBox hoa_shop::private_shop::ObjectListWindow::object_list

Contains the list of objects for sale Each option includes the name of the object and its price.

Definition at line 108 of file shop_windows.h.

Referenced by Clear(), ConstructList(), Draw(), ObjectListWindow(), Update(), and hoa_shop::private_shop::ShopActionWindow::Update().

std::vector<hoa_utils::ustring> hoa_shop::private_shop::ObjectListWindow::option_text

Contains the text that forms each option in the list.

Definition at line 103 of file shop_windows.h.

Referenced by AddEntry(), Clear(), ConstructList(), and Draw().


The documentation for this class was generated from the following files:
Generated on Fri Jul 6 23:16:00 2007 for Hero of Allacrost by  doxygen 1.5.1