+void Interface::UpdateBlockInfo() {
+ if (aim_world) {
+ const Block &block = aim_world.GetBlock();
+ if (last_block != block) {
+ std::stringstream s;
+ s << "Block: "
+ << aim_world.GetType().label
+ << ", face: " << block.GetFace()
+ << ", turn: " << block.GetTurn();
+ block_text.Set(env.assets.small_ui_font, s.str());
+ last_block = block;
+ }
+ } else {
+ if (last_block != Block()) {
+ std::stringstream s;
+ s << "Block: none";
+ block_text.Set(env.assets.small_ui_font, s.str());
+ last_block = Block();
+ }
+ }
+}
+
+void Interface::UpdateEntityInfo() {
+ if (aim_entity) {
+ if (last_entity != aim_entity.entity) {
+ std::stringstream s;
+ s << "Entity: " << aim_entity.entity->Name();
+ entity_text.Set(env.assets.small_ui_font, s.str());
+ last_entity = aim_entity.entity;
+ }
+ }
+}
+