Eile Mit Weile
Loading...
Searching...
No Matches
GameWindow Class Reference

Main window of the game client. More...

#include <GameWindow.hpp>

Inheritance diagram for GameWindow:

Public Member Functions

 GameWindow (const wxString &title, const wxPoint &pos, const wxSize &size)
 
void ShowPanel (wxPanel *panel)
 
void SetStatus (const std::string &message)
 

Private Attributes

wxBoxSizer_main_layout
 
wxStatusBar_status_bar
 
wxPanel * _current_panel
 

Detailed Description

Main window of the game client.

This class is derived from wxFrame, which is wxWidgets' main window class. It is the main window of the game client and is responsible for displaying the game. It contains a status bar and a main layout, which can be filled with different panels.

Constructor & Destructor Documentation

◆ GameWindow()

GameWindow::GameWindow ( const wxString title,
const wxPoint pos,
const wxSize size 
)

Initializes the game window. pos and size can be given default parameters.

Member Function Documentation

◆ SetStatus()

void GameWindow::SetStatus ( const std::string &  message)

This method sets the status bar text to the given message. We use this to display connection status.

◆ ShowPanel()

void GameWindow::ShowPanel ( wxPanel *  panel)

This method removes the current panel from the main layout and adds the given panel. It also sets the #_currentpanel to the given panel. This is used to visually update the window.

Member Data Documentation

◆ _current_panel

wxPanel* GameWindow::_current_panel
private

Currently displayed panel.

◆ _main_layout

wxBoxSizer* GameWindow::_main_layout
private

Main layout of the window.

◆ _status_bar

wxStatusBar* GameWindow::_status_bar
private

Status bar of the window.


The documentation for this class was generated from the following files: