Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10492 in orxonox.OLD


Ignore:
Timestamp:
Jan 30, 2007, 1:30:44 AM (17 years ago)
Author:
patrick
Message:

blinki patch

Location:
trunk/src/world_entities/questGUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/questGUI/quest_gui.cc

    r10491 r10492  
    5959#include "script_class.h"
    6060CREATE_SCRIPTABLE_CLASS(QuestGUI,
    61                         addMethod("guiInit", Executor0<QuestGUI, lua_State*>(&QuestGUI::guiInit))
    62                         ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
     61                        addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI))
     62                      ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
     63                      ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
    6364                       );
    6465
     
    8081
    8182  this->myQuest = new Quest(root);
     83
    8284  if(root)
    8385    this->loadParams( root);
     
    109111 * initializes the gui
    110112 */
    111 void QuestGUI::guiInit()
    112 {
     113void QuestGUI::startGUI()
     114{
     115  this->bKillGui = false;
     116
     117
    113118  if (questBox == NULL)
    114119  {
     
    119124    questBox->setBorderBottom(10);
    120125    this->questBox->setBackgroundTexture("textures/gui/gui_quest_border.png");
    121     this->bKillGui = false;
    122126
    123127    OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     
    243247    OrxGui::GLGuiHandler::getInstance()->activateCursor();
    244248  }
    245   else
    246   {
     249}
     250
     251void QuestGUI::stopGUI()
     252{
    247253    this->bKillGui = true;
    248   }
    249 
    250254}
    251255
     
    278282  this->questBox = NULL;
    279283  this->bKillGui = false;
    280 }
     284  this->bActive = false;
     285}
  • trunk/src/world_entities/questGUI/quest_gui.h

    r10374 r10492  
    1010class Quest;
    1111
    12 class QuestGUI : public WorldEntity 
     12class QuestGUI : public WorldEntity
    1313{
    1414
    1515  ObjectListDeclaration(QuestGUI);
    16  
     16
    1717  public:
    1818   QuestGUI (const TiXmlElement* root = NULL);
    1919   virtual ~QuestGUI ();
    20                      
     20
    2121   void loadParams(const TiXmlElement* root);
    2222   bool isActive(){ return this->bActive; }
    23    void guiInit();
     23
     24   void startGUI();
     25   void stopGUI();
    2426
    2527   virtual void tick(float dt);
    26    
     28
    2729  private:
    2830    Quest*                  myQuest;
    2931    bool                    bKillGui;
    3032    bool                    bActive;
    31    
     33
    3234    OrxGui::GLGuiBox*       headerBox;
    33     OrxGui::GLGuiBox*       outlineBox; 
     35    OrxGui::GLGuiBox*       outlineBox;
    3436    OrxGui::GLGuiBox*       labelBox;
    3537    OrxGui::GLGuiImage*     placeImage;
     
    4547
    4648    OrxSound::SoundSource*  selectorSource;
    47    
     49
    4850    void accept();
    4951    void refuse();
Note: See TracChangeset for help on using the changeset viewer.