VGUI::Gui Class Reference

#include <gui.h>

Collaboration diagram for VGUI::Gui:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Gui ()
 Gui (string path)
 ~Gui ()
void Init ()
void ReInit ()
void DeInit ()
void Draw ()
void KeyPress (SDLKey key)
void KeyRelease (SDLKey key)
void MousePress ()
void MouseRelease ()
void MouseReturn ()
void MouseUpdate ()
void JoyPress (Uint8 joy_idx, Uint8 joy_btn)
void JoyRelease (Uint8 joy_idx, Uint8 joy_btn)
void JoyMove (Uint8 joy_idx, Uint8 joy_axis, float val)
void JoyUpdate ()
void ChangePage (string page_name)
void ProcessAction (string action)
void UpdateScreenSize ()
string GetCurrentPageName ()
bool GetEnabled ()
PageGetPage (string page_name)
void SetCurrentPageName (string new_cur_page)
void SetEnabled (bool new_enabled)
bool GetLocked ()
void SetLocked (bool new_locked)

Private Attributes

TEXTURE_HANDLE mouse_pointer
map< string, Page * > pages
string cur_page
string last_page
string menu_path
bool menu_enabled
float ptr_w
float ptr_h
int mouse_x
int mouse_y
int mouse_lock_x
int mouse_lock_y
int screen_width
int screen_height
bool l
bool m
bool r
bool u
bool d
bool joy_l
bool joy_r
bool joy_u
bool joy_d
bool joy_positive
bool key_down
bool cancel_down
Uint32 joy_press_time
Uint32 page_switch_time
Uint8 last_axis
Uint8 last_joy
float joy_axis_value
bool is_locked
bool loaded
bool calibrated

Detailed Description

Definition at line 22 of file gui.h.


Constructor & Destructor Documentation

Gui::Gui  ) 
 

Definition at line 37 of file gui.cpp.

References SETTINGS::GetSkinPath(), loaded, menu_path, and settings.

Gui::Gui string  path  ) 
 

Definition at line 43 of file gui.cpp.

References loaded, and menu_path.

Gui::~Gui  ) 
 

Definition at line 49 of file gui.cpp.


Member Function Documentation

void Gui::ChangePage string  page_name  ) 
 

Definition at line 790 of file gui.cpp.

References cur_page, last_page, page_switch_time, and pages.

Referenced by ProcessAction().

void Gui::DeInit  ) 
 

Definition at line 105 of file gui.cpp.

References pages.

Referenced by Init().

void Gui::Draw  ) 
 

Definition at line 149 of file gui.cpp.

References cur_page, UTILITY::Draw2D(), is_locked, last_page, menu_enabled, mouse_pointer, mouse_x, mouse_y, MouseUpdate(), page_switch_time, pages, ptr_h, ptr_w, screen_height, screen_width, and utility.

string VGUI::Gui::GetCurrentPageName  )  [inline]
 

Definition at line 65 of file gui.h.

References cur_page.

bool VGUI::Gui::GetEnabled  )  [inline]
 

Definition at line 66 of file gui.h.

References menu_enabled.

Referenced by ChangeDisplay(), handleKeyPress(), handleKeyRelease(), and MainPause().

bool VGUI::Gui::GetLocked  )  [inline]
 

Definition at line 72 of file gui.h.

References is_locked.

Page* VGUI::Gui::GetPage string  page_name  )  [inline]
 

Definition at line 67 of file gui.h.

References pages.

void Gui::Init  ) 
 

Definition at line 53 of file gui.cpp.

References DeInit(), SETTINGS::GetDataDir(), UTILITY::GetFolderIndex(), SETTINGS::GetFullDataPath(), loaded, menu_path, pages, settings, utility, and verbose_output.

Referenced by ReInit().

void Gui::JoyMove Uint8  joy_idx,
Uint8  joy_axis,
float  val
 

Definition at line 498 of file gui.cpp.

References calibrated, cur_page, is_locked, joy_axis_value, joy_d, joy_l, joy_positive, joy_press_time, joy_r, joy_u, last_axis, last_joy, menu_enabled, and pages.

void Gui::JoyPress Uint8  joy_idx,
Uint8  joy_btn
 

Definition at line 432 of file gui.cpp.

References calibrated, cancel_down, cur_page, is_locked, key_down, menu_enabled, and pages.

void Gui::JoyRelease Uint8  joy_idx,
Uint8  joy_btn
 

Definition at line 462 of file gui.cpp.

