The ritual UI is now a lot better using a FSM to control everything. Probably one more session to work out the remaining functionality.
This commit is contained in:
parent
8a1f42c0f1
commit
6269d10807
7 changed files with 184 additions and 25 deletions
|
@ -27,6 +27,15 @@ namespace guecs {
|
|||
text->setString(content);
|
||||
}
|
||||
|
||||
void Sprite::update(const std::string& new_name) {
|
||||
if(new_name != name) {
|
||||
name = new_name;
|
||||
auto sprite_texture = textures::get(name);
|
||||
sprite->setTexture(*sprite_texture.texture);
|
||||
sprite->setTextureRect(sprite_texture.sprite->getTextureRect());
|
||||
}
|
||||
}
|
||||
|
||||
void Sprite::init(lel::Cell &cell) {
|
||||
auto sprite_texture = textures::get(name);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue