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

Editor for NPC files. More...

#include <TrainerEditorWindow.hpp>

Public Types

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

Public Member Functions

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

Detailed Description

Editor for NPC files.

Definition at line 23 of file TrainerEditorWindow.hpp.

Member Typedef Documentation

◆ CloseCb

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

Called when the window is closed.

Definition at line 29 of file TrainerEditorWindow.hpp.

◆ SelectCb

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

Callback for when a trainer file is selected.

Definition at line 26 of file TrainerEditorWindow.hpp.

Constructor & Destructor Documentation

◆ TrainerEditorWindow()

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

Construct a new Trainer Editor Window.

Parameters
cbCallback for when a trainer file is selected
cbCallback for when the window is closed

Definition at line 35 of file TrainerEditorWindow.cpp.

Member Function Documentation

◆ hide()

void editor::component::TrainerEditorWindow::hide ( )

Hides the window and all created child windows.

Definition at line 451 of file TrainerEditorWindow.cpp.

◆ show()

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

Opens the trainer editor.

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

Definition at line 308 of file TrainerEditorWindow.cpp.


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