supertux
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
Editor Class Referencefinal
Inheritance diagram for Editor:
Inheritance graph
[legend]
Collaboration diagram for Editor:
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 resize ()
 
void disable_keyboard ()
 
Levelget_level () const
 
void set_world (std::unique_ptr< World > w)
 
Worldget_world () const
 
TileSetget_tileset () const
 
TileSelectionget_tiles () const
 
std::string get_tileselect_object () const
 
EditorTilebox::InputType get_tileselect_input_type () const
 
bool has_active_toolbox_tip () const
 
int get_tileselect_select_mode () const
 
int get_tileselect_move_mode () const
 
const std::string & get_levelfile () const
 
void set_level (const std::string &levelfile_)
 
std::string get_level_directory () const
 
void open_level_directory ()
 
bool is_testing_level () const
 
void remove_autosave_file ()
 
void convert_tiles_by_file (const std::string &file)
 Convert tiles on every tilemap in the level, according to a tile conversion file. More...
 
void check_deprecated_tiles (bool focus=false)
 
bool has_deprecated_tiles () const
 
void check_save_prerequisites (const std::function< void()> &callback) const
 Checks whether the level can be saved and does not contain obvious issues (currently: check if main sector and a spawn point named "main" is present)
 
void check_unsaved_changes (const std::function< void()> &action)
 
void load_sector (const std::string &name)
 
void delete_current_sector ()
 
void update_node_iterators ()
 
void esc_press ()
 
void delete_markers ()
 
void sort_layers ()
 
void select_tilegroup (int id)
 
const std::vector< Tilegroup > & get_tilegroups () const
 
void change_tileset ()
 
void select_objectgroup (int id)
 
const std::vector< ObjectGroup > & get_objectgroups () const
 
void scroll (const Vector &velocity)
 
bool is_level_loaded () const
 
void edit_path (PathGameObject *path, GameObject *new_marked_object)
 
void add_layer (GameObject *layer)
 
TileMapget_selected_tilemap () const
 
Sectorget_sector ()
 
void retoggle_undo_tracking ()
 
void undo_stack_cleanup ()
 
void undo ()
 
void redo ()
 
void pack_addon ()
 

Static Public Member Functions

static bool is_active ()
 
static PHYSFS_EnumerateCallbackResult foreach_recurse (void *data, const char *origdir, const char *fname)
 
- Static Public Member Functions inherited from Currenton< Editor >
static Editorcurrent ()
 

Public Attributes

bool m_quit_request
 
bool m_newlevel_request
 
bool m_reload_request
 
bool m_reactivate_request
 
bool m_deactivate_request
 
bool m_save_request
 
std::string m_save_request_filename
 
bool m_save_request_switch
 
bool m_test_request
 
bool m_particle_editor_request
 
std::optional< std::pair< std::string, Vector > > m_test_pos
 
std::string * m_particle_editor_filename
 

Static Public Attributes

static bool s_resaving_in_progress = false
 

Protected Attributes

std::unique_ptr< Levelm_level
 
std::unique_ptr< Worldm_world
 
std::string m_levelfile
 
std::string m_autosave_levelfile
 

Member Function Documentation

◆ convert_tiles_by_file()

void Editor::convert_tiles_by_file ( const std::string &  file)

Convert tiles on every tilemap in the level, according to a tile conversion file.

◆ draw()

void Editor::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 Editor::get_status ( ) const
overridevirtual

Gives details about what the user is doing right now.

Returns
activity details for presence integrations

Implements Screen.

◆ update()

void Editor::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: