mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'fix-ghost-item' into 'master'
Fix ghost item when trade gets declined Closes #1429 See merge request veloren/veloren!3117
This commit is contained in:
commit
21cad12272
@ -4166,6 +4166,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.
|
||||
|
@ -225,6 +225,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