Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8691 in orxonox.OLD for branches/gui/src/story_entities/game_menu.cc


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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/**
Note: See TracChangeset for help on using the changeset viewer.