Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10167 in orxonox.OLD for branches/gui/src/world_entities


Ignore:
Timestamp:
Jan 3, 2007, 4:38:00 PM (18 years ago)
Author:
hejja
Message:

Borders done

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

Legend:

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

    r10164 r10167  
    5151{
    5252  this->registerObject(this, Quest::_objectList);
     53 
     54  this->Status = false;
    5355
    5456  if( root != NULL)
     
    7274 * @param root: root xml tag for this element
    7375 */
     76 
    7477void Quest::loadParams(const TiXmlElement* root)
    7578{
     
    8992}
    9093
     94void Quest::setQuestActive()
     95{
     96  this->Status = true;
     97}
     98
     99void Quest::setQuestInactive()
     100{
     101  this->Status = false;
     102}
     103
     104const bool Quest::getQuestStatus()
     105{
     106  return this->Status;
     107}
  • branches/gui/src/world_entities/questGUI/quest.h

    r10129 r10167  
    1919
    2020   virtual void loadParams(const TiXmlElement* root = NULL);
    21 
    22    /** @param questName sets the name of this quest */
     21   
    2322   inline void setQuestName(const std::string& questName)                { this->questName = questName; }
    2423   inline const std::string& getQuestName()                              { return this->questName; }
     
    3332   inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
    3433   inline const std::string& getRewardPicture()                          { return this->rewardPicture; }
     34   void setQuestActive();
     35   void setQuestInactive();
     36   const bool getQuestStatus();
     37   
    3538
    3639   
    3740  private:
     41    bool                    Status;
    3842    std::string             questName;
    3943    std::string             questDescription;
  • branches/gui/src/world_entities/questGUI/quest_gui.cc

    r10164 r10167  
    6464{
    6565  this->registerObject(this, QuestGUI::_objectList);
    66 
     66 
    6767  this->toList(OM_GROUP_00);
    6868 
     
    116116      questImage->loadImageFromFile(this->myQuest->getQuestPicture());
    117117      questImage->show();
    118       //questImage->setBorderBottom(20);
    119118      headerBox->pack(questImage);
    120119     
     
    125124        outlineBox->pack(questDifficulty);
    126125      }
     126      headerBox->setBorderBottom(40);
    127127      headerBox->pack(outlineBox);
    128       headerBox->setBorderBottom(100);
    129      
    130128    }
    131129   
     
    135133      questTxt->setText(this->myQuest->getQuestDescription());
    136134      labelBox->pack(questTxt);
    137       labelBox->setBorderBottom(100);
    138       labelBox->setBorderTop(100);
     135      labelBox->setBorderBottom(40);
    139136    }
    140137   
     
    147144      rewardImage->show();
    148145      rewardBox->pack(rewardImage);
    149       //rewardImage->setBorderBottom(50);
    150146   
    151147      OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText();
    152148      rewardTxt->setText(this->myQuest->getRewardDescription());
     149      rewardBox->setBorderBottom(40);
    153150      rewardBox->pack(rewardTxt);
    154       rewardBox->setBorderBottom(100);
    155      
    156151    }
    157152   
    158153    OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    159154    {
    160       OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept");
    161       acceptButton->released.connect(this, &QuestGUI::accept);
    162       answerBox->pack(acceptButton);
    163       acceptButton->select();
     155      OrxGui::GLGuiBox* acceptBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     156      {
     157        OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept");
     158        acceptButton->released.connect(this, &QuestGUI::accept);
     159        acceptBox->setBorderRight(70);
     160        acceptBox->pack(acceptButton);
     161      }
    164162     
    165       OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse");
    166       refuseButton->released.connect(this, &QuestGUI::refuse);
    167       answerBox->pack(refuseButton);
    168     }
    169    
     163      OrxGui::GLGuiBox* refuseBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     164      {
     165        OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse");
     166        refuseButton->released.connect(this, &QuestGUI::refuse);
     167        refuseBox->setBorderLeft(0);
     168        refuseBox->pack(refuseButton);
     169      }
     170      answerBox->pack(acceptBox);
     171      answerBox->pack(refuseBox);
     172    }
    170173    this->questBox->pack(headerBox);
    171174    this->questBox->pack(labelBox);
     
    195198void QuestGUI::accept()
    196199{
     200  this->myQuest->setQuestActive();
    197201  this->bKillGui = true;
    198  
    199202}
    200203
  • branches/gui/src/world_entities/questGUI/quest_gui.h

    r10164 r10167  
    3838    OrxGui::GLGuiImage*     rewardImage;
    3939    OrxGui::GLGuiBox*       answerBox;
     40    OrxGui::GLGuiBox*       acceptBox;
     41    OrxGui::GLGuiBox*       refuseBox;
    4042
    4143    OrxSound::SoundSource*  selectorSource;
Note: See TracChangeset for help on using the changeset viewer.