Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10590 in orxonox.OLD for branches/cleanup/src/world_entities


Ignore:
Timestamp:
Feb 13, 2007, 3:53:43 PM (18 years ago)
Author:
bensch
Message:

minor cleanup of the Quests

Location:
branches/cleanup/src/world_entities/questGUI
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/cleanup/src/world_entities/questGUI/quest.cc

    r10374 r10590  
    2222#include "quest.h"
    2323
    24 #include "event_handler.h"
    25 
    26 #include "state.h"
    27 
    2824#include "util/loading/load_param.h"
    2925#include "util/loading/factory.h"
    3026
    31 #include "graphics_engine.h"
    32 #include "camera.h"
    33 #include "sound_engine.h"
     27#include "glgui.h"
    3428
    35 #include "sound_source.h"
    36 
    37 #include "glgui.h"
    38 #include "menu/glgui_imagebutton.h"
    39 #include "glgui_multiline_text.h"
    40 #include <glgui_image.h>
    41 
    42 
    43 #include "shell_command.h"
    4429
    4530
     
    5237  this->registerObject(this, Quest::_objectList);
    5338 
    54   this->Status = false;
     39  this->status = false;
    5540
    5641  if( root != NULL)
     
    9681void Quest::setQuestActive()
    9782{
    98   this->Status = true;
     83  this->status = true;
    9984}
    10085
    10186void Quest::setQuestInactive()
    10287{
    103   this->Status = false;
     88  this->status = false;
    10489}
    105 
    106 const bool Quest::getQuestStatus()
    107 {
    108   return this->Status;
    109 }
  • branches/cleanup/src/world_entities/questGUI/quest.h

    r10374 r10590  
    2020   virtual void loadParams(const TiXmlElement* root = NULL);
    2121   
    22    inline void setQuestName(const std::string& questName)                { this->questName = questName; }
    23    inline const std::string& getQuestName()                              { return this->questName; }
    24    inline void setQuestDescription(const std::string& questDescription)  { this->questDescription = questDescription; }
    25    inline const std::string& getQuestDescription()                       { return this->questDescription; }
    26    inline void setQuestPicture(const std::string& questPicture)          { this->questPicture = questPicture; }
    27    inline const std::string& getQuestPicture()                           { return this->questPicture; }
    28    inline void setQuestDifficulty(const std::string& questDifficulty)    { this->questDifficulty = questDifficulty; }
    29    inline const std::string& getQuestDifficulty()                        { return this->questDifficulty; }
     22   inline void setQuestName(const std::string& questName) { this->questName = questName; }
     23   inline const std::string& getQuestName() const { return this->questName; }
    3024   
    31    inline void setQuestPersons(const std::string& questPersons)          { this->questPersons = questPersons; }
    32    inline const std::string& getQuestPersons()                        { return this->questPersons; }
     25   inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; }
     26   inline const std::string& getQuestDescription() const { return this->questDescription; }
    3327   
    34    inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription  = rewardDescription; }
    35    inline const std::string& getRewardDescription()                      { return this->rewardDescription; }
    36    inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
    37    inline const std::string& getRewardPicture()                          { return this->rewardPicture; }
     28   inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; }
     29   inline const std::string& getQuestPicture() const { return this->questPicture; }
     30   
     31   inline void setQuestDifficulty(const std::string& questDifficulty) { this->questDifficulty = questDifficulty; }
     32   inline const std::string& getQuestDifficulty() const { return this->questDifficulty; }
     33   
     34   inline void setQuestPersons(const std::string& questPersons) { this->questPersons = questPersons; }
     35   inline const std::string& getQuestPersons() const { return this->questPersons; }
     36   
     37   inline void setRewardDescription(const std::string& rewardDescription) { this->rewardDescription  = rewardDescription; }
     38   inline const std::string& getRewardDescription() const { return this->rewardDescription; }
     39   
     40   inline void setRewardPicture(const std::string& rewardPicture) { this->rewardPicture  = rewardPicture; }
     41   inline const std::string& getRewardPicture() const { return this->rewardPicture; }
     42   
    3843   void setQuestActive();
    3944   void setQuestInactive();
    40    const bool getQuestStatus();
     45   const bool getQuestStatus() const { return status; };
    4146   
    4247
    4348   
    4449  private:
    45     bool                    Status;
     50    bool                    status;
    4651    std::string             questName;
    4752    std::string             questDescription;
  • branches/cleanup/src/world_entities/questGUI/quest_gui.cc

    r10507 r10590  
    33/*
    44   orxonox - the future of 3D-vertical-scrollers
    5 
     5 
    66   Copyright (C) 1004 orx
    7 
     7 
    88   This program is free software; you can redistribute it and/or modify
    99   it under the terms of the GNU General Public License as published by
    1010   the Free Software Foundation; either version 2, or (at your option)
    1111   any later version.
    12 
     12 
    1313   ### File Specific:
    1414   main-programmer    std::string             questName;
     
    1818    std::string             rewardDescription;
    1919    std::string             rewardPicture;: Andreas Hejj
    20 
     20 
    2121*/
    2222
     
    2727#include "quest_gui.h"
    2828
    29 #include "event_handler.h"
    30 
    31 #include "state.h"
    32 
    3329#include "util/loading/load_param.h"
    3430#include "util/loading/factory.h"
    3531
    36 #include "graphics_engine.h"
    37 #include "camera.h"
    3832#include "sound_engine.h"
    3933
    40 #include "sound_source.h"
    41 
    42 #include "glgui_widget.h"
     34
    4335#include "glgui.h"
    4436#include "menu/glgui_imagebutton.h"
    4537#include "glgui_multiline_text.h"
    46 #include <glgui_image.h>
    4738
    4839#include "event_handler.h"
     
    5041#include "quest.h"
    5142
    52 #include "shell_command.h"
    53 
    5443ObjectListDefinition(QuestGUI);
    55 
    5644CREATE_FACTORY(QuestGUI);
    57 
    58 
    5945
    6046#include "script_class.h"
    6147CREATE_SCRIPTABLE_CLASS(QuestGUI,
    6248                        addMethod("startGUI", Executor0<QuestGUI, lua_State*>(&QuestGUI::startGUI))
    63                       ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
    64                       ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
     49                        ->addMethod("stopGUI",  Executor0<QuestGUI, lua_State*>(&QuestGUI::stopGUI))
     50                        ->addMethod("isActive", Executor0ret<QuestGUI, lua_State*,bool>(&QuestGUI::isActive))
    6551                       );
    6652
     
    6955QuestGUI::QuestGUI(const TiXmlElement* root)
    7056{
     57  this->questBox = NULL;
     58  this->bKillGui = false;
     59  this->bActive = false;
     60
    7161  if (root != NULL)
    7262  {
    73   this->registerObject(this, QuestGUI::_objectList);
    74 
    75   this->toList(OM_GROUP_00);
    76 
    77   this->questBox = NULL;
    78 
    79   this->bKillGui = false;
    80 
    81   this->bActive = false;
    82 
    83   this->myQuest = new Quest(root);
    84 
    85   if(root)
    86     this->loadParams( root);
     63    this->registerObject(this, QuestGUI::_objectList);
     64    this->toList(OM_GROUP_00);
     65    this->myQuest = new Quest(root);
     66
     67    if(root)
     68      this->loadParams( root);
    8769  }
    8870}
     
    11597{
    11698  this->bKillGui = false;
    117 
    11899
    119100  if (questBox == NULL)
     
    254235void QuestGUI::stopGUI()
    255236{
    256     this->bKillGui = true;
     237  this->bKillGui = true;
    257238}
    258239
  • branches/cleanup/src/world_entities/questGUI/quest_gui.h

    r10492 r10590  
    44
    55#include "world_entity.h"
    6 #include "glgui.h"
    7 #include <glgui_image.h>
    8 #include <vector>
    96
    107class Quest;
     8namespace OrxGui { class GLGuiBox; }
    119
    1210class QuestGUI : public WorldEntity
     
    2826
    2927  private:
    30     Quest*                  myQuest;
    31     bool                    bKillGui;
    32     bool                    bActive;
     28    Quest*                 myQuest;
     29    bool                   bKillGui;
     30    bool                   bActive;
    3331
    34     OrxGui::GLGuiBox*       headerBox;
    35     OrxGui::GLGuiBox*       outlineBox;
    36     OrxGui::GLGuiBox*       labelBox;
    37     OrxGui::GLGuiImage*     placeImage;
    3832    OrxGui::GLGuiBox*       questBox;
    39     OrxGui::GLGuiImage*     questImage;
    40     OrxGui::GLGuiBox*       rewardBox;
    41     OrxGui::GLGuiImage*     rewardImage;
    42     OrxGui::GLGuiBox*       answerBox;
    43     OrxGui::GLGuiImage*     placeImage2;
    44     OrxGui::GLGuiBox*       acceptBox;
    45     OrxGui::GLGuiBox*       refuseBox;
    46 
    47 
    48     OrxSound::SoundSource*  selectorSource;
     33   
     34   
    4935
    5036    void accept();
Note: See TracChangeset for help on using the changeset viewer.