|
Mana
|
The core part of the client. More...
#include <client.h>
Classes | |
| struct | Options |
| A structure holding the values of various options that can be passed from the command line. More... | |
Public Member Functions | |
| Client (const Options &options) | |
| ~Client () override | |
| int | exec () |
| void | update () |
| void | showOkDialog (const std::string &title, const std::string &message, State state) |
| Pops up an OkDialog with the given title and message, and switches to the given state when Ok is pressed. | |
| void | showErrorDialog (const std::string &message, State state) |
| Pops up an error dialog with the given message, and switches to the given state when Ok is pressed. | |
| void | action (const gcn::ActionEvent &event) override |
| void | handleWindowSizeChanged (int width, int height) |
| Should be called after the window has been resized. | |
| void | checkGraphicsSize () |
Static Public Member Functions | |
| static Client * | instance () |
| Provides access to the client instance. | |
| static void | setState (State state) |
| static State | getState () |
| static const std::string & | getPackageDirectory () |
| static const std::string & | getConfigDirectory () |
| static const std::string & | getLocalDataDirectory () |
| static const std::string & | getScreenshotDirectory () |
| static Video & | getVideo () |
| static bool | isActive () |
| static bool | hasInputFocus () |
| static bool | hasMouseFocus () |
Private Member Functions | |
| void | initRootDir () |
| void | initHomeDir () |
| Initializes the home directory. | |
| void | initConfiguration () |
| Initialize configuration. | |
| bool | initUpdatesDir () |
| Parse the update host and determine the updates directory Then verify that the directory exists (creating if needed). | |
| void | initScreenshotDir () |
| void | accountLogin (LoginData *loginData) |
Private Attributes | |
| Options | mOptions |
| std::string | mPackageDir |
| std::string | mConfigDir |
| std::string | mLocalDataDir |
| std::string | mUpdateHost |
| std::string | mUpdatesDir |
| std::string | mScreenshotDir |
| std::string | mRootDir |
| ServerInfo | mCurrentServer |
| Video | mVideo |
| Game * | mGame = nullptr |
| Window * | mCurrentDialog = nullptr |
| QuitDialog * | mQuitDialog = nullptr |
| Desktop * | mDesktop = nullptr |
| Button * | mSetupButton = nullptr |
| State | mState = STATE_CHOOSE_SERVER |
| State | mOldState = STATE_START |
| State | mStateAfterOkDialog |
| SDL_Surface * | mIcon = nullptr |
| SDL_TimerID | mSecondsCounterId = 0 |
| FpsManager | mFpsManager |
Static Private Attributes | |
| static Client * | mInstance = nullptr |
The core part of the client.
This class initializes all subsystems, runs the event loop, and shuts everything down again.
| Client::Client | ( | const Options & | options | ) |
Definition at line 172 of file client.cpp.
|
override |
Definition at line 398 of file client.cpp.
|
private |
Definition at line 1226 of file client.cpp.
|
override |
Definition at line 984 of file client.cpp.
| void Client::checkGraphicsSize | ( | ) |
Definition at line 1253 of file client.cpp.
| int Client::exec | ( | ) |
Definition at line 435 of file client.cpp.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| void Client::handleWindowSizeChanged | ( | int | width, |
| int | height | ||
| ) |
Should be called after the window has been resized.
Makes sure the GUI and game adapt to the new size.
Definition at line 1246 of file client.cpp.
|
static |
Definition at line 1276 of file client.cpp.
|
static |
Definition at line 1281 of file client.cpp.
|
private |
Initialize configuration.
Definition at line 1110 of file client.cpp.
|
private |
Initializes the home directory.
On UNIX and FreeBSD, ~/.mana is used. On Windows and other systems we use the current working directory.
Definition at line 1058 of file client.cpp.
|
private |
Definition at line 1003 of file client.cpp.
|
private |
Definition at line 1195 of file client.cpp.
|
private |
Parse the update host and determine the updates directory Then verify that the directory exists (creating if needed).
Definition at line 1128 of file client.cpp.
|
inlinestatic |
|
static |
Definition at line 1271 of file client.cpp.
| void Client::showErrorDialog | ( | const std::string & | message, |
| State | state | ||
| ) |
Pops up an error dialog with the given message, and switches to the given state when Ok is pressed.
Definition at line 979 of file client.cpp.
| void Client::showOkDialog | ( | const std::string & | title, |
| const std::string & | message, | ||
| State | state | ||
| ) |
Pops up an OkDialog with the given title and message, and switches to the given state when Ok is pressed.
Definition at line 970 of file client.cpp.
| void Client::update | ( | ) |
Definition at line 509 of file client.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |