Changeset 8698 in orxonox.OLD for branches/gui
- Timestamp:
- Jun 21, 2006, 11:51:07 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/story_entities/menu/glgui_imagebutton.cc
r8694 r8698 24 24 25 25 GLGuiImageButton::GLGuiImageButton(const std::string& label, unsigned int levelID, const std::string& imageName, GLGuiImage* image) 26 : GLGuiPushButton(label)26 : GLGuiPushButton(label) 27 27 { 28 28 this->imageName = imageName; 29 29 this->levelID = levelID; 30 30 this->image = image; 31 32 image->loadImageFromFile(imageName); 31 33 } 32 34 … … 36 38 void GLGuiImageButton::releasing(const Vector2D& pos, bool focused) 37 39 { 38 this->emit(startLevel(this->levelID)); 40 if (focused) 41 this->emit(startLevel(this->levelID)); 39 42 } 40 43 41 44 void GLGuiImageButton::receivedFocus() 42 45 { 46 printf("%s:: %s\n", this->label().c_str(), this->imageName.c_str()); 47 43 48 this->image->loadImageFromFile(this->imageName); 44 49 } 45 50 void GLGuiImageButton::removedFocus() 46 { 47 } 51 {} 48 52 49 53 50 54 void GLGuiImageButton::showing() 51 55 { 56 GLGuiPushButton::showing(); 52 57 this->image->show(); 53 58 } … … 55 60 void GLGuiImageButton::hiding() 56 61 { 62 GLGuiPushButton::hiding(); 63 57 64 this->image->hide(); 58 65 }
Note: See TracChangeset
for help on using the changeset viewer.