Show
Ignore:
Timestamp:
08/23/10 22:34:43 (21 months ago)
Author:
Carsten
Message:

Added:

  • support for changing the video mode,
  • switching to full-screen display, and
  • parsing the command-line options.

Minor cosmetic enhancements:

  • blanked system mouse cursor in our 3D canvas, and
  • "Initializing Cafu..." message during initialization.

This completes the transfer of features from (old) file Cafu.cpp to the new wx-based code! :-)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/branches/cafu_to_wx/Ca3DE/MainFrame.cpp

    r116 r126  
    2323 
    2424#include "MainFrame.hpp" 
     25#include "AppCafu.hpp" 
    2526#include "MainCanvas.hpp" 
    2627 
     
    3132 
    3233 
     34static long int GetStyle() 
     35{ 
     36    // This seems to be a limitation of Windows: 
     37    // Creating a frame with a border that is shown full-screen in a video mode 
     38    // other than the default (desktop) mode does not properly fill the screen... 
     39    return wxGetApp().IsFullScreen() ? 0 : wxDEFAULT_FRAME_STYLE; 
     40} 
     41 
     42 
    3343MainFrameT::MainFrameT() 
    34     : wxFrame(NULL /*parent*/, wxID_ANY, wxString("Cafu Engine - ") + __DATE__), 
     44    : wxFrame(NULL /*parent*/, wxID_ANY, wxString("Cafu Engine - ") + __DATE__, wxDefaultPosition, wxDefaultSize, GetStyle()), 
    3545      m_MainCanvas(NULL) 
    3646{ 
     
    4959 
    5060    // Show the frame - it is not shown by default... 
    51     Show(); 
     61    if (wxGetApp().IsFullScreen()) ShowFullScreen(true); else Show(); 
    5262} 
    5363