#include "editorwidget.h" #include "core/editor.h" EditorWidget::EditorWidget(const std::shared_ptr& editor) : _editor(editor) {} void EditorWidget::input(const sf::Event& event) { _editor->input(PlayerInput{0, event}); } void EditorWidget::update(const sf::Time& dt) { _editor->update(dt); } void EditorWidget::draw(sf::RenderTarget& target, sf::RenderStates states) const { // !!!!!!!!!!!!!!!!! (void)target; (void)states; _editor->draw(); } void EditorWidget::move(const sf::Vector2f& delta) { (void)delta; // delegate to children } bool EditorWidget::isUnderMouse(int mouse_x, int mouse_y) const { return _parent->isUnderMouse(mouse_x, mouse_y); } void EditorWidget::setRect(const sf::FloatRect& rect) { (void)rect; // basically useless beacuse editor widget fills the entire screen } sf::FloatRect EditorWidget::rect() const { return {}; } void EditorWidget::setPosition(const sf::Vector2f& position) { (void)position; } sf::Vector2f EditorWidget::position() const { return {}; }