Animator now starts off as being the size of the sprite.
This commit is contained in:
parent
ce3d142208
commit
961a470844
2 changed files with 21 additions and 11 deletions
|
|
@ -25,8 +25,8 @@ namespace animator {
|
|||
guecs::UI $ui;
|
||||
|
||||
void button(const std::string& name, std::function<void(guecs::Modifiers mods)> cb);
|
||||
void init(const std::string& sprite_name);
|
||||
void render(sf::RenderWindow& window);
|
||||
void init(const std::string& sprite_name, int width, int height);
|
||||
void render(sf::RenderWindow& window, bool debug=false);
|
||||
bool mouse(float x, float y, guecs::Modifiers mods);
|
||||
std::shared_ptr<sf::Sprite> get_sprite();
|
||||
};
|
||||
|
|
@ -34,7 +34,7 @@ namespace animator {
|
|||
struct FSM : public DeadSimpleFSM<State, Event> {
|
||||
UI $ui;
|
||||
gui::routing::Router $router;
|
||||
sf::RenderWindow $window{sf::VideoMode({SCREEN_WIDTH, SCREEN_HEIGHT}), "Animation Crafting Tool"};
|
||||
sf::RenderWindow $window;
|
||||
sf::Vector2f $pos{0,0};
|
||||
sf::Vector2f $scale{0,0};
|
||||
std::shared_ptr<sf::Sprite> $sprite = nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue