- if (show_message == 1) {
- context.draw_center_text(gold_text, message, Vector(0, screen->h/2 - gold_text->get_height()/2), LAYER_GUI);
- std::cout<<message<<std::endl;
+ if (message_timer.started()) {
+ context.push_transform();
+ context.set_translation(Vector(0, 0));
+ Vector pos = Vector(0, screen->h/2 - gold_text->get_height()/2);
+ context.draw_center_text(gold_text, message, pos, LAYER_GUI);
+ context.pop_transform();
+ }
+ if (message_timer.check()) {
+ remove_me();