Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

grobe version nr1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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();
Note: See TracChangeset for help on using the changeset viewer.