Peoplemon  0.1.0
Peoplemon 3 game source documentation
Public Types | Public Member Functions | List of all members
editor::component::NpcEditorWindow Class Reference

Editor for NPC files. More...

#include <NPCEditorWindow.hpp>

Public Types

using SelectCb = std::function< void(const std::string &file)>
 Callback for when an NPC file is selected. More...
 
using CloseCb = std::function< void()>
 Called when the window is closed. More...
 

Public Member Functions

 NpcEditorWindow (const SelectCb &cb, const CloseCb &closeCb)
 Construct a new Npc Editor Window. More...
 
void show (bl::gui::GUI *parent, const std::string &file)
 Opens the NPC editor. More...
 
void hide ()
 Hides the window and all created child windows. More...
 

Detailed Description

Editor for NPC files.

Definition at line 20 of file NPCEditorWindow.hpp.

Member Typedef Documentation

◆ CloseCb

using editor::component::NpcEditorWindow::CloseCb = std::function<void()>

Called when the window is closed.

Definition at line 26 of file NPCEditorWindow.hpp.

◆ SelectCb

using editor::component::NpcEditorWindow::SelectCb = std::function<void(const std::string& file)>

Callback for when an NPC file is selected.

Definition at line 23 of file NPCEditorWindow.hpp.

Constructor & Destructor Documentation

◆ NpcEditorWindow()

editor::component::NpcEditorWindow::NpcEditorWindow ( const SelectCb cb,
const CloseCb closeCb 
)

Construct a new Npc Editor Window.

Parameters
cbCallback for when an NPC file is selected
cbCallback for when the window is closed

Definition at line 17 of file NPCEditorWindow.cpp.

Member Function Documentation

◆ hide()

void editor::component::NpcEditorWindow::hide ( )

Hides the window and all created child windows.

Definition at line 255 of file NPCEditorWindow.cpp.

◆ show()

void editor::component::NpcEditorWindow::show ( bl::gui::GUI *  parent,
const std::string &  file 
)

Opens the NPC editor.

Parameters
parentThe parent GUI element
fileThe file to open. Empty for new file

Definition at line 150 of file NPCEditorWindow.cpp.


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