Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8691 in orxonox.OLD


Ignore:
Timestamp:
Jun 21, 2006, 11:29:35 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: now one can enter levels with the GUI, and Images should be shown as Well

Location:
branches/gui/src
Files:
1 added
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/gui/gl/Makefile.am

    r8688 r8691  
    3131                glgui_cursor.cc \
    3232                \
    33                 specials/glgui_notifier.cc \
    34                 specials/glgui_imagebutton.cc
     33                specials/glgui_notifier.cc
    3534
    3635
     
    5958                glgui_cursor.h \
    6059                \
    61                 specials/glgui_notifier.h \
    62                 specials/glgui_imagebutton.h
     60                specials/glgui_notifier.h
    6361
    6462EXTRA_DIST =
  • branches/gui/src/story_entities/Makefile.am

    r8673 r8691  
    1414                story_entities/movie_loader.cc \
    1515                story_entities/game_menu.cc \
    16                 story_entities/simple_game_menu.cc
     16                story_entities/simple_game_menu.cc \
     17                \
     18                story_entities/menu/glgui_imagebutton.cc
    1719
    1820StoryEntities_HEADERS_ = \
     
    2931                story_entities/movie_loader.h \
    3032                story_entities/game_menu.h \
    31                 story_entities/simple_game_menu.h
     33                story_entities/simple_game_menu.h \
     34                \
     35                story_entities/menu/glgui_imagebutton.h
     36
  • branches/gui/src/story_entities/game_menu.cc

    r8689 r8691  
    3535
    3636#include "glgui.h"
    37 #include "gui/gl/specials/glgui_notifier.h"
     37#include "menu/glgui_imagebutton.h"
    3838
    3939//! This creates a Factory to fabricate a GameMenu
     
    179179        if( se->isContainedInMenu())
    180180        {
    181           OrxGui::GLGuiWidget* button = new OrxGui::GLGuiPushButton(se->getName());
     181          OrxGui::GLGuiImage* image = new OrxGui::GLGuiImage();
     182          image->show();
     183          image->setWidgetSize( 100, 100);
     184
     185          printf("%s\n", se->getMenuScreenshoot().c_str());
     186          OrxGui::GLGuiImageButton* button = new OrxGui::GLGuiImageButton(se->getName(), se->getStoryID(), se->getMenuScreenshoot(), image);
     187          button->connect(SIGNAL(button, startLevel), this, SLOT(GameMenu, startLevel));
    182188          levelsBox->pack(button);
    183189
     
    250256
    251257
    252 
     258void GameMenu::startLevel(int levelID)
     259{
     260  this->setNextStoryID( levelID);
     261  this->stop();
     262}
    253263
    254264/**
  • branches/gui/src/story_entities/menu/glgui_imagebutton.cc

    r8689 r8691  
    1717
    1818#include "glgui_imagebutton.h"
    19 #include "multi_line_text.h"
    2019
    2120#include "debug.h"
     
    3736  void GLGuiImageButton::releasing(const Vector2D& pos, bool focused)
    3837  {
    39 
     38    this->emit(startLevel(this->levelID));
    4039  }
    4140
    4241  void GLGuiImageButton::receivedFocus()
    43   {}
     42  {
     43    this->image->loadImageFromFile(this->imageName);
     44  }
    4445  void GLGuiImageButton::removedFocus()
    4546  {}
  • branches/gui/src/story_entities/menu/glgui_imagebutton.h

    r8689 r8691  
    1313#include "event_listener.h"
    1414
    15 
    16 #include <stack>
    17 
    18 class GLGuiImage;
     15#include "glgui_image.h"
    1916
    2017//! Namespace of the GLGuiImageButton of ORXONOX.
     
    2724    virtual ~GLGuiImageButton();
    2825
     26
     27    DeclareSignal1(startLevel, int);
    2928
    3029  protected:
Note: See TracChangeset for help on using the changeset viewer.