- Timestamp:
- Jun 23, 2006, 2:55:59 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/light.cc
r7193 r8742 27 27 #include "debug.h" 28 28 29 using namespace std;30 31 29 CREATE_FACTORY(Light, CL_LIGHT); 32 30 33 31 //! Definition of the Lights and their Names 34 32 int lightsV[] = 35 {36 37 38 39 40 41 42 43 44 };33 { 34 GL_LIGHT0, 35 GL_LIGHT1, 36 GL_LIGHT2, 37 GL_LIGHT3, 38 GL_LIGHT4, 39 GL_LIGHT5, 40 GL_LIGHT6, 41 GL_LIGHT7 42 }; 45 43 46 44 /** … … 49 47 @todo what to do, if no Light-Slots are open anymore ??? 50 48 */ 51 49 Light::Light(const TiXmlElement* root) 52 50 { 53 51 PRINTF(4)("initializing Light number %d.\n", this->lightNumber); … … 89 87 90 88 LoadParam(root, "diffuse-color", this, Light, setDiffuseColor) 91 89 .describe("sets the diffuse color of the Light (red [0-1], green [0-1], blue [0-1])"); 92 90 93 91 LoadParam(root, "specular-color", this, Light, setSpecularColor) 94 92 .describe("sets the specular color of the Light (red [0-1], green [0-1], blue [0-1])"); 95 93 96 94 LoadParam(root, "attenuation", this, Light, setAttenuation) 97 95 .describe("sets the Attenuation of the LightSource (constant Factor, linear Factor, quadratic Factor)."); 98 96 99 97 LoadParam(root, "spot-direction", this, Light, setSpotDirection) 100 98 .describe("sets the Direction of the Spot"); 101 99 102 100 LoadParam(root, "spot-cutoff", this, Light, setSpotCutoff) 103 101 .describe("the cuttoff of the Spotlight"); 104 102 } 105 103 … … 263 261 { 264 262 LoadParamXML(root, "Lights", this, LightManager, loadLights) 265 263 .describe("an XML-Element to load lights from."); 266 264 267 265 LoadParam(root, "ambient-color", this, LightManager, setAmbientColor) 268 266 .describe("sets the ambient Color of the Environmental Light"); 269 267 } 270 268 … … 310 308 for (int i = 0; i < NUMBEROFLIGHTS; i++) 311 309 if (!this->lights[i]) 312 {313 this->lights[i]=light;314 return i;315 }310 { 311 this->lights[i]=light; 312 return i; 313 } 316 314 PRINTF(1)("no more light slots availiable. All %d already taken\n", NUMBEROFLIGHTS); 317 315 return -1; … … 351 349 void LightManager::draw() const 352 350 { 353 PRINTF(4)("Drawing the Lights\n");351 PRINTF(4)("Drawing the Lights\n"); 354 352 for (int i = 0; i < NUMBEROFLIGHTS; i++) 355 353 if (this->lights[i] != NULL) … … 372 370 for (int i = 0; i < NUMBEROFLIGHTS; i++) 373 371 if (this->lights[i]) 374 375 376 372 { 373 this->lights[i]->debug(); 374 } 377 375 PRINT(0)("-----------------------------LM-\n"); 378 376 } -
trunk/src/lib/gui/gl/glgui_handler.cc
r8717 r8742 135 135 } 136 136 137 if (dynamic_cast<GLGuiWidget*>(*it)->selectable() )137 if (dynamic_cast<GLGuiWidget*>(*it)->selectable() && dynamic_cast<GLGuiWidget*>(*it)->isVisible()) 138 138 { 139 139 dynamic_cast<GLGuiWidget*>(*it)->select(); … … 183 183 } 184 184 185 if (dynamic_cast<GLGuiWidget*>(*it)->selectable() )185 if (dynamic_cast<GLGuiWidget*>(*it)->selectable() && dynamic_cast<GLGuiWidget*>(*it)->isVisible()) 186 186 { 187 187 dynamic_cast<GLGuiWidget*>(*it)->select(); -
trunk/src/story_entities/menu/game_menu.cc
r8719 r8742 217 217 218 218 void GameMenu::showMultiPlayer() 219 {} 219 { 220 if (this->networkBox == NULL) 221 { 222 this->networkBox = new OrxGui::GLGuiBox(); 223 { 224 OrxGui::GLGuiButton* clientButton = new OrxGui::GLGuiPushButton("Client"); 225 networkBox->pack(clientButton); 226 227 OrxGui::GLGuiButton* serverButton = new OrxGui::GLGuiPushButton("Server"); 228 networkBox->pack(serverButton); 229 230 231 } 232 } 233 234 this->showSecondLevelElement(this->networkBox); 235 236 } 220 237 221 238 void GameMenu::showOptionsMenu()
Note: See TracChangeset
for help on using the changeset viewer.