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

A window for choosing and editing conversations. More...

#include <ConversationWindow.hpp>

Public Types

using SelectCb = std::function< void(const std::string &)>
 Callback for when a conversation is chosen. More...
 
using CancelCb = std::function< void()>
 Callback for when the window is closed with no choice made. More...
 

Public Member Functions

 ConversationWindow (const SelectCb &onSelect, const CancelCb &onCancel)
 Initialize a new conversation window. More...
 
void open (bl::gui::GUI *parent, const std::string &current)
 Actually opens the window and initializes with a conversation. More...
 

Detailed Description

A window for choosing and editing conversations.

Definition at line 18 of file ConversationWindow.hpp.

Member Typedef Documentation

◆ CancelCb

using editor::component::ConversationWindow::CancelCb = std::function<void()>

Callback for when the window is closed with no choice made.

Definition at line 24 of file ConversationWindow.hpp.

◆ SelectCb

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

Callback for when a conversation is chosen.

Definition at line 21 of file ConversationWindow.hpp.

Constructor & Destructor Documentation

◆ ConversationWindow()

editor::component::ConversationWindow::ConversationWindow ( const SelectCb onSelect,
const CancelCb onCancel 
)

Initialize a new conversation window.

Parameters
onSelectCallback to call when a conversation is chosen
onCancelCallback to call when the window is closed

Definition at line 58 of file ConversationWindow.cpp.

Member Function Documentation

◆ open()

void editor::component::ConversationWindow::open ( bl::gui::GUI *  parent,
const std::string &  current 
)

Actually opens the window and initializes with a conversation.

Parameters
parentThe parent GUI object
currentThe conversation to load. Blank to make a new one

Definition at line 217 of file ConversationWindow.cpp.


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