Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10336 in orxonox.OLD


Ignore:
Timestamp:
Jan 24, 2007, 4:47:34 PM (17 years ago)
Author:
hejja
Message:

Versuch State fuer die buttons einzubauen..

Location:
branches/gui/src
Files:
3 edited

Legend:

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

    r10273 r10336  
    565565  }
    566566
     567 
     568 
     569 
     570 
     571 
    567572  /**
    568573  * @brief sets the Background Texture to all States.
     
    579584  }
    580585
     586  void GLGuiWidget::setBackgroundTexture(const std::string& textureName, OrxGui::State state)
     587  {
     588    _style[state]._background.setDiffuseMap(textureName);
     589    _style[state]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     590
     591    if (state == _state) {
     592      _currentStyle._background.setDiffuseMap(textureName);
     593      _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0));
     594    }
     595  }
     596 
     597 
     598 
     599 
    581600  /**
    582601   * @brief sets the Background Texture.
  • branches/gui/src/lib/gui/gl/glgui_widget.h

    r9869 r10336  
    181181    void setBackgroundTexture(const std::string& textureName);
    182182    void setBackgroundTexture(const Texture& texture, OrxGui::State state);
     183    void setBackgroundTexture(const std::string& textureName, OrxGui::State state);
    183184    void setBackgroundTexture(const std::string& textureName, const std::string& stateName);
    184185
  • branches/gui/src/world_entities/questGUI/quest_gui.cc

    r10334 r10336  
    197197      OrxGui::GLGuiBox* acceptBox = new OrxGui::GLGuiBox(OrxGui::Horizontal);
    198198      {
    199         acceptBox->setBackgroundTexture("maps/accept.png");
    200         //acceptBox->setBackgroundColor(Color::black, OrxGui::Normal);
    201         //acceptBox->setBackgroundColor(Color::green, OrxGui::Selected);
     199        //acceptBox->setBackgroundTexture("maps/accept.png");
     200        acceptBox->setBackgroundTexture("maps/accept.png", OrxGui::Normal);
     201        acceptBox->setBackgroundTexture("maps/acceptrout.png", OrxGui::Selected);
    202202        OrxGui::GLGuiButton* acceptButton = new OrxGui::GLGuiPushButton("        ");
    203203        acceptButton->released.connect(this, &QuestGUI::accept);
    204         acceptBox->setBorderTop(5);
    205         acceptBox->setBorderRight(5);
    206         acceptBox->setBorderLeft(5);
    207         acceptBox->setBorderBottom(5);
     204        acceptBox->setBorderTop(7);
     205        acceptBox->setBorderRight(7);
     206        acceptBox->setBorderLeft(7);
     207        acceptBox->setBorderBottom(7);
    208208        acceptBox->pack(acceptButton);
    209209      }
     
    219219      {
    220220        refuseBox->setBackgroundTexture("maps/refuserout.png");
    221         //refuseBox->setBackgroundColor(Color::black, OrxGui::Normal);
    222         //refuseBox->setBackgroundColor(Color::green, OrxGui::Selected);
    223221        OrxGui::GLGuiButton* refuseButton = new OrxGui::GLGuiPushButton("        ");
    224222        refuseButton->released.connect(this, &QuestGUI::refuse);
    225         refuseBox->setBorderTop(5);
    226         refuseBox->setBorderRight(5);
    227         refuseBox->setBorderLeft(5);
    228         refuseBox->setBorderBottom(5);
     223        refuseBox->setBorderTop(7);
     224        refuseBox->setBorderRight(7);
     225        refuseBox->setBorderLeft(7);
     226        refuseBox->setBorderBottom(7);
    229227        refuseBox->pack(refuseButton);
    230228      }
Note: See TracChangeset for help on using the changeset viewer.