References calibrated, cancel_down, cur_page, is_locked, key_down, menu_enabled, pages, and ProcessAction().

void Gui::JoyUpdate  ) 
 

Definition at line 565 of file gui.cpp.

References calibrated, cur_page, is_locked, joy_axis_value, joy_d, joy_l, joy_positive, joy_press_time, joy_r, joy_u, last_axis, last_joy, and pages.

void Gui::KeyPress SDLKey  key  ) 
 

Definition at line 202 of file gui.cpp.

References cur_page, is_locked, menu_enabled, and pages.

void Gui::KeyRelease SDLKey  key  ) 
 

Definition at line 256 of file gui.cpp.

References cur_page, is_locked, menu_enabled, pages, and ProcessAction().

void Gui::MousePress  ) 
 

Definition at line 296 of file gui.cpp.

References d, MOUSE::GetMouseButtons(), MOUSE::GetMousePos(), is_locked, MOUSE::IsPressed(), l, m, menu_enabled, mouse, mouse_x, mouse_y, r, screen_height, screen_width, and u.

void Gui::MouseRelease  ) 
 

Definition at line 345 of file gui.cpp.

References cur_page, d, MOUSE::GetMouseButtons(), MOUSE::GetMousePos(), is_locked, l, m, menu_enabled, mouse, mouse_x, mouse_y, pages, ProcessAction(), r, screen_height, screen_width, and u.

void Gui::MouseReturn  ) 
 

Definition at line 427 of file gui.cpp.

References mouse_x, and mouse_y.

void Gui::MouseUpdate  ) 
 

Definition at line 376 of file gui.cpp.

References cur_page, MOUSE::GetMousePos(), is_locked, mouse, mouse_lock_x, mouse_lock_y, mouse_x, mouse_y, pages, screen_height, and screen_width.

Referenced by Draw().

void Gui::ProcessAction string  action  ) 
 

Definition at line 607 of file gui.cpp.

References calibrated, ChangePage(), cur_page, gamecontrols, SETTINGS::Get(), is_locked, last_page, LoadWorld(), menu_enabled, mouse, mouse_lock_x, mouse_lock_y, mouse_x, mouse_y, pages, Quit(), ReloadDisplay(), replay, SETTINGS::Set(), GAMESTATE::SetGameState(), settings, sound, REPLAY::Start(), state, STATE_PLAYING, SOUNDMANAGER::UpdateSettings(), VAMOSWORLD::UpdateSettings(), GAMECONTROLS::UpdateSettings(), MOUSE::UpdateSettings(), and world.

Referenced by JoyRelease(), KeyRelease(), MainPause(), and MouseRelease().

void Gui::ReInit  ) 
 

Definition at line 96 of file gui.cpp.

References Init(), loaded, and menu_enabled.

Referenced by ChangeDisplay().

void VGUI::Gui::SetCurrentPageName string  new_cur_page  )  [inline]
 

Definition at line 69 of file gui.h.

References cur_page.

void VGUI::Gui::SetEnabled bool  new_enabled  )  [inline]
 

Definition at line 70 of file gui.h.

References menu_enabled.

Referenced by ChangeDisplay().

void VGUI::Gui::SetLocked bool  new_locked  )  [inline]
 

Definition at line 73 of file gui.h.

References is_locked.

void Gui::UpdateScreenSize  ) 
 

Definition at line 142 of file gui.cpp.

References SETTINGS::Get(), screen_height, screen_width, and settings.

Referenced by ChangeDisplay().


Member Data Documentation

bool VGUI::Gui::calibrated [private]
 

Definition at line 41 of file gui.h.

Referenced by JoyMove(), JoyPress(), JoyRelease(), JoyUpdate(), and ProcessAction().

bool VGUI::Gui::cancel_down [private]
 

Definition at line 36 of file gui.h.

Referenced by JoyPress(), and JoyRelease().

string VGUI::Gui::cur_page [private]
 

Definition at line 27 of file gui.h.

Referenced by ChangePage(), Draw(), GetCurrentPageName(), JoyMove(), JoyPress(), JoyRelease(), JoyUpdate(), KeyPress(), KeyRelease(), MouseRelease(), MouseUpdate(), ProcessAction(), and SetCurrentPageName().

bool VGUI::Gui::d [private]
 

Definition at line 34 of file gui.h.

Referenced by MousePress(), and MouseRelease().

bool VGUI::Gui::is_locked [private]
 

Definition at line 41 of file gui.h.

