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

A basic window to choose and view animations. More...

#include <AnimationWindow.hpp>

Public Types

using ChooseCb = std::function< void(const std::string &)>
 Called when an animation is chosen. More...
 
using CloseCb = std::function< void()>
 Called when the window is closed. More...
 

Public Member Functions

 AnimationWindow (bool characterMode, const ChooseCb &chooseCb, const CloseCb &closeCb)
 Construct a new Animation Window. More...
 
void open (bl::gui::GUI *parent, const std::string &path, const std::string &file)
 Opens the animation picker window. More...
 
void hide ()
 Removes the window from view. More...
 

Detailed Description

A basic window to choose and view animations.

Definition at line 18 of file AnimationWindow.hpp.

Member Typedef Documentation

◆ ChooseCb

using editor::component::AnimationWindow::ChooseCb = std::function<void(const std::string&)>

Called when an animation is chosen.

Definition at line 21 of file AnimationWindow.hpp.

◆ CloseCb

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

Called when the window is closed.

Definition at line 24 of file AnimationWindow.hpp.

Constructor & Destructor Documentation

◆ AnimationWindow()

editor::component::AnimationWindow::AnimationWindow ( bool  characterMode,
const ChooseCb chooseCb,
const CloseCb closeCb 
)

Construct a new Animation Window.

Parameters
characterModeTrue to select folders of animations, false for single anims
chooseCbCallback to call when an animation is chosen
closeCbCallback for when the window is closed

Definition at line 20 of file AnimationWindow.cpp.

Member Function Documentation

◆ hide()

void editor::component::AnimationWindow::hide ( )

Removes the window from view.

Definition at line 121 of file AnimationWindow.cpp.

◆ open()

void editor::component::AnimationWindow::open ( bl::gui::GUI *  parent,
const std::string &  path,
const std::string &  file 
)

Opens the animation picker window.

Parameters
parentParent GUI object
pathPath to search for animations within
fileExisting animation to use

Definition at line 86 of file AnimationWindow.cpp.


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