- Timestamp:
- Jun 29, 2006, 2:03:36 PM (19 years ago)
- Location:
- branches/mountain_lake/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mountain_lake/src/lib/gui/gl/glgui_handler.cc
r8743 r8906 88 88 void GLGuiHandler::activate() 89 89 { 90 EventHandler::getInstance()->pushState(ES_MENU);90 //EventHandler::getInstance()->pushState(ES_MENU); 91 91 92 92 … … 96 96 void GLGuiHandler::deactivate() 97 97 { 98 EventHandler::getInstance()->popState();98 //EventHandler::getInstance()->popState(); 99 99 100 100 -
branches/mountain_lake/src/world_entities/environments/mapped_water.cc
r8885 r8906 22 22 #include "math.h" 23 23 24 #include "glgui.h" 25 26 27 #include "shell_command.h" 24 28 25 29 CREATE_FACTORY(MappedWater, CL_MAPPED_WATER); 30 31 SHELL_COMMAND(gui, MappedWater, openGui); 26 32 27 33 /** … … 51 57 52 58 tempcounter = 0; 59 this->box = NULL; 53 60 } 54 61 … … 205 212 } 206 213 214 void MappedWater::resetWaterColorR(float r) 215 { 216 this->resetWaterColor(r, this->waterColor.y, this->waterColor.z); 217 } 218 219 220 void MappedWater::resetWaterColorG(float g) 221 { 222 this->resetWaterColor(this->waterColor.x, g, this->waterColor.z); 223 } 224 225 226 void MappedWater::resetWaterColorB(float b) 227 { 228 this->resetWaterColor(this->waterColor.x, this->waterColor.y, b); 229 } 230 231 232 207 233 /** 208 234 * @brief resets the shininess in the Shader … … 304 330 } 305 331 332 333 void MappedWater::openGui() 334 { 335 if (this->box == NULL) 336 { 337 this->box = new OrxGui::GLGuiBox(OrxGui::Vertical); 338 { 339 OrxGui::GLGuiBox* colorBox = new OrxGui::GLGuiBox(OrxGui::Horizontal); 340 { 341 OrxGui::GLGuiInputLine* ColorText = new OrxGui::GLGuiInputLine(); 342 ColorText->setText("Color"); 343 colorBox->pack(ColorText); 344 345 OrxGui::GLGuiSlider* waterColorR = new OrxGui::GLGuiSlider(); 346 waterColorR->setRange(0, 1.0); 347 waterColorR->setValue(this->waterColor.x); 348 waterColorR->connect(SIGNAL(waterColorR, valueChanged), this, SLOT(MappedWater, resetWaterColorR)); 349 colorBox->pack(waterColorR); 350 351 OrxGui::GLGuiSlider* waterColorG = new OrxGui::GLGuiSlider(); 352 waterColorG->setRange(0, 1.0); 353 waterColorG->setValue(this->waterColor.y); 354 waterColorG->connect(SIGNAL(waterColorG, valueChanged), this, SLOT(MappedWater, resetWaterColorG)); 355 colorBox->pack(waterColorG); 356 357 OrxGui::GLGuiSlider* waterColorB = new OrxGui::GLGuiSlider(); 358 waterColorB->setRange(0, 1.0); 359 waterColorB->setValue(this->waterColor.z); 360 waterColorB->connect(SIGNAL(waterColorB, valueChanged), this, SLOT(MappedWater, resetWaterColorB)); 361 colorBox->pack(waterColorB); 362 363 } 364 this->box->pack(colorBox); 365 366 } 367 this->box->showAll(); 368 this->box->setAbsCoor2D(300, 40); 369 OrxGui::GLGuiHandler::getInstance()->activate(); 370 OrxGui::GLGuiHandler::getInstance()->activateCursor(); 371 } 372 373 374 } 375 376 377 void MappedWater::closeGui() 378 { 379 delete this->box; 380 this->box = NULL; 381 382 } 383 384 306 385 /** 307 386 * @brief activates the water shader and draws a quad with four textures on it -
branches/mountain_lake/src/world_entities/environments/mapped_water.h
r8885 r8906 28 28 #include "shader.h" 29 29 30 namespace OrxGui { class GLGuiBox; }; 31 30 32 // forward declaration 31 33 template <class T> class tAnimation; … … 47 49 void activateRefraction(); 48 50 void deactivateRefraction(); 51 52 53 void openGui(); 54 void closeGui(); 55 56 49 57 50 58 // functions to set parameters for the water, usually they're called through loadparam … … 70 78 void resetWaterAngle(float angle) { this->setWaterAngle(angle); this->calcVerts(); } 71 79 void resetWaterColor(float r, float g, float b); 80 void resetWaterColorR(float r); 81 void resetWaterColorG(float g); 82 void resetWaterColorB(float b); 72 83 void resetShineSize(float shine); 73 84 void resetShineStrength(float strength); … … 128 139 bool bFadeShineSize; 129 140 141 OrxGui::GLGuiBox* box; 142 130 143 int tempcounter; 131 144 };
Note: See TracChangeset
for help on using the changeset viewer.