Referenced by Draw(), GetLocked(), JoyMove(), JoyPress(), JoyRelease(), JoyUpdate(), KeyPress(), KeyRelease(), MousePress(), MouseRelease(), MouseUpdate(), ProcessAction(), and SetLocked().

float VGUI::Gui::joy_axis_value [private]
 

Definition at line 40 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::joy_d [private]
 

Definition at line 35 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::joy_l [private]
 

Definition at line 35 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::joy_positive [private]
 

Definition at line 35 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

Uint32 VGUI::Gui::joy_press_time [private]
 

Definition at line 37 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::joy_r [private]
 

Definition at line 35 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::joy_u [private]
 

Definition at line 35 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

bool VGUI::Gui::key_down [private]
 

Definition at line 36 of file gui.h.

Referenced by JoyPress(), and JoyRelease().

bool VGUI::Gui::l [private]
 

Definition at line 34 of file gui.h.

Referenced by MousePress(), and MouseRelease().

Uint8 VGUI::Gui::last_axis [private]
 

Definition at line 39 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

Uint8 VGUI::Gui::last_joy [private]
 

Definition at line 39 of file gui.h.

Referenced by JoyMove(), and JoyUpdate().

string VGUI::Gui::last_page [private]
 

Definition at line 27 of file gui.h.

Referenced by ChangePage(), Draw(), and ProcessAction().

bool VGUI::Gui::loaded [private]
 

Definition at line 41 of file gui.h.

Referenced by Gui(), Init(), and ReInit().

bool VGUI::Gui::m [private]
 

Definition at line 34 of file gui.h.

Referenced by MousePress(), and MouseRelease().

bool VGUI::Gui::menu_enabled [private]
 

Definition at line 29 of file gui.h.

Referenced by Draw(), GetEnabled(), JoyMove(), JoyPress(), JoyRelease(), KeyPress(), KeyRelease(), MousePress(), MouseRelease(), ProcessAction(), ReInit(), and SetEnabled().

string VGUI::Gui::menu_path [private]
 

Definition at line 28 of file gui.h.

Referenced by Gui(), and Init().

int VGUI::Gui::mouse_lock_x [private]
 

Definition at line 32 of file gui.h.

Referenced by MouseUpdate(), and ProcessAction().

int VGUI::Gui::mouse_lock_y [private]
 

Definition at line 32 of file gui.h.

Referenced by MouseUpdate(), and ProcessAction().

TEXTURE_HANDLE VGUI::Gui::mouse_pointer [private]
 

Definition at line 25 of file gui.h.

Referenced by Draw().

int VGUI::Gui::mouse_x [private]
 

Definition at line 31 of file gui.h.

Referenced by Draw(), MousePress(), MouseRelease(), MouseReturn(), MouseUpdate(), and ProcessAction().

int VGUI::Gui::mouse_y [private]
 

Definition at line 31 of file gui.h.

Referenced by Draw(), MousePress(), MouseRelease(), MouseReturn(), MouseUpdate(), and ProcessAction().

Uint32 VGUI::Gui::page_switch_time [private]
 

Definition at line 38 of file gui.h.

Referenced by ChangePage(), and Draw().

map<string, Page*> VGUI::Gui::pages [private]
 

Definition at line 26 of file gui.h.

Referenced by ChangePage(), DeInit(), Draw(), GetPage(), Init(), JoyMove(), JoyPress(), JoyRelease(), JoyUpdate(), KeyPress(), KeyRelease(), MouseRelease(), MouseUpdate(), and ProcessAction().

float VGUI::Gui::ptr_h [private]
 

Definition at line 30 of file gui.h.

Referenced by Draw().

float VGUI::Gui::ptr_w [private]
 

Definition at line 30 of file gui.h.

Referenced by Draw().

bool VGUI::Gui::r [private]
 

Definition at line 34 of file gui.h.

Referenced by MousePress(), and MouseRelease().

int VGUI::Gui::screen_height [private]
 

Definition at line 33 of file gui.h.

Referenced by Draw(), MousePress(), MouseRelease(), MouseUpdate(), and UpdateScreenSize().

int VGUI::Gui::screen_width [private]
 

Definition at line 33 of file gui.h.

Referenced by Draw(), MousePress(), MouseRelease(), MouseUpdate(), and UpdateScreenSize().

bool VGUI::Gui::u [private]
 

Definition at line 34 of file gui.h.

Referenced by MousePress(), and MouseRelease().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:14:16 2006 by  doxygen 1.4.6