mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Code cleanup, add comments where relevant
This commit is contained in:
@@ -58,6 +58,8 @@ private:
|
||||
IGameEngineUser *engineUser = nullptr;
|
||||
|
||||
void updateFrame();
|
||||
void handleEvents(); //takes events from queue and calls interested objects
|
||||
void drawFPSCounter(); // draws the FPS to the upper left corner of the screen
|
||||
|
||||
public:
|
||||
std::mutex interfaceMutex;
|
||||
@@ -102,7 +104,9 @@ public:
|
||||
std::shared_ptr<IStatusBar> statusbar();
|
||||
|
||||
/// Set currently active status bar
|
||||
void setStatusbar(std::shared_ptr<IStatusBar>);
|
||||
void setStatusbar(const std::shared_ptr<IStatusBar> &);
|
||||
|
||||
/// Sets engine user that is used as target of callback for events received by engine
|
||||
void setEngineUser(IGameEngineUser * user);
|
||||
|
||||
bool captureChildren; //all newly created objects will get their parents from stack and will be added to parents children list
|
||||
@@ -111,15 +115,17 @@ public:
|
||||
GameEngine();
|
||||
~GameEngine();
|
||||
|
||||
/// Performs main game loop till game shutdown
|
||||
/// This method never returns, to abort main loop throw GameShutdownException
|
||||
[[noreturn]] void mainLoop();
|
||||
|
||||
/// called whenever SDL_WINDOWEVENT_RESTORED is reported or the user selects a different resolution, requiring to center/resize all windows
|
||||
void onScreenResize(bool resolutionChanged);
|
||||
|
||||
void handleEvents(); //takes events from queue and calls interested objects
|
||||
/// Simulate mouse movement to force refresh UI state that updates on mouse move
|
||||
void fakeMouseMove();
|
||||
void drawFPSCounter(); // draws the FPS to the upper left corner of the screen
|
||||
|
||||
/// Returns true for calls made from main (GUI) thread, false othervice
|
||||
bool amIGuiThread();
|
||||
|
||||
/// Calls provided functor in main thread on next execution frame
|
||||
|
||||
Reference in New Issue
Block a user