Fix UI flick when clearing slot in crafting menu

This commit is contained in:
coffee-compiler 2024-07-29 14:52:22 +00:00 committed by Marcel
parent 6f24394c35
commit 1e052aa905
2 changed files with 13 additions and 9 deletions

View File

@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Craftable orichalcum helmet
- Protocol to query game server information (player count, version, etc.) and make ping tests.
- Unlockable recipes
- Localization support for prompt dialogs, diary sections, trade and group invitations.
### Changed
@ -47,12 +48,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Loot protection for solo players and NPCs works again
- New cultist dungeons are less overly abundant, sahagin dungeons spawn again.
- Cultist dungeons now always have exactly one portal which leads to the boss room.
- Prompt dialogs are now localized.
- Image-export for wiki now produces correct images of items as they look like in-game.
- Limit the minimum vertical scaling value in the world generation UI to 0.1 to prevent an overflow
- Wood log and worker/linen clothing pricing.
- Charm recipes can now be found in the Potions tab of the crafting menu
- Black minimap when some terrain blocks are deleted.
- Text overflow and flickering in the crafting menu.
## [0.16.0] - 2024-03-30

View File

@ -967,6 +967,17 @@ impl<'a> Widget for Crafting<'a> {
s.ids.craft_slots.resize(2, &mut ui.widget_id_generator());
});
}
// Crafting instructions
Text::new(&self.localized_strings.get_msg("hud-crafting-modular_desc"))
.mid_top_of(state.ids.align_ing)
.w(264.0)
.center_justify()
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(13))
.color(TEXT_COLOR)
.set(state.ids.modular_desc_txt, ui);
// Modular Weapon Crafting BG-Art
Image::new(self.imgs.crafting_modular_art)
.down_from(state.ids.modular_desc_txt, 15.0)
@ -1296,14 +1307,6 @@ impl<'a> Widget for Crafting<'a> {
recipe_known,
)
} else {
Text::new(&self.localized_strings.get_msg("hud-crafting-modular_desc"))
.mid_top_of(state.ids.align_ing)
.w(264.0)
.center_justify()
.font_id(self.fonts.cyri.conrod_id)
.font_size(self.fonts.cyri.scale(13))
.color(TEXT_COLOR)
.set(state.ids.modular_desc_txt, ui);
Image::new(self.imgs.icon_mod_weap)
.middle_of(state.ids.output_img_frame)
.color(Some(bg_col))