supertux
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
ParticleEditor Class Referencefinal
Inheritance diagram for ParticleEditor:
Inheritance graph
[legend]
Collaboration diagram for ParticleEditor:
Collaboration graph
[legend]

Public Member Functions

virtual void draw (Compositor &) override
 gets called once per frame. More...
 
virtual void update (float dt_sec, const Controller &controller) override
 gets called for once (per logical) frame. More...
 
virtual void setup () override
 gets called before this screen gets activated (which is at least once before the first draw or update call
 
virtual void leave () override
 gets called when the current screen is temporarily suspended
 
virtual IntegrationStatus get_status () const override
 Gives details about what the user is doing right now. More...
 
void event (const SDL_Event &ev)
 
void update_keyboard (const Controller &controller)
 
void check_unsaved_changes (const std::function< void()> &action)
 
void quit_editor ()
 
void reactivate ()
 
void open_particle_directory ()
 
void save (const std::string &filename, bool retry=false)
 
void save (Writer &writer)
 
void request_save (bool is_save_as=false, const std::function< void(bool)> &callback=[](bool was_saved){})
 
void open (const std::string &filename)
 
void new_file ()
 
void reload ()
 Reloads the particle object from the filename in m_filename. More...
 

Static Public Member Functions

static bool is_active ()
 
- Static Public Member Functions inherited from Currenton< ParticleEditor >
static ParticleEditorcurrent ()
 

Public Attributes

bool m_enabled
 
bool m_quit_request
 
std::vector< std::unique_ptr< InterfaceControl > > m_controls
 
std::vector< std::unique_ptr< InterfaceControl > > m_controls_textures
 
std::vector< std::function< void()> > m_texture_rebinds
 
std::vector< std::shared_ptr< CustomParticleSystem::ParticleProps > > m_undo_stack
 
std::vector< std::shared_ptr< CustomParticleSystem::ParticleProps > > m_redo_stack
 
bool m_in_texture_tab
 
int m_texture_current
 
std::shared_ptr< CustomParticleSystem::ParticlePropsm_saved_version
 
std::unique_ptr< CustomParticleSystemm_particles
 
std::string m_filename
 

Friends

class ParticleEditorMenu
 

Member Function Documentation

◆ draw()

void ParticleEditor::draw ( Compositor compositor)
overridevirtual

gets called once per frame.

The screen should draw itself in this function. State changes should not be done in this function, but rather in update

Implements Screen.

◆ get_status()

IntegrationStatus ParticleEditor::get_status ( ) const
overridevirtual

Gives details about what the user is doing right now.

Returns
activity details for presence integrations

Implements Screen.

◆ reload()

void ParticleEditor::reload ( )

Reloads the particle object from the filename in m_filename.

If m_filename is empty, loads the default file (/particles/default.stcp)

◆ update()

void ParticleEditor::update ( float  dt_sec,
const Controller controller 
)
overridevirtual

gets called for once (per logical) frame.

Screens should do their state updates and logic here

Implements Screen.


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