Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10069 in orxonox.OLD for branches/gui/src


Ignore:
Timestamp:
Dec 13, 2006, 6:32:19 PM (18 years ago)
Author:
hejja
Message:

grobe version nr1

Location:
branches/gui/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/glgui_text.cc

    r9869 r10069  
    5050    this->_text.setFont("fonts/final_frontier.ttf", 20);
    5151    this->_text.setLineWidth(400);
    52     this->_text.setDotsPosition(LimitedWidthText::Begin);
     52//     this->_text.setDotsPosition(LimitedWidthText::Begin);
    5353    this->_text.setColor(foregroundColor());
    5454    this->_text.setVisibility(false);
  • branches/gui/src/world_entities/questGUI/quest_gui.cc

    r10066 r10069  
    5959  this->toList(OM_GROUP_00);
    6060 
    61   this->questBox = NULL;
    62 
    63   this->currentlyOpened = NULL;
    64  
     61  this->questBox = NULL; 
    6562
    6663  if( root != NULL)
     
    9491   LoadParam(root, "quest-picture", this, QuestGUI, setQuestPicture)
    9592       .describe("sets the picture of a quest");
    96    LoadParam(root, "quest-outline", this, QuestGUI, setQuestOutline)
    97        .describe("sets the outline of a quiest");
     93   LoadParam(root, "quest-difficulty", this, QuestGUI, setQuestDifficulty)
     94       .describe("sets the difficulty of a quest");
     95   LoadParam(root, "reward-description", this, QuestGUI, setRewardDescription)
     96       .describe("sets the description of a reward");
     97   LoadParam(root, "reward-picture", this, QuestGUI, setRewardPicture)
     98       .describe("sets the Picture of a reward");
    9899   
    99100}
     
    107108  if (questBox == NULL)
    108109  {
    109     this->questBox= new OrxGui::GLGuiBox();
     110    this->questBox= new OrxGui::GLGuiBox(OrxGui::Vertical);
    110111   
    111     OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    112     //labelBox->setWidgetSize(100, 200);
     112    OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     113    {
     114      OrxGui::GLGuiImage* questImage = new OrxGui::GLGuiImage();
     115      questImage->setWidgetSize(100, 100);
     116      questImage->loadImageFromFile(questPicture);
     117      questImage->show();
     118      headerBox->pack(questImage);
     119     
     120      OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
     121      {
     122        OrxGui::GLGuiText* questDifficulty = new OrxGui::GLGuiText();
     123        questDifficulty->setText(this->questDifficulty);
     124        outlineBox->pack(questDifficulty);
     125      }
     126      headerBox->pack(outlineBox);
     127     
     128    }
    113129   
    114     OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText();
    115     questTxt->setText(this->questDescription);
    116     labelBox->pack(questTxt);
     130    OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
     131    {
     132      OrxGui::GLGuiText* questTxt = new OrxGui::GLGuiText();
     133      questTxt->setText(this->questDescription);
     134      labelBox->pack(questTxt);
     135    }
    117136   
    118     OrxGui::GLGuiImage* image = new OrxGui::GLGuiImage();
    119     image->setWidgetSize(100, 100);
    120     image->loadImageFromFile(questPicture);
    121     image->show();
     137   
     138    OrxGui::GLGuiBox* rewardBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
     139    {
     140      OrxGui::GLGuiImage* rewardImage = new OrxGui::GLGuiImage();
     141      rewardImage->setWidgetSize(50, 50);
     142      rewardImage->loadImageFromFile(rewardPicture);
     143      rewardImage->show();
     144      rewardBox->pack(rewardImage);
     145   
     146      OrxGui::GLGuiText* rewardTxt = new OrxGui::GLGuiText();
     147      rewardTxt->setText(this->rewardDescription);
     148      rewardBox->pack(rewardTxt);
     149    }
     150   
     151    OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
     152    {
     153      OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("Accept");
     154      answerBox->pack(acceptButton);
     155     
     156      OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("Refuse");
     157      answerBox->pack(refuseButton);
     158    }
     159   
     160    this->questBox->pack(headerBox);
     161    this->questBox->pack(labelBox);
     162    this->questBox->pack(rewardBox);
     163    this->questBox->pack(answerBox);
     164    this->questBox->showAll();
    122165   
    123166    this->questBox->setAbsCoor2D(300, 40);
    124     labelBox->setRelCoor2D(300, 300);
    125     image->setRelCoor2D(0, 0);
    126    
    127     this->questBox->pack(image);
    128     this->questBox->pack(labelBox);
    129     this->questBox->showAll();
    130    
    131167    OrxGui::GLGuiHandler::getInstance()->activate();
    132168    OrxGui::GLGuiHandler::getInstance()->activateCursor();
  • branches/gui/src/world_entities/questGUI/quest_gui.h

    r10066 r10069  
    55#include "world_entity.h"
    66#include "glgui.h"
     7#include <glgui_image.h>
    78#include <vector>
    89
     
    2223
    2324   /** @param questName sets the name of this quest */
    24    inline void setQuestName(const std::string& questName) { this->questName = questName; }
    25    inline void setQuestDescription(const std::string& questDescription) { this->questDescription = questDescription; }
    26    inline void setQuestPicture(const std::string& questPicture) { this->questPicture = questPicture; }
    27    inline void setQuestOutline(const std::string& questOutline) { this->questOutline = questOutline; }
     25   inline void setQuestName(const std::string& questName)                { this->questName = questName; }
     26   inline void setQuestDescription(const std::string& questDescription)  { this->questDescription = questDescription; }
     27   inline void setQuestPicture(const std::string& questPicture)          { this->questPicture = questPicture; }
     28   inline void setQuestDifficulty(const std::string& questDifficulty)    { this->questDifficulty = questDifficulty; }
     29   inline void setRewardDescription(const std::string& rewardDescription){ this->rewardDescription  = rewardDescription; }
     30   inline void setRewardPicture(const std::string& rewardPicture)        { this->rewardPicture  = rewardPicture; }
    2831   void guiInit();
    2932
     
    3336    std::string             questDescription;
    3437    std::string             questPicture;
    35     std::string             questOutline;
     38    std::string             questDifficulty;
     39    std::string             rewardDescription;
     40    std::string             rewardPicture;
    3641   
     42    OrxGui::GLGuiBox*       headerBox;
     43    OrxGui::GLGuiBox*       outlineBox;
     44    OrxGui::GLGuiBox*       labelBox;
    3745    OrxGui::GLGuiBox*       questBox;
    38 
    39     OrxGui::GLGuiBox*       currentlyOpened;
     46    OrxGui::GLGuiImage*     questImage;
     47    OrxGui::GLGuiBox*       rewardBox;
     48    OrxGui::GLGuiImage*     rewardImage;
     49    OrxGui::GLGuiBox*       answerBox;
    4050
    4151    OrxSound::SoundSource*  selectorSource;
Note: See TracChangeset for help on using the changeset viewer.