mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fix ghost item when trade gets declined
This commit is contained in:
parent
37c14037cb
commit
2a65d4950d
@ -4055,6 +4055,9 @@ impl Hud {
|
||||
events
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn clear_cursor(&mut self) { self.slot_manager.idle(); }
|
||||
|
||||
pub fn render<'a>(&'a self, drawer: &mut UiDrawer<'_, 'a>) {
|
||||
span!(_guard, "render", "Hud::render");
|
||||
// Don't show anything if the UI is toggled off.
|
||||
|
@ -223,6 +223,7 @@ impl SessionState {
|
||||
self.hud.new_message(ChatType::Meta.chat_msg(msg));
|
||||
},
|
||||
client::Event::TradeComplete { result, trade: _ } => {
|
||||
self.hud.clear_cursor();
|
||||
let i18n = global_state.i18n.read();
|
||||
let msg = match result {
|
||||
TradeResult::Completed => i18n.get("hud.trade.result.completed"),
|
||||
|
Loading…
Reference in New Issue
Block a user