Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::Editor::TilemapEditorApp Class Reference

#include <TilemapEditorApp.h>

+ Collaboration diagram for Olympe::Editor::TilemapEditorApp:

Public Member Functions

 TilemapEditorApp ()
 
 ~TilemapEditorApp ()
 
bool Initialize ()
 
void Shutdown ()
 
void Render ()
 
void NewLevel ()
 
void OpenLevel ()
 
void SaveLevel ()
 
void SaveLevelAs ()
 
bool HasUnsavedChanges () const
 
const std::string & GetCurrentLevelName () const
 

Private Member Functions

void RenderMenuBar ()
 
void RenderToolbar ()
 
void RenderLevelViewport ()
 
void RenderEntityList ()
 
void RenderPropertiesPanel ()
 
void RenderHistoryPanel ()
 
void RenderStatusBar ()
 
void ShowNewLevelDialog ()
 
void ShowOpenLevelDialog ()
 
void ShowSaveLevelDialog ()
 
void ShowAboutDialog ()
 

Private Attributes

std::unique_ptr< LevelManagerm_levelManager
 
std::unique_ptr< EditorStatem_editorState
 
bool m_showNewLevelDialog
 
bool m_showOpenLevelDialog
 
bool m_showSaveLevelDialog
 
bool m_showAboutDialog
 
char m_newLevelNameBuffer [256]
 
char m_filePathBuffer [512]
 
float m_viewportZoom
 
Vector m_viewportOffset
 
std::string m_selectedEntityId
 
int m_selectedTileId
 
bool m_initialized
 

Detailed Description

Definition at line 17 of file TilemapEditorApp.h.

Constructor & Destructor Documentation

◆ TilemapEditorApp()

Olympe::Editor::TilemapEditorApp::TilemapEditorApp ( )

Definition at line 13 of file TilemapEditorApp.cpp.

References m_filePathBuffer, and m_newLevelNameBuffer.

◆ ~TilemapEditorApp()

Olympe::Editor::TilemapEditorApp::~TilemapEditorApp ( )

Definition at line 27 of file TilemapEditorApp.cpp.

References Shutdown().

+ Here is the call graph for this function:

Member Function Documentation

◆ GetCurrentLevelName()

const std::string & Olympe::Editor::TilemapEditorApp::GetCurrentLevelName ( ) const

Definition at line 136 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), and m_levelManager.

Referenced by RenderLevelViewport().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ HasUnsavedChanges()

bool Olympe::Editor::TilemapEditorApp::HasUnsavedChanges ( ) const

Definition at line 131 of file TilemapEditorApp.cpp.

References m_levelManager.

Referenced by RenderLevelViewport(), and SDL_AppEvent().

+ Here is the caller graph for this function:

◆ Initialize()

bool Olympe::Editor::TilemapEditorApp::Initialize ( )

Definition at line 32 of file TilemapEditorApp.cpp.

References m_editorState, m_initialized, and m_levelManager.

Referenced by SDL_AppInit().

+ Here is the caller graph for this function:

◆ NewLevel()

void Olympe::Editor::TilemapEditorApp::NewLevel ( )

Definition at line 103 of file TilemapEditorApp.cpp.

References m_showNewLevelDialog.

Referenced by RenderMenuBar(), and SDL_AppEvent().

+ Here is the caller graph for this function:

◆ OpenLevel()

void Olympe::Editor::TilemapEditorApp::OpenLevel ( )

Definition at line 108 of file TilemapEditorApp.cpp.

References m_showOpenLevelDialog.

Referenced by RenderMenuBar(), and SDL_AppEvent().

+ Here is the caller graph for this function:

◆ Render()

void Olympe::Editor::TilemapEditorApp::Render ( )

◆ RenderEntityList()

void Olympe::Editor::TilemapEditorApp::RenderEntityList ( )
private

Definition at line 301 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_editorState, m_levelManager, and m_selectedEntityId.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderHistoryPanel()

void Olympe::Editor::TilemapEditorApp::RenderHistoryPanel ( )
private

Definition at line 408 of file TilemapEditorApp.cpp.

References m_editorState, and m_levelManager.

Referenced by Render().

+ Here is the caller graph for this function:

◆ RenderLevelViewport()

void Olympe::Editor::TilemapEditorApp::RenderLevelViewport ( )
private

Definition at line 254 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), GetCurrentLevelName(), HasUnsavedChanges(), m_levelManager, and m_viewportZoom.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderMenuBar()

void Olympe::Editor::TilemapEditorApp::RenderMenuBar ( )
private

Definition at line 150 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_editorState, m_levelManager, m_showAboutDialog, m_viewportOffset, m_viewportZoom, NewLevel(), OpenLevel(), SaveLevel(), and SaveLevelAs().

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderPropertiesPanel()

void Olympe::Editor::TilemapEditorApp::RenderPropertiesPanel ( )
private

Definition at line 351 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_levelManager, m_selectedEntityId, Olympe::Editor::EntityInstance::name, Olympe::Editor::EntityInstance::position, Olympe::Editor::EntityInstance::prefabPath, Vector::x, and Vector::y.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderStatusBar()

