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:
Screen Currenton< Editor >

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
 
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
 
EditorToolboxWidget::InputType get_tileselect_input_type () const
 
int get_tileselect_select_mode () const
 
int get_tileselect_move_mode () 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 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 (Path *path, GameObject *new_marked_object)
 
void add_layer (GameObject *layer)
 
GameObjectget_selected_tilemap () const
 
Sectorget_sector ()
 
void undo ()
 
void redo ()
 

Static Public Member Functions

static bool is_active ()
 
- 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
 
bool m_test_request
 
std::unique_ptr< Savegamem_savegame
 

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_test_levelfile
 

Member Function Documentation

§ 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.

§ 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: