#include <ExManagerMenu.h>
Inheritance diagram for ExManagerMenu:

Public Methods | |
| void | Reset (void) |
| void | Init (void) |
| void | Draw (void) |
| bool | Load (std::string FileName) |
| bool | Add (std::string FileName) |
| bool | Add (ExCMenu object) |
| ExCAction | InputCommand (ExCCommand Command) |
| ExCAction | InputAction (ExCAction Action) |
Static Public Methods | |
| ExManagerMenu * | CreateSingleton (void) |
Private Methods | |
| ExManagerMenu (void) | |
| ~ExManagerMenu (void) | |
Static Private Attributes | |
| bool | m_flag = false |
| ExManagerMenu * | m_instance = NULL |
|
|
Definition at line 43 of file ExManagerMenu.cpp.
00044 {
00045 }
|
|
|
Definition at line 47 of file ExManagerMenu.cpp.
00048 {
00049 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 110 of file ExManagerMenu.cpp. References ExManagerObject::Add(), Add(), and Guard.
00111 {
00112 Guard(ExManagerMenu::Add(ExCMenu object))
00113 return ExManagerObject<ExCMenu>::Add(object);
00114 UnGuard
00115 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 118 of file ExManagerMenu.cpp. References Add(), ExManager::Consol, Guard, and ExCMenu::LoadFile(). Referenced by Add(), Init(), and Load().
00119 {
00120 Guard(ExManagerMenu::Add(std::string FileName))
00121 try
00122 {
00123 ExCMenu object;
00124 object.LoadFile(FileName);
00125 Add(object);
00126 }
00127 catch(ExCExpFileNotFound)
00128 {
00129 *Consol<<"ExManagerObject::ExCeption =>"<<FileName<<" File not found"<<std::endl;
00130 }
00131 catch(ExCExpFileReadError)
00132 {
00133 *Consol<<"ExManagerObject::ExCeption =>"<<FileName<<" Read file error"<<std::endl;
00134 }
00135 catch(...)
00136 {
00137 *Consol<<"ExManagerObject::ExCeption =>"<<FileName<<" Unknow exception"<<std::endl;
00138 }
00139 return false;
00140 UnGuard
00141 }
|
|
|
Definition at line 29 of file ExManagerMenu.cpp. References CreateSingleton(), Guard, m_flag, and m_instance. Referenced by CreateSingleton(), and main().
00029 {
00030 Guard(ExManagerMenu* ExManagerMenu::CreateSingleton(void))
00031 if(!m_flag)
00032 {
00033 m_flag = true; // We are creating the error log now, so set flag to true
00034 m_instance = new ExManagerMenu; // Create the error log
00035 }else
00036 {
00037 std::cout<<"Error singleton already created"<<std::endl;
00038 }
00039 return m_instance;
00040 UnGuard
00041 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 93 of file ExManagerMenu.cpp. References ExCMenu::Draw(), Draw(), ExManagerObject< ExCMenu >::GetCurrentObject(), ExManager::GetStatus(), and Guard. Referenced by Draw(), and ExManagerOutput::DrawScene().
00094 {
00095 Guard(void ExManagerMenu::Draw(void))
00096 if(!GetStatus())return;
00097 glDisable(GL_LIGHTING);
00098 if(GetCurrentObject()!=NULL)GetCurrentObject()->Draw();
00099 glEnable(GL_LIGHTING);
00100 UnGuard
00101 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 51 of file ExManagerMenu.cpp. References Add(), Guard, ExManagerObject::Init(), Init(), ExCMenu::LoadFile(), ExManager::SetAskForCommand(), ExManager::SetAskForExclusifCommand(), ExManagerObject< ExCMenu >::SetCurrentObject(), ExCObject::SetName(), and ExManager::SetStatus(). Referenced by Init(), InitManager(), and Reset().
00052 {
00053 Guard(void ExManagerMenu::Init(void))
00054 ExManagerObject<ExCMenu>::Init();
00055
00056 SetStatus(true);
00057 SetAskForCommand(true);
00058 SetAskForExclusifCommand(true);
00059
00060 ExCMenu object;
00061 object.LoadFile("start.men");
00062 object.SetName("StartMenu");
00063 ExManagerMenu::Add(object);
00064 SetCurrentObject("StartMenu");
00065
00066 ExCMenu object2;
00067 object2.LoadFile("credit.men");
00068 object2.SetName("CreditMenu");
00069 ExManagerMenu::Add(object2);
00070
00071 ExCMenu object3;
00072 object3.LoadFile("option.men");
00073 object3.SetName("OptionMenu");
00074 ExManagerMenu::Add(object3);
00075
00076 ExCMenu object4;
00077 object4.LoadFile("commandmenu.men");
00078 object4.SetName("CommandMenu");
00079 ExManagerMenu::Add(object4);
00080
00081 UnGuard
00082 }
|
|
|
|
Reimplemented from ExManager. Definition at line 143 of file ExManagerMenu.cpp. References DISABLE_MENU, ExCMenu::GetCurrentItemAction(), ExManagerObject< ExCMenu >::GetCurrentObject(), Guard, InputCommand(), ExCCommand::m_Command, ExCMenu::NextItem(), and ExCMenu::PreviousItem(). Referenced by InputCommand(), and ExManagerCommand::InputCommand().
00144 {
00145 Guard(ExManagerMenu::InputCommand(ExCCommand Command))
00146 if(GetCurrentObject()==NULL)return NOTHING;
00147 switch(Command.m_Command)
00148 {
00149 case KEYBOARD_DOWN_ARROW_UP:
00150 GetCurrentObject()->PreviousItem();
00151 break;
00152 case KEYBOARD_DOWN_ARROW_DOWN:
00153 GetCurrentObject()->NextItem();
00154 break;
00155 case KEYBOARD_DOWN_ENTER:
00156 return GetCurrentObject()->GetCurrentItemAction();
00157 break;
00158 case KEYBOARD_DOWN_ESC:
00159 return DISABLE_MENU;
00160 break;
00161 }
00162 return NOTHING;
00163 UnGuard
00164 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 103 of file ExManagerMenu.cpp. References Add(), Guard, and Load(). Referenced by Load().
00104 {
00105 Guard(ExManagerMenu::Load(std::string FileName))
00106 return Add(FileName);
00107 UnGuard
00108 }
|
|
|
Reimplemented from ExManagerObject< ExCMenu >. Definition at line 84 of file ExManagerMenu.cpp. References Guard, Init(), ExManagerObject::Reset(), Reset(), and ExManagerObject< ExCMenu >::SetCurrentObject(). Referenced by ExManagerCommand::ProcesExCAction(), and Reset().
00085 {
00086 Guard(void ExManagerMenu::Reset(void))
00087 ExManagerObject<ExCMenu>::Reset();
00088 Init();
00089 SetCurrentObject("StartMenu0");
00090 UnGuard
00091 }
|
|
|
Definition at line 26 of file ExManagerMenu.cpp. Referenced by CreateSingleton(). |
|
|
Definition at line 27 of file ExManagerMenu.cpp. Referenced by CreateSingleton(). |
1.3-rc1