void Olympe::Editor::TilemapEditorApp::RenderStatusBar ( )
private

Definition at line 442 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), and m_levelManager.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderToolbar()

void Olympe::Editor::TilemapEditorApp::RenderToolbar ( )
private

Definition at line 223 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), and m_selectedTileId.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveLevel()

void Olympe::Editor::TilemapEditorApp::SaveLevel ( )

Definition at line 113 of file TilemapEditorApp.cpp.

References m_levelManager, and SaveLevelAs().

Referenced by RenderMenuBar(), and SDL_AppEvent().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SaveLevelAs()

void Olympe::Editor::TilemapEditorApp::SaveLevelAs ( )

Definition at line 126 of file TilemapEditorApp.cpp.

References m_showSaveLevelDialog.

Referenced by RenderMenuBar(), SaveLevel(), and SDL_AppEvent().

+ Here is the caller graph for this function:

◆ ShowAboutDialog()

void Olympe::Editor::TilemapEditorApp::ShowAboutDialog ( )
private

Definition at line 588 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), and m_showAboutDialog.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowNewLevelDialog()

void Olympe::Editor::TilemapEditorApp::ShowNewLevelDialog ( )
private

Definition at line 462 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_editorState, m_levelManager, m_newLevelNameBuffer, and m_showNewLevelDialog.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowOpenLevelDialog()

void Olympe::Editor::TilemapEditorApp::ShowOpenLevelDialog ( )
private

Definition at line 500 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_editorState, m_filePathBuffer, m_levelManager, and m_showOpenLevelDialog.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowSaveLevelDialog()

void Olympe::Editor::TilemapEditorApp::ShowSaveLevelDialog ( )
private

Definition at line 545 of file TilemapEditorApp.cpp.

References GetComponentTypeID_Static(), m_filePathBuffer, m_levelManager, and m_showSaveLevelDialog.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Shutdown()

void Olympe::Editor::TilemapEditorApp::Shutdown ( )

Definition at line 55 of file TilemapEditorApp.cpp.

References m_editorState, m_initialized, and m_levelManager.

Referenced by SDL_AppQuit(), and ~TilemapEditorApp().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_editorState

std::unique_ptr<EditorState> Olympe::Editor::TilemapEditorApp::m_editorState
private

◆ m_filePathBuffer

char Olympe::Editor::TilemapEditorApp::m_filePathBuffer[512]
private

Definition at line 67 of file TilemapEditorApp.h.

Referenced by ShowOpenLevelDialog(), ShowSaveLevelDialog(), and TilemapEditorApp().

◆ m_initialized

bool Olympe::Editor::TilemapEditorApp::m_initialized
private

Definition at line 77 of file TilemapEditorApp.h.

Referenced by Initialize(), Render(), and Shutdown().

◆ m_levelManager

std::unique_ptr<LevelManager> Olympe::Editor::TilemapEditorApp::m_levelManager
private

◆ m_newLevelNameBuffer

char Olympe::Editor::TilemapEditorApp::m_newLevelNameBuffer[256]
private

Definition at line 66 of file TilemapEditorApp.h.

Referenced by ShowNewLevelDialog(), and TilemapEditorApp().

◆ m_selectedEntityId

std::string Olympe::Editor::TilemapEditorApp::m_selectedEntityId
private

Definition at line 74 of file TilemapEditorApp.h.

Referenced by RenderEntityList(), and RenderPropertiesPanel().

◆ m_selectedTileId

int Olympe::Editor::TilemapEditorApp::m_selectedTileId
private

Definition at line 75 of file TilemapEditorApp.h.

Referenced by RenderToolbar().

◆ m_showAboutDialog

bool Olympe::Editor::TilemapEditorApp::m_showAboutDialog
private

Definition at line 64 of file TilemapEditorApp.h.

Referenced by Render(), RenderMenuBar(), and ShowAboutDialog().

◆ m_showNewLevelDialog

bool Olympe::Editor::TilemapEditorApp::m_showNewLevelDialog
private

Definition at line 61 of file TilemapEditorApp.h.

Referenced by NewLevel(), Render(), and ShowNewLevelDialog().

◆ m_showOpenLevelDialog

bool Olympe::Editor::TilemapEditorApp::m_showOpenLevelDialog
private

Definition at line 62 of file TilemapEditorApp.h.

Referenced by OpenLevel(), Render(), and ShowOpenLevelDialog().

◆ m_showSaveLevelDialog

bool Olympe::Editor::TilemapEditorApp::m_showSaveLevelDialog
private

Definition at line 63 of file TilemapEditorApp.h.

Referenced by Render(), SaveLevelAs(), and ShowSaveLevelDialog().

◆ m_viewportOffset

Vector Olympe::Editor::TilemapEditorApp::m_viewportOffset
private

Definition at line 71 of file TilemapEditorApp.h.

Referenced by RenderMenuBar().

◆ m_viewportZoom

float Olympe::Editor::TilemapEditorApp::m_viewportZoom
private

Definition at line 70 of file TilemapEditorApp.h.

Referenced by RenderLevelViewport(), and RenderMenuBar().


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