Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10225 in orxonox.OLD for branches/gui


Ignore:
Timestamp:
Jan 10, 2007, 5:59:05 PM (18 years ago)
Author:
patrick
Message:

texture problem solved, now all backgrounds are shown

Location:
branches/gui/src
Files:
2 edited

Legend:

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

    r10223 r10225  
    112112
    113113
    114 
    115     this->setBackgroundColor(Color(0, 0, 0, 0.5));
     114    this->setBackgroundColor(Color(0, 0, 0, 0.0));
    116115    this->setBackgroundColor(Color(0, 0, 0, 0), OrxGui::Selected);
    117116
    118117
    119     this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    120     this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    121     this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
    122     this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA, GL_SRC_ALPHA);
     118    this->_style[0]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     119    this->_style[1]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     120    this->_style[2]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     121    this->_style[3]._background.setBlendFunc( GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
    123122
    124123    this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal);
     
    572571  void GLGuiWidget::setBackgroundTexture(const std::string& textureName)
    573572  {
    574     for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i)
     573    for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) {
    575574      _style[i]._background.setDiffuseMap(textureName);
     575      _style[i]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     576    }
    576577    this->_currentStyle._background.setDiffuseMap(textureName);
     578    this->_currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
    577579  }
    578580
     
    585587  {
    586588    _style[state]._background.setDiffuseMap(texture);
    587     if (state == _state)
     589    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     590
     591    if (state == _state) {
    588592      _currentStyle._background.setDiffuseMap(texture);
     593      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     594    }
    589595  }
    590596
  • branches/gui/src/world_entities/questGUI/quest_gui.cc

    r10222 r10225  
    5858CREATE_FACTORY(QuestGUI);
    5959SHELL_COMMAND(gui, QuestGUI, guiInit);
    60 //SHELL_COMMAND(cancel, QuestGUI, guiDestruct); 
     60//SHELL_COMMAND(cancel, QuestGUI, guiDestruct);
    6161
    6262
     
    6464{
    6565  this->registerObject(this, QuestGUI::_objectList);
    66  
     66
    6767  this->toList(OM_GROUP_00);
    68  
    69   this->questBox = NULL; 
    70  
     68
     69  this->questBox = NULL;
     70
    7171  this->bKillGui = false;
    72  
    73   this->background = "maps/rand2.png";
     72
     73  this->background = "maps/pogo_bunny.png";
    7474
    7575  this->myQuest = new Quest(root);
     
    8383 * deconstructor
    8484 */
    85 QuestGUI::~QuestGUI () 
     85QuestGUI::~QuestGUI ()
    8686{
    8787  if( this->myQuest)
     
    104104 */
    105105void QuestGUI::guiInit()
    106 { 
     106{
    107107  if (questBox == NULL)
    108108  {
     
    114114    this->questBox->setBackgroundTexture(background);
    115115    this->bKillGui = false;
    116    
     116
    117117    OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    118118    {
     
    122122      questImage->show();
    123123      headerBox->pack(questImage);
    124      
     124
    125125      OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    126126      {
     
    140140      headerBox->pack(outlineBox);
    141141    }
    142    
     142
    143143    OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    144     { 
     144    {
    145145      OrxGui::GLGuiMultiLineText* questTxt = new OrxGui::GLGuiMultiLineText();
    146146      questTxt->setText(this->myQuest->getQuestDescription());
     
    151151      labelBox->pack(questTxt);
    152152    }
    153    
    154    
     153
     154
    155155    OrxGui::GLGuiBox* rewardBox = new OrxGui::GLGuiBox(OrxGui::Vertical);
    156156    {
     
    160160      rewardImage->show();
    161161      rewardBox->pack(rewardImage);
    162    
     162
    163163      OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText();
    164164      rewardTxt->setText(this->myQuest->getRewardDescription());
     
    169169      rewardBox->pack(rewardTxt);
    170170    }
    171    
     171
    172172    OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    173173    {
     
    179179        acceptBox->pack(acceptButton);
    180180      }
    181      
     181
    182182      OrxGui::GLGuiBox* refuseBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    183183      {
     
    195195    this->questBox->pack(answerBox);
    196196    this->questBox->showAll();
    197    
     197
    198198    this->questBox->setAbsCoor2D(300, 100);
    199199    OrxGui::GLGuiHandler::getInstance()->activate();
     
    204204    this->bKillGui = true;
    205205  }
    206  
    207 }
    208 
    209    
     206
     207}
     208
     209
    210210void QuestGUI::tick(float dt)
    211211{
     
    213213    this->killgui();
    214214}
    215    
     215
    216216
    217217void QuestGUI::accept()
Note: See TracChangeset for help on using the changeset viewer.