hoa_video::OptionBox Class Reference

Represents rows and columns of options that the player may select. More...

#include <option.h>

Inheritance diagram for hoa_video::OptionBox:

Inheritance graph
[legend]
Collaboration diagram for hoa_video::OptionBox:

Collaboration graph
[legend]
List of all members.

Public Member Functions

bool AddOption (const hoa_utils::ustring &text)
 Adds a new option to the OptionBox.
void ClearOptions ()
 Removes all options and their allocated data from the OptionBox.
void Draw ()
 Draws each enabled option to the screen.
void EnableOption (int32 index, bool enable)
 Enables or disables the option located at a specified index.
bool IsInitialized (std::string &error_messages)
 Used to determine whether the option box is initialized and ready for use.
 OptionBox ()
bool SetOptions (const std::vector< hoa_utils::ustring > &option_text)
 Sets the options to display in this option box.
bool SetOptionText (int32 index, const hoa_utils::ustring &text)
 Changes the stored information of a particular option.
void SetSelection (int32 index)
 Sets the currently selected option (0 to # of options - 1).
void TEMP_OverideScissorring (bool enable)
 Used to enable scissoring to the size of the option box instead of the MenuWindow owner's size.
void Update (uint32 frame_time=hoa_system::SystemManager->GetUpdateTime())
 Updates any blinking or scrolling effects for the option box.
 ~OptionBox ()
Member Access Functions
int32 GetEvent ()
 Retreives an event that has occurred, or zero if no event occurred.
int32 GetNumberColumns () const
 Returns the number of columns of options.
int32 GetNumberOptions () const
 Retreives the number of options in the option box.
int32 GetNumberRows () const
 Returns the number of rows of options.
int32 GetSelection () const
 Returns the index of the currently selected option.
bool IsEnabled (int32 index) const
 Returns true if the given option is enabled.
bool IsScrolling () const
 Checks if the option box is in the process of scrolling.
void SetCellSize (float horz_spacing, float vert_spacing)
 Sets the width and height of all option cells.
void SetCursorOffset (float x, float y)
 Sets the cursor offset relative to the text position.
void SetCursorState (CursorState state)
 Sets the state of the cursor icon.
void SetFont (const std::string &font_name)
 Sets the font that the option box will use for text.
void SetHorizontalWrapMode (WrapMode mode)
 Sets the behavior for horizontal wrapping of the cursor.
void SetOptionAlignment (int32 xalign, int32 yalign)
 Sets the alignment of the option text and cursor.
void SetSelectMode (SelectMode mode)
 Sets the option selection mode (single or double confirm).
void SetSize (int32 columns, int32 rows)
 Sets the size of the option box in terms of number of columns and rows.
void SetSwitching (bool enable)
 Enables or disables the ability to switch the location of two options.
void SetVerticalWrapMode (WrapMode mode)
 Sets the behavior for vertical wrapping of the cursor.
Input Processing Methods
Processes the input commands for moving the cursor, selecting options, etcetra

void HandleCancelKey ()
void HandleConfirmKey ()
void HandleDownKey ()
void HandleLeftKey ()
void HandleRightKey ()
void HandleUpKey ()

Private Member Functions

bool _ChangeSelection (int32 offset, bool horizontal)
 Changes the selected option by making a movement relative to the current selection.
bool _ConstructOption (const hoa_utils::ustring &formatString, private_video::Option &option)
 helper function to parse text for an option box, and fill an Option structure
void _SetupAlignment (int32 xalign, int32 yalign, const private_video::OptionCellBounds &bounds, float &x, float &y)
 Sets draw flags and determines the x and y coordinates for rendering an option inside a cell.

Private Attributes

bool _initialized
 When set to true, indicates that the option box is initialized and ready to be used.
std::vector< private_video::Option_options
 The vector containing all of the options This 1D structure represents a 2D array of options. For an option box with 2 rows and 3 columns, the first 3 elements would contain the contents of the 1st row (left to right) and the last 3 elements would contain the second row.
bool _TEMP_overide_scissorring
 True if scissoring is enabled and using the option box's size instead of the owner MenuWindow's size.
Active State Members
bool _blink
 Used for the blinking cursor feature. When false, the cursor will not be drawn.
int32 _blink_time
 The timer used for controlling the cursor blinking rate.
CursorState _cursor_state
 The current cursor state (blinking, visible, hidden, etc).
int32 _event
 Holds the most recent OptionBox event that occurred.
int32 _first_selection
 The first selection that the player made when in double-confirm selection mode.
int32 _scroll_direction
 Indicates the scrolling direction; 1 for down or -1 for up.
int32 _scroll_time
 The timer used for controlling option scrolling.
bool _scrolling
 Set to true if the box is currently in the middle of scrolling.
int32 _selection
 The index of the currently selected option.
Drawng Related Members
float _cursor_xoffset
 Retains the x and y offsets for where the cursor should be drawn relative to the selected option.
float _cursor_yoffset
float _horizontal_spacing
 The amount of horizontal spacing between option cells.
int32 _option_xalign
 The horizontal alignment type for option cell contents.
int32 _option_yalign
 The vertical alignment type for option cell contents.
int32 _scroll_offset
 A draw offset used for the option box when it is scrolling.
float _vertical_spacing
 The amount of vertical spacing between option cells.
Option Property Members
std::string _font
 The font used for rendering the text.
WrapMode _horizontal_wrap_mode
 The wrapping mode used for horizontal cursor movement.
int32 _number_columns
 The number of columns of options.
int32 _number_options
 The number of options there are in this box.
int32 _number_rows
 The number of rows of options.
SelectMode _selection_mode
 The selection mode for the option box (ie single or double confirm selection).
bool _switching
 When set to true, the user may switch the locations of two different options.
WrapMode _vertical_wrap_mode
 The wrapping mode used for vertical cursor movement.

Detailed Description

Represents rows and columns of options that the player may select.

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

The OptionBox control is used for presenting the player with several choices, of actions to take, wares to buy, etc.

Note:
2D option box support needs to be tested. Should we allow 2D option boxes that are not completely filled? For example, a 3 row, 3 column option box that contains only 7 elements (final row has only 1st column)? I don't believe this class supports that yet...but it might.
Todo:
Add scrolling feature to OptionBox so we can scroll through lists of options that are greater than the display area.
Todo:
Allow the user to set an arbitrary cursor blink rate and scroll rate
Todo:
Add support for drawing scroll arrows on the option box to indicate additional options that are not currently in view (note: this should probably be added to the GUIControl class for both OptionBox and TextBox to inherit from)

Definition at line 220 of file option.h.


Constructor & Destructor Documentation

hoa_video::OptionBox::OptionBox (  ) 

Definition at line 24 of file option.cpp.

References _blink, _blink_time, _cursor_state, _cursor_xoffset, _cursor_yoffset, _event, _first_selection, _horizontal_spacing, _horizontal_wrap_mode, hoa_video::private_video::GUIElement::_initialization_errors, _initialized, _number_columns, _number_options, _number_rows, _option_xalign, _option_yalign, _scroll_offset, _scroll_time, _scrolling, _selection, _selection_mode, _switching, _TEMP_overide_scissorring, _vertical_spacing, _vertical_wrap_mode, IsInitialized(), hoa_video::VIDEO_CURSOR_STATE_VISIBLE, hoa_video::VIDEO_SELECT_SINGLE, hoa_video::VIDEO_WRAP_MODE_NONE, hoa_video::VIDEO_X_LEFT, and hoa_video::VIDEO_Y_TOP.

Here is the call graph for this function:

hoa_video::OptionBox::~OptionBox (  ) 

Definition at line 51 of file option.cpp.

References ClearOptions().

Here is the call graph for this function:


Member Function Documentation

bool hoa_video::OptionBox::_ChangeSelection ( int32  offset,
bool  horizontal 
) [private]

Changes the selected option by making a movement relative to the current selection.

Parameters:
offset The amount to move in specified direction (ie 1 row up, 1 column right, etc.)
horizontal true if moving horizontally, false if moving vertically
Returns:
False if the selection does not change

Definition at line 720 of file option.cpp.

References _event, _horizontal_wrap_mode, _number_columns, _number_options, _number_rows, _scroll_direction, _scroll_offset, _scroll_time, _scrolling, _selection, _vertical_wrap_mode, hoa_video::VIDEO_OPTION_SELECTION_CHANGE, hoa_video::VIDEO_WRAP_MODE_NONE, hoa_video::VIDEO_WRAP_MODE_SHIFTED, and hoa_video::VIDEO_WRAP_MODE_STRAIGHT.

Referenced by HandleDownKey(), HandleLeftKey(), HandleRightKey(), and HandleUpKey().

bool hoa_video::OptionBox::_ConstructOption ( const hoa_utils::ustring formatString,
private_video::Option option 
) [private]

helper function to parse text for an option box, and fill an Option structure

Parameters:
formatString the formatted string, using the XML structure described by SetOptions()
option which option the string corresponds to
Returns:
True if the option was successfully constructed from the string, or false if there was an error.

Definition at line 608 of file option.cpp.

References hoa_video::private_video::CENTER_TAG1, hoa_video::private_video::CENTER_TAG2, hoa_utils::ustring::clear(), hoa_video::private_video::Option::disabled, hoa_video::private_video::Option::elements, hoa_utils::ustring::empty(), hoa_video::private_video::END_TAG, hoa_utils::ustring::find(), hoa_video::private_video::Option::images, hoa_utils::IsStringNumeric(), hoa_video::private_video::LEFT_TAG1, hoa_video::private_video::LEFT_TAG2, hoa_utils::ustring::length(), hoa_video::GameVideo::LoadImage(), hoa_utils::MakeStandardString(), hoa_utils::ustring::npos, hoa_video::private_video::OPEN_TAG, hoa_video::private_video::RIGHT_TAG1, hoa_video::private_video::RIGHT_TAG2, hoa_video::StillImage::SetFilename(), hoa_utils::ustring::substr(), hoa_video::private_video::Option::text, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_OPTION_ELEMENT_CENTER_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_IMAGE, hoa_video::VIDEO_OPTION_ELEMENT_LEFT_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_POSITION, hoa_video::VIDEO_OPTION_ELEMENT_RIGHT_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_TEXT, and hoa_video::VideoManager.

Referenced by AddOption(), and SetOptionText().

Here is the call graph for this function:

void hoa_video::OptionBox::_SetupAlignment ( int32  xalign,
int32  yalign,
const private_video::OptionCellBounds bounds,
float &  x,
float &  y 
) [private]

Sets draw flags and determines the x and y coordinates for rendering an option inside a cell.

Parameters:
xalign The x alignement for the cell contents
yalign The y alignement for the cell contents
bounds The boundary coordinates for the option cell
x A reference to return the x position for the cursor
y A reference to return the y position for the cursor This is a helper function for OptionBox::Draw()

Definition at line 826 of file option.cpp.

References hoa_video::GameVideo::Move(), hoa_video::GameVideo::SetDrawFlags(), hoa_video::VIDEO_X_CENTER, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_CENTER, hoa_video::VIDEO_Y_TOP, hoa_video::VideoManager, hoa_video::private_video::OptionCellBounds::x_center, hoa_video::private_video::OptionCellBounds::x_left, hoa_video::private_video::OptionCellBounds::x_right, hoa_video::private_video::OptionCellBounds::y_bottom, hoa_video::private_video::OptionCellBounds::y_center, and hoa_video::private_video::OptionCellBounds::y_top.

Referenced by Draw().

Here is the call graph for this function:

bool hoa_video::OptionBox::AddOption ( const hoa_utils::ustring text  ) 

Adds a new option to the OptionBox.

Parameters:
text The formatting text for the new option
Returns:
Returns false is for some reason the option could not be added

Definition at line 364 of file option.cpp.

References _ConstructOption(), _number_options, and _options.

Referenced by hoa_boot::BootMenu::AddOption().

Here is the call graph for this function:

void hoa_video::OptionBox::ClearOptions (  ) 

Removes all options and their allocated data from the OptionBox.

Definition at line 321 of file option.cpp.

References _options, hoa_video::GameVideo::DeleteImage(), and hoa_video::VideoManager.

Referenced by ~OptionBox().

Here is the call graph for this function:

void hoa_video::OptionBox::Draw (  )  [virtual]

Draws each enabled option to the screen.

Implements hoa_video::private_video::GUIElement.

Definition at line 75 of file option.cpp.

References _blink, hoa_video::GameVideo::_coord_sys, _cursor_state, _cursor_xoffset, _cursor_yoffset, _first_selection, _font, _horizontal_spacing, _initialized, _number_columns, _number_options, _number_rows, _option_xalign, _option_yalign, _options, hoa_video::private_video::GUIControl::_owner, hoa_video::GameVideo::_PopContext(), hoa_video::GameVideo::_PushContext(), _scroll_direction, _scroll_offset, _scroll_time, _scrolling, _selection, _SetupAlignment(), _TEMP_overide_scissorring, _vertical_spacing, hoa_video::private_video::GUIElement::_xalign, hoa_video::private_video::GUIElement::_yalign, hoa_video::private_video::GUIControl::CalculateAlignedRect(), hoa_video::GameVideo::CalculateTextWidth(), hoa_video::private_video::Option::disabled, hoa_video::GameVideo::DrawImage(), hoa_video::GameVideo::DrawText(), hoa_video::private_video::Option::elements, hoa_video::GameVideo::EnableScissoring(), hoa_video::GameVideo::GetDefaultCursor(), hoa_video::CoordSys::GetHorizontalDirection(), hoa_video::MenuWindow::GetScissorRect(), hoa_video::GameVideo::GetScissorRect(), hoa_video::CoordSys::GetVerticalDirection(), hoa_video::StillImage::GetWidth(), hoa_video::Color::gray, hoa_video::ScreenRect::height, hoa_video::private_video::Option::images, hoa_video::ScreenRect::Intersect(), hoa_video::GameVideo::IsScissoringEnabled(), hoa_video::ScreenRect::left, hoa_video::GameVideo::Move(), hoa_video::GameVideo::MoveRelative(), hoa_video::GameVideo::SetDrawFlags(), hoa_video::GameVideo::SetFont(), hoa_video::GameVideo::SetScissorRect(), hoa_video::GameVideo::SetTextColor(), hoa_video::private_video::Option::text, hoa_video::ScreenRect::top, hoa_video::VIDEO_BLEND, hoa_video::VIDEO_CURSOR_STATE_BLINKING, hoa_video::VIDEO_CURSOR_STATE_HIDDEN, hoa_video::VIDEO_OPTION_ELEMENT_CENTER_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_IMAGE, hoa_video::VIDEO_OPTION_ELEMENT_INVALID, hoa_video::VIDEO_OPTION_ELEMENT_LEFT_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_POSITION, hoa_video::VIDEO_OPTION_ELEMENT_RIGHT_ALIGN, hoa_video::VIDEO_OPTION_ELEMENT_TEXT, hoa_video::VIDEO_OPTION_ELEMENT_TOTAL, hoa_video::VIDEO_OPTION_SCROLL_TIME, hoa_video::VIDEO_X_CENTER, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_X_NOFLIP, hoa_video::VIDEO_X_RIGHT, hoa_video::VIDEO_Y_NOFLIP, hoa_video::VideoManager, hoa_video::Color::white, hoa_video::ScreenRect::width, hoa_video::private_video::OptionCellBounds::x_center, hoa_video::private_video::OptionCellBounds::x_left, hoa_video::private_video::OptionCellBounds::x_right, hoa_video::private_video::OptionCellBounds::y_bottom, hoa_video::private_video::OptionCellBounds::y_center, and hoa_video::private_video::OptionCellBounds::y_top.

Referenced by hoa_battle::private_battle::ActionWindow::_DrawActionCategory(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_shop::private_shop::ConfirmWindow::Draw(), hoa_shop::private_shop::ObjectSellListWindow::Draw(), hoa_shop::private_shop::ObjectListWindow::Draw(), hoa_shop::private_shop::ShopActionWindow::Draw(), hoa_quit::QuitMode::Draw(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::MenuMode::Draw(), and hoa_boot::BootMenu::Draw().

Here is the call graph for this function:

void hoa_video::OptionBox::EnableOption ( int32  index,
bool  enable 
)

Enables or disables the option located at a specified index.

Parameters:
index The index of the option to enable or disable
enable Set to true to enable, false to disable

Definition at line 417 of file option.cpp.

References _number_options, _options, and hoa_video::VIDEO_DEBUG.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_menu::MenuMode::_SetupMainOptionBox(), hoa_boot::BootMenu::EnableOption(), and hoa_battle::private_battle::ActionWindow::Initialize().

int32 hoa_video::OptionBox::GetEvent (  )  [inline]

Retreives an event that has occurred, or zero if no event occurred.

Returns:
An integer int representing an option box event (i.e. cancel, confirm, left, right, etc.)
Note:
Calling the Update() method will clear any registered events

Definition at line 377 of file option.h.

References _event.

Referenced by hoa_boot::BootMenu::GetEvent(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::MenuMode::Update().

int32 hoa_video::OptionBox::GetNumberColumns (  )  const [inline]

Returns the number of columns of options.

Definition at line 391 of file option.h.

References _number_columns.

int32 hoa_video::OptionBox::GetNumberOptions (  )  const [inline]

Retreives the number of options in the option box.

Definition at line 395 of file option.h.

References _number_options.

Referenced by hoa_menu::private_menu::InventoryWindow::Activate(), hoa_boot::BootMenu::AddOption(), hoa_boot::BootMenu::SetWindowed(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), and hoa_menu::private_menu::InventoryWindow::Update().

int32 hoa_video::OptionBox::GetNumberRows (  )  const [inline]

Returns the number of rows of options.

Definition at line 387 of file option.h.

References _number_rows.

int32 hoa_video::OptionBox::GetSelection (  )  const [inline]

Returns the index of the currently selected option.

Returns:
The current selection index, or -1 if nothing is selected

Definition at line 383 of file option.h.

References _selection.

Referenced by hoa_menu::MenuMode::_HandleEquipMenu(), hoa_menu::MenuMode::_HandleInventoryMenu(), hoa_menu::MenuMode::_HandleMainMenu(), hoa_menu::MenuMode::_HandleOptionsMenu(), hoa_menu::MenuMode::_HandleSaveMenu(), hoa_menu::MenuMode::_HandleSkillsMenu(), hoa_menu::MenuMode::_HandleStatusMenu(), hoa_battle::private_battle::ActionWindow::_UpdateActionCategory(), hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_menu::private_menu::InventoryWindow::_UpdateItemText(), hoa_menu::private_menu::SkillsWindow::_UpdateSkillList(), hoa_boot::BootMenu::ConfirmPressed(), hoa_boot::BootMenu::DownPressed(), hoa_menu::private_menu::EquipWindow::Draw(), hoa_menu::private_menu::SkillsWindow::Draw(), hoa_menu::private_menu::StatusWindow::Draw(), hoa_menu::private_menu::InventoryWindow::Draw(), hoa_menu::MenuMode::Draw(), hoa_menu::private_menu::EquipWindow::EquipWindow(), hoa_boot::BootMenu::IsSelectionEnabled(), hoa_boot::BootMenu::LeftPressed(), hoa_boot::BootMenu::RightPressed(), hoa_menu::private_menu::StatusWindow::StatusWindow(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), hoa_menu::MenuMode::Update(), and hoa_boot::BootMenu::UpPressed().

void hoa_video::OptionBox::HandleCancelKey (  ) 

Definition at line 564 of file option.cpp.

References _event, _first_selection, _scrolling, and hoa_video::VIDEO_OPTION_CANCEL.

Referenced by hoa_boot::BootMenu::CancelPressed(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), and hoa_menu::private_menu::InventoryWindow::Update().

void hoa_video::OptionBox::HandleConfirmKey (  ) 

Definition at line 517 of file option.cpp.

References _event, _first_selection, _number_options, _options, _scrolling, _selection, _selection_mode, _switching, hoa_video::VIDEO_DEBUG, hoa_video::VIDEO_OPTION_CONFIRM, hoa_video::VIDEO_OPTION_SWITCH, and hoa_video::VIDEO_SELECT_DOUBLE.

Referenced by hoa_boot::BootMenu::ConfirmPressed(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::MenuMode::Update().

void hoa_video::OptionBox::HandleDownKey (  ) 

Definition at line 483 of file option.cpp.

References _ChangeSelection(), _event, _scrolling, and hoa_video::VIDEO_OPTION_BOUNDS_DOWN.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_boot::BootMenu::DownPressed(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), and hoa_menu::private_menu::InventoryWindow::Update().

Here is the call graph for this function:

void hoa_video::OptionBox::HandleLeftKey (  ) 

Definition at line 494 of file option.cpp.

References _ChangeSelection(), _event, _scrolling, and hoa_video::VIDEO_OPTION_BOUNDS_LEFT.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionCategory(), hoa_boot::BootMenu::LeftPressed(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::MenuMode::Update().

Here is the call graph for this function:

void hoa_video::OptionBox::HandleRightKey (  ) 

Definition at line 505 of file option.cpp.

References _ChangeSelection(), _event, _scrolling, and hoa_video::VIDEO_OPTION_BOUNDS_RIGHT.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionCategory(), hoa_boot::BootMenu::RightPressed(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::MenuMode::Update().

Here is the call graph for this function:

void hoa_video::OptionBox::HandleUpKey (  ) 

Definition at line 472 of file option.cpp.

References _ChangeSelection(), _event, _scrolling, and hoa_video::VIDEO_OPTION_BOUNDS_UP.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_boot::BootMenu::UpPressed().

Here is the call graph for this function:

bool hoa_video::OptionBox::IsEnabled ( int32  index  )  const [inline]

Returns true if the given option is enabled.

Parameters:
index The index of the option to check
Returns:
True if option is enabled, false if it's not

Definition at line 370 of file option.h.

References _options.

Referenced by hoa_boot::BootMenu::IsSelectionEnabled(), and hoa_menu::MenuMode::Update().

bool hoa_video::OptionBox::IsInitialized ( std::string &  error_messages  )  [virtual]

Used to determine whether the option box is initialized and ready for use.

Parameters:
error_messages Used to report the list of reasons why the option box is not initialized
Returns:
True if the option box is initialized, false if it is not

Implements hoa_video::private_video::GUIElement.

Referenced by OptionBox(), SetCellSize(), SetFont(), SetOptionAlignment(), SetSelectMode(), and SetSize().

bool hoa_video::OptionBox::IsScrolling (  )  const [inline]

Checks if the option box is in the process of scrolling.

Returns:
True if the option box is scrolling, false if it is not

Definition at line 363 of file option.h.

References _scrolling.

void hoa_video::OptionBox::SetCellSize ( float  horz_spacing,
float  vert_spacing 
) [inline]

Sets the width and height of all option cells.

Parameters:
horz_spacing The amount of horizontal space allocated for each cell
vert_spacing The amount of vertical space allocated for each cell

Definition at line 308 of file option.h.

References _horizontal_spacing, hoa_video::private_video::GUIElement::_initialization_errors, _initialized, _vertical_spacing, and IsInitialized().

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupEquipOptionBox(), hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetTextDensity(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

Here is the call graph for this function:

void hoa_video::OptionBox::SetCursorOffset ( float  x,
float  y 
) [inline]

Sets the cursor offset relative to the text position.

Parameters:
x Horizontal offset (the sign determines whether its left or right)
y Vertical offset (the sign determines whether its up or down)

Definition at line 347 of file option.h.

References _cursor_xoffset, and _cursor_yoffset.

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

void hoa_video::OptionBox::SetCursorState ( CursorState  state  ) 

Sets the state of the cursor icon.

Parameters:
state The cursor state to set

Definition at line 593 of file option.cpp.

References _cursor_state, hoa_video::VIDEO_CURSOR_STATE_TOTAL, and hoa_video::VIDEO_DEBUG.

Referenced by hoa_menu::MenuMode::_HandleEquipMenu(), hoa_menu::MenuMode::_HandleInventoryMenu(), hoa_menu::MenuMode::_HandleSkillsMenu(), hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::private_menu::EquipWindow::Activate(), hoa_menu::private_menu::SkillsWindow::Activate(), hoa_menu::private_menu::StatusWindow::Activate(), hoa_menu::private_menu::InventoryWindow::Activate(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), and hoa_menu::private_menu::InventoryWindow::Update().

void hoa_video::OptionBox::SetFont ( const std::string &  font_name  ) 

Sets the font that the option box will use for text.

Parameters:
font_name The label to a valid, pre-loaded font to use

Definition at line 580 of file option.cpp.

References _font, hoa_video::private_video::GUIElement::_initialization_errors, _initialized, hoa_video::GameVideo::GetFontProperties(), IsInitialized(), hoa_video::VIDEO_DEBUG, and hoa_video::VideoManager.

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

Here is the call graph for this function:

void hoa_video::OptionBox::SetHorizontalWrapMode ( WrapMode  mode  )  [inline]

Sets the behavior for horizontal wrapping of the cursor.

Parameters:
mode The horizontal wrap behavior to set

Definition at line 333 of file option.h.

References _horizontal_wrap_mode.

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), and hoa_boot::BootMenu::SetWindowed().

void hoa_video::OptionBox::SetOptionAlignment ( int32  xalign,
int32  yalign 
) [inline]

Sets the alignment of the option text and cursor.

Parameters:
xalign Left/center/right alignment of text in the cell
yalign Top/center/bottom alignment of text in the cell

Definition at line 315 of file option.h.

References hoa_video::private_video::GUIElement::_initialization_errors, _initialized, _option_xalign, _option_yalign, and IsInitialized().

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

Here is the call graph for this function:

bool hoa_video::OptionBox::SetOptions ( const std::vector< hoa_utils::ustring > &  option_text  ) 

Sets the options to display in this option box.

Parameters:
option_text A vector of unicode strings which contain the text for each item, along with any formatting tags
Returns:
True if all options were added successfull, or false if an option failed If this function returns false, then it will not add any options to the OptionBox (even the ones that can be successfully added without an error).
For example: "<img/weapons/mythril.png>Mythril knife<r>500 drunes"

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::MenuMode::_SetupEquipOptionBox(), hoa_menu::MenuMode::_SetupInventoryOptionBox(), hoa_menu::MenuMode::_SetupMainOptionBox(), hoa_menu::MenuMode::_SetupOptionsOptionBox(), hoa_menu::MenuMode::_SetupSaveOptionBox(), hoa_menu::MenuMode::_SetupSkillsOptionBox(), hoa_menu::MenuMode::_SetupStatusOptionBox(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_menu::private_menu::InventoryWindow::_UpdateItemText(), hoa_menu::private_menu::SkillsWindow::_UpdateSkillList(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ObjectSellListWindow::Clear(), hoa_shop::private_shop::ObjectListWindow::Clear(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_shop::private_shop::ObjectListWindow::ConstructList(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_quit::QuitMode::QuitMode(), hoa_shop::private_shop::ShopActionWindow::ShopActionWindow(), and hoa_shop::private_shop::ObjectSellListWindow::UpdateSellList().

bool hoa_video::OptionBox::SetOptionText ( int32  index,
const hoa_utils::ustring text 
)

Changes the stored information of a particular option.

Parameters:
index The index of the option to change
text The text to change the option to
Returns:
False if the option text could not be changed

Definition at line 379 of file option.cpp.

References _ConstructOption(), _number_options, _options, and hoa_video::VIDEO_DEBUG.

Referenced by hoa_boot::BootMenu::SetOptionText(), and hoa_shop::private_shop::ObjectListWindow::Update().

Here is the call graph for this function:

void hoa_video::OptionBox::SetSelection ( int32  index  ) 

Sets the currently selected option (0 to # of options - 1).

Parameters:
index The desired selection index in the list of options You should not call this method until after options have been added. If no options are currently stored when this method is called, the method will print a warning message and return.

Definition at line 392 of file option.cpp.

References _number_columns, _number_options, _number_rows, _scroll_offset, _selection, and hoa_video::VIDEO_DEBUG.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_menu::MenuMode::_SetupEquipOptionBox(), hoa_menu::MenuMode::_SetupInventoryOptionBox(), hoa_menu::MenuMode::_SetupMainOptionBox(), hoa_menu::MenuMode::_SetupOptionsOptionBox(), hoa_menu::MenuMode::_SetupSaveOptionBox(), hoa_menu::MenuMode::_SetupSkillsOptionBox(), hoa_menu::MenuMode::_SetupStatusOptionBox(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_boot::BootMenu::AddOption(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_shop::private_shop::ObjectListWindow::ConstructList(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_quit::QuitMode::QuitMode(), hoa_shop::ShopMode::Reset(), hoa_shop::private_shop::ShopActionWindow::ShopActionWindow(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), and hoa_menu::private_menu::InventoryWindow::Update().

void hoa_video::OptionBox::SetSelectMode ( SelectMode  mode  )  [inline]

Sets the option selection mode (single or double confirm).

Parameters:
mode The selection mode to be set

Definition at line 321 of file option.h.

References hoa_video::private_video::GUIElement::_initialization_errors, _initialized, _selection_mode, and IsInitialized().

Referenced by hoa_menu::MenuMode::_SetupOptionBoxCommonSettings(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_shop::private_shop::ObjectListWindow::ObjectListWindow(), hoa_shop::private_shop::ObjectSellListWindow::ObjectSellListWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

Here is the call graph for this function:

void hoa_video::OptionBox::SetSize ( int32  columns,
int32  rows 
) [inline]

Sets the size of the option box in terms of number of columns and rows.

Parameters:
columns The number of columns to allocate for the option box
rows The number of rows to allocate for the option box

Definition at line 301 of file option.h.

References hoa_video::private_video::GUIElement::_initialization_errors, _initialized, _number_columns, _number_rows, and IsInitialized().

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::MenuMode::_SetupEquipOptionBox(), hoa_menu::MenuMode::_SetupInventoryOptionBox(), hoa_menu::MenuMode::_SetupMainOptionBox(), hoa_menu::MenuMode::_SetupOptionsOptionBox(), hoa_menu::MenuMode::_SetupSaveOptionBox(), hoa_menu::MenuMode::_SetupSkillsOptionBox(), hoa_menu::MenuMode::_SetupStatusOptionBox(), hoa_menu::private_menu::EquipWindow::_UpdateEquipList(), hoa_menu::private_menu::InventoryWindow::_UpdateItemText(), hoa_menu::private_menu::SkillsWindow::_UpdateSkillList(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_boot::BootMenu::AddOption(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_shop::private_shop::ObjectListWindow::ConstructList(), hoa_battle::private_battle::FinishWindow::FinishWindow(), hoa_quit::QuitMode::QuitMode(), hoa_boot::BootMenu::SetWindowed(), hoa_shop::private_shop::ShopActionWindow::ShopActionWindow(), and hoa_shop::private_shop::ObjectSellListWindow::UpdateSellList().

Here is the call graph for this function:

void hoa_video::OptionBox::SetSwitching ( bool  enable  )  [inline]

Enables or disables the ability to switch the location of two options.

Parameters:
enable True enables switching, false disables it
Note:
Switching is disabled by default

Definition at line 340 of file option.h.

References _switching.

void hoa_video::OptionBox::SetVerticalWrapMode ( WrapMode  mode  )  [inline]

Sets the behavior for vertical wrapping of the cursor.

Parameters:
mode The vertical wrap behavior to set

Definition at line 327 of file option.h.

References _vertical_wrap_mode.

Referenced by hoa_menu::private_menu::InventoryWindow::_InitCategory(), hoa_menu::private_menu::EquipWindow::_InitCharSelect(), hoa_menu::private_menu::SkillsWindow::_InitCharSelect(), hoa_menu::private_menu::StatusWindow::_InitCharSelect(), hoa_menu::private_menu::InventoryWindow::_InitCharSelect(), hoa_menu::private_menu::EquipWindow::_InitEquipmentList(), hoa_menu::private_menu::EquipWindow::_InitEquipmentSelect(), hoa_menu::private_menu::InventoryWindow::_InitInventoryItems(), hoa_menu::private_menu::SkillsWindow::_InitSkillsCategories(), hoa_menu::private_menu::SkillsWindow::_InitSkillsList(), hoa_battle::private_battle::ActionWindow::ActionWindow(), hoa_shop::private_shop::ConfirmWindow::ConfirmWindow(), hoa_boot::BootMenu::SetWindowed(), and hoa_shop::private_shop::ShopActionWindow::ShopActionWindow().

void hoa_video::OptionBox::TEMP_OverideScissorring ( bool  enable  )  [inline]

Used to enable scissoring to the size of the option box instead of the MenuWindow owner's size.

Parameters:
enable Set to true to enable, or false to disable

Definition at line 402 of file option.h.

References _TEMP_overide_scissorring.

Referenced by hoa_menu::private_menu::InventoryWindow::_InitInventoryItems().

void hoa_video::OptionBox::Update ( uint32  frame_time = hoa_system::SystemManager->GetUpdateTime()  )  [virtual]

Updates any blinking or scrolling effects for the option box.

Parameters:
frame_time The number of milliseconds elapsed this frame This method also resets any registered events, allowing new events to be processed by the option box. Therefore it is recommended that this method be called on every frame while it is active.

Implements hoa_video::private_video::GUIElement.

Definition at line 57 of file option.cpp.

References _blink, _blink_time, _event, _scroll_time, _scrolling, hoa_video::VIDEO_CURSOR_BLINK_RATE, and hoa_video::VIDEO_OPTION_SCROLL_TIME.

Referenced by hoa_boot::BootMenu::GetEvent(), hoa_shop::private_shop::ConfirmWindow::Update(), hoa_shop::private_shop::ObjectSellListWindow::Update(), hoa_shop::private_shop::ObjectListWindow::Update(), hoa_shop::private_shop::ShopActionWindow::Update(), hoa_quit::QuitMode::Update(), hoa_menu::private_menu::EquipWindow::Update(), hoa_menu::private_menu::SkillsWindow::Update(), hoa_menu::private_menu::StatusWindow::Update(), hoa_menu::private_menu::InventoryWindow::Update(), and hoa_menu::MenuMode::Update().


Member Data Documentation

bool hoa_video::OptionBox::_blink [private]

Used for the blinking cursor feature. When false, the cursor will not be drawn.

Definition at line 481 of file option.h.

Referenced by Draw(), OptionBox(), and Update().

int32 hoa_video::OptionBox::_blink_time [private]

The timer used for controlling the cursor blinking rate.

Definition at line 484 of file option.h.

Referenced by OptionBox(), and Update().

CursorState hoa_video::OptionBox::_cursor_state [private]

The current cursor state (blinking, visible, hidden, etc).

Definition at line 478 of file option.h.

Referenced by Draw(), OptionBox(), and SetCursorState().

float hoa_video::OptionBox::_cursor_xoffset [private]

Retains the x and y offsets for where the cursor should be drawn relative to the selected option.

Definition at line 446 of file option.h.

Referenced by Draw(), OptionBox(), and SetCursorOffset().

float hoa_video::OptionBox::_cursor_yoffset [private]

Definition at line 446 of file option.h.

Referenced by Draw(), OptionBox(), and SetCursorOffset().

int32 hoa_video::OptionBox::_event [private]

Holds the most recent OptionBox event that occurred.

Definition at line 467 of file option.h.

Referenced by _ChangeSelection(), GetEvent(), HandleCancelKey(), HandleConfirmKey(), HandleDownKey(), HandleLeftKey(), HandleRightKey(), HandleUpKey(), OptionBox(), and Update().

int32 hoa_video::OptionBox::_first_selection [private]

The first selection that the player made when in double-confirm selection mode.

Note:
This is set to -1 when no first selection has been made

Definition at line 475 of file option.h.

Referenced by Draw(), HandleCancelKey(), HandleConfirmKey(), and OptionBox().

std::string hoa_video::OptionBox::_font [private]

The font used for rendering the text.

Definition at line 437 of file option.h.

Referenced by Draw(), and SetFont().

float hoa_video::OptionBox::_horizontal_spacing [private]

The amount of horizontal spacing between option cells.

Definition at line 452 of file option.h.

Referenced by Draw(), OptionBox(), and SetCellSize().

WrapMode hoa_video::OptionBox::_horizontal_wrap_mode [private]

The wrapping mode used for horizontal cursor movement.

Definition at line 431 of file option.h.

Referenced by _ChangeSelection(), OptionBox(), and SetHorizontalWrapMode().

bool hoa_video::OptionBox::_initialized [private]

When set to true, indicates that the option box is initialized and ready to be used.

Reimplemented from hoa_video::private_video::GUIElement.

Definition at line 407 of file option.h.

Referenced by Draw(), OptionBox(), SetCellSize(), SetFont(), SetOptionAlignment(), SetSelectMode(), and SetSize().

int32 hoa_video::OptionBox::_number_columns [private]

The number of columns of options.

Definition at line 422 of file option.h.

Referenced by _ChangeSelection(), Draw(), GetNumberColumns(), OptionBox(), SetSelection(), and SetSize().

int32 hoa_video::OptionBox::_number_options [private]

The number of options there are in this box.

Definition at line 419 of file option.h.

Referenced by _ChangeSelection(), AddOption(), Draw(), EnableOption(), GetNumberOptions(), HandleConfirmKey(), OptionBox(), SetOptionText(), and SetSelection().

int32 hoa_video::OptionBox::_number_rows [private]

The number of rows of options.

Definition at line 425 of file option.h.

Referenced by _ChangeSelection(), Draw(), GetNumberRows(), OptionBox(), SetSelection(), and SetSize().

int32 hoa_video::OptionBox::_option_xalign [private]

The horizontal alignment type for option cell contents.

Definition at line 458 of file option.h.

Referenced by Draw(), OptionBox(), and SetOptionAlignment().

int32 hoa_video::OptionBox::_option_yalign [private]

The vertical alignment type for option cell contents.

Definition at line 461 of file option.h.

Referenced by Draw(), OptionBox(), and SetOptionAlignment().

std::vector<private_video::Option> hoa_video::OptionBox::_options [private]

The vector containing all of the options This 1D structure represents a 2D array of options. For an option box with 2 rows and 3 columns, the first 3 elements would contain the contents of the 1st row (left to right) and the last 3 elements would contain the second row.

Definition at line 414 of file option.h.

Referenced by AddOption(), ClearOptions(), Draw(), EnableOption(), HandleConfirmKey(), IsEnabled(), and SetOptionText().

int32 hoa_video::OptionBox::_scroll_direction [private]

Indicates the scrolling direction; 1 for down or -1 for up.

Definition at line 493 of file option.h.

Referenced by _ChangeSelection(), and Draw().

int32 hoa_video::OptionBox::_scroll_offset [private]

A draw offset used for the option box when it is scrolling.

Definition at line 449 of file option.h.

Referenced by _ChangeSelection(), Draw(), OptionBox(), and SetSelection().

int32 hoa_video::OptionBox::_scroll_time [private]

The timer used for controlling option scrolling.

Definition at line 490 of file option.h.

Referenced by _ChangeSelection(), Draw(), OptionBox(), and Update().

bool hoa_video::OptionBox::_scrolling [private]

Set to true if the box is currently in the middle of scrolling.

Definition at line 487 of file option.h.

Referenced by _ChangeSelection(), Draw(), HandleCancelKey(), HandleConfirmKey(), HandleDownKey(), HandleLeftKey(), HandleRightKey(), HandleUpKey(), IsScrolling(), OptionBox(), and Update().

int32 hoa_video::OptionBox::_selection [private]

The index of the currently selected option.

Definition at line 470 of file option.h.

Referenced by _ChangeSelection(), Draw(), GetSelection(), HandleConfirmKey(), OptionBox(), and SetSelection().

SelectMode hoa_video::OptionBox::_selection_mode [private]

The selection mode for the option box (ie single or double confirm selection).

Definition at line 428 of file option.h.

Referenced by HandleConfirmKey(), OptionBox(), and SetSelectMode().

bool hoa_video::OptionBox::_switching [private]

When set to true, the user may switch the locations of two different options.

Definition at line 440 of file option.h.

Referenced by HandleConfirmKey(), OptionBox(), and SetSwitching().

bool hoa_video::OptionBox::_TEMP_overide_scissorring [private]

True if scissoring is enabled and using the option box's size instead of the owner MenuWindow's size.

Definition at line 497 of file option.h.

Referenced by Draw(), OptionBox(), and TEMP_OverideScissorring().

float hoa_video::OptionBox::_vertical_spacing [private]

The amount of vertical spacing between option cells.

Definition at line 455 of file option.h.

Referenced by Draw(), OptionBox(), and SetCellSize().

WrapMode hoa_video::OptionBox::_vertical_wrap_mode [private]

The wrapping mode used for vertical cursor movement.

Definition at line 434 of file option.h.

Referenced by _ChangeSelection(), OptionBox(), and SetVerticalWrapMode().


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