Changeset 10225 in orxonox.OLD for branches/gui/src
- Timestamp:
- Jan 10, 2007, 5:59:05 PM (18 years ago)
- Location:
- branches/gui/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl/glgui_widget.cc
r10223 r10225 112 112 113 113 114 115 this->setBackgroundColor(Color(0, 0, 0, 0.5)); 114 this->setBackgroundColor(Color(0, 0, 0, 0.0)); 116 115 this->setBackgroundColor(Color(0, 0, 0, 0), OrxGui::Selected); 117 116 118 117 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); 123 122 124 123 this->setForegroundColor(Color(.8, .8, 1, 1), OrxGui::Normal); … … 572 571 void GLGuiWidget::setBackgroundTexture(const std::string& textureName) 573 572 { 574 for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) 573 for (unsigned int i = 0; i < GLGUI_STATE_COUNT; ++i) { 575 574 _style[i]._background.setDiffuseMap(textureName); 575 _style[i]._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0)); 576 } 576 577 this->_currentStyle._background.setDiffuseMap(textureName); 578 this->_currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0)); 577 579 } 578 580 … … 585 587 { 586 588 _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) { 588 592 _currentStyle._background.setDiffuseMap(texture); 593 _currentStyle._background.setDiffuseColor(Color(1.0, 1.0, 1.0, 1.0)); 594 } 589 595 } 590 596 -
branches/gui/src/world_entities/questGUI/quest_gui.cc
r10222 r10225 58 58 CREATE_FACTORY(QuestGUI); 59 59 SHELL_COMMAND(gui, QuestGUI, guiInit); 60 //SHELL_COMMAND(cancel, QuestGUI, guiDestruct); 60 //SHELL_COMMAND(cancel, QuestGUI, guiDestruct); 61 61 62 62 … … 64 64 { 65 65 this->registerObject(this, QuestGUI::_objectList); 66 66 67 67 this->toList(OM_GROUP_00); 68 69 this->questBox = NULL; 70 68 69 this->questBox = NULL; 70 71 71 this->bKillGui = false; 72 73 this->background = "maps/ rand2.png";72 73 this->background = "maps/pogo_bunny.png"; 74 74 75 75 this->myQuest = new Quest(root); … … 83 83 * deconstructor 84 84 */ 85 QuestGUI::~QuestGUI () 85 QuestGUI::~QuestGUI () 86 86 { 87 87 if( this->myQuest) … … 104 104 */ 105 105 void QuestGUI::guiInit() 106 { 106 { 107 107 if (questBox == NULL) 108 108 { … … 114 114 this->questBox->setBackgroundTexture(background); 115 115 this->bKillGui = false; 116 116 117 117 OrxGui::GLGuiBox* headerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 118 118 { … … 122 122 questImage->show(); 123 123 headerBox->pack(questImage); 124 124 125 125 OrxGui::GLGuiBox* outlineBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 126 126 { … … 140 140 headerBox->pack(outlineBox); 141 141 } 142 142 143 143 OrxGui::GLGuiBox* labelBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 144 { 144 { 145 145 OrxGui::GLGuiMultiLineText* questTxt = new OrxGui::GLGuiMultiLineText(); 146 146 questTxt->setText(this->myQuest->getQuestDescription()); … … 151 151 labelBox->pack(questTxt); 152 152 } 153 154 153 154 155 155 OrxGui::GLGuiBox* rewardBox = new OrxGui::GLGuiBox(OrxGui::Vertical); 156 156 { … … 160 160 rewardImage->show(); 161 161 rewardBox->pack(rewardImage); 162 162 163 163 OrxGui::GLGuiMultiLineText* rewardTxt = new OrxGui::GLGuiMultiLineText(); 164 164 rewardTxt->setText(this->myQuest->getRewardDescription()); … … 169 169 rewardBox->pack(rewardTxt); 170 170 } 171 171 172 172 OrxGui::GLGuiBox* answerBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 173 173 { … … 179 179 acceptBox->pack(acceptButton); 180 180 } 181 181 182 182 OrxGui::GLGuiBox* refuseBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 183 183 { … … 195 195 this->questBox->pack(answerBox); 196 196 this->questBox->showAll(); 197 197 198 198 this->questBox->setAbsCoor2D(300, 100); 199 199 OrxGui::GLGuiHandler::getInstance()->activate(); … … 204 204 this->bKillGui = true; 205 205 } 206 207 } 208 209 206 207 } 208 209 210 210 void QuestGUI::tick(float dt) 211 211 { … … 213 213 this->killgui(); 214 214 } 215 215 216 216 217 217 void QuestGUI::accept()
Note: See TracChangeset
for help on using the changeset viewer.