Changeset 8011 in orxonox.OLD
- Timestamp:
- May 31, 2006, 2:12:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/story_entities/simple_game_menu.cc
r8010 r8011 119 119 120 120 image = new OrxGui::GLGuiImage(); 121 image->show();122 image->loadImageFromFile( "death_screen.png" );123 121 image->setWidgetSize(200, 200); 124 122 image->setAbsCoor2D(300, 300); … … 130 128 OrxGui::GLGuiSlider* slider = new OrxGui::GLGuiSlider(); 131 129 slider->connect(SIGNAL(slider, valueChanged), this, SLOT(SimpleGameMenu, setImage)); 132 130 slider->setWidgetSize(200, 30); 133 131 slider->setRange(0, 100); 134 slider->setStep( 50);132 slider->setStep(1); 135 133 slider->setValue(slider->min()); 136 134 imageSelector->pack(slider); … … 149 147 const std::list<BaseObject*>* textures = ClassList::getList(CL_TEXTURE); 150 148 151 if(textures && textures->size() > i)149 if(textures) 152 150 { 153 151 std::list<BaseObject*>::const_iterator test = textures->begin(); 154 while (--i > 0) 155 { 152 std::list<BaseObject*>::const_iterator lastOK = textures->begin(); 153 while (true) 154 { 155 if (--i == 0 || test == textures->end()) 156 break; 157 if (dynamic_cast<Texture*>(*test)->getTexture() != 0) 158 lastOK = test; 156 159 test++; 157 160 } 158 this->image->loadImageFromTexture(*dynamic_cast<Texture*>(* test));159 this->imageName->setText((* test)->getName());161 this->image->loadImageFromTexture(*dynamic_cast<Texture*>(*lastOK)); 162 this->imageName->setText((*lastOK)->getName()); 160 163 } 161 164 }
Note: See TracChangeset
for help on using the changeset viewer.