Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8475 in orxonox.OLD


Ignore:
Timestamp:
Jun 15, 2006, 4:00:04 PM (18 years ago)
Author:
bensch
Message:

yeah a fullscreen button :)

Location:
branches/gui/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/gui/src/lib/graphics/graphics_engine.cc

    r8316 r8475  
    397397  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
    398398}
     399
     400void GraphicsEngine::toggleFullscreen()
     401{
     402  if (this->fullscreenFlag == SDL_FULLSCREEN)
     403    this->fullscreenFlag = 0;
     404  else
     405    this->fullscreenFlag = SDL_FULLSCREEN;
     406  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
     407}
     408
    399409
    400410/**
  • branches/gui/src/lib/graphics/graphics_engine.h

    r8316 r8475  
    4444    int setResolution(int width, int height, int bpp);
    4545    void setFullscreen(bool fullscreen = false);
     46    void toggleFullscreen();
    4647    static void setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha = 1.0);
    4748
  • branches/gui/src/story_entities/simple_game_menu.cc

    r8376 r8475  
    9999
    100100    box->pack(rdnpb);
     101
     102    OrxGui::GLGuiPushButton* fullscreen = new OrxGui::GLGuiPushButton("Fullscreen");
     103    fullscreen->connect(SIGNAL(fullscreen, released), GraphicsEngine::getInstance(), SLOT(GraphicsEngine, toggleFullscreen));
     104
     105    box->pack(fullscreen);
    101106
    102107    OrxGui::GLGuiInputLine* input = new OrxGui::GLGuiInputLine();
Note: See TracChangeset for help on using the changeset viewer.