Show indicator over site icons

This commit is contained in:
Imbris 2020-11-22 17:27:41 -05:00 committed by Joshua Barretto
parent 765a1ca17b
commit 7c6fe69922
2 changed files with 9 additions and 9 deletions

View File

@ -542,7 +542,6 @@ impl<'a> Widget for Map<'a> {
SiteKind::Castle => self.imgs.mmap_site_castle_hover,
})
.image_color(UI_HIGHLIGHT_0)
.parent(ui.window)
.with_tooltip(
self.tooltip_manager,
title,
@ -673,6 +672,7 @@ impl<'a> Widget for Map<'a> {
.color(Some(UI_HIGHLIGHT_0))
.set(state.ids.indicator, ui);
}
// Info about controls
let icon_size = Vec2::new(tweak!(25.6), tweak!(28.8));
let recenter: bool;

View File

@ -216,14 +216,6 @@ impl<'a> Widget for MiniMap<'a> {
.source_rectangle(rect_src)
.set(state.ids.grid, ui);
// Indicator
let ind_scale = 0.4;
Image::new(self.rot_imgs.indicator_mmap_small.none)
.middle_of(state.ids.grid)
.w_h(32.0 * ind_scale, 37.0 * ind_scale)
.color(Some(UI_HIGHLIGHT_0))
.set(state.ids.indicator, ui);
// Map icons
if state.ids.mmap_site_icons.len() < self.client.sites().len() {
state.update(|state| {
@ -299,6 +291,14 @@ impl<'a> Widget for MiniMap<'a> {
.set(state.ids.mmap_site_icons[i], ui);
}
// Indicator
let ind_scale = 0.4;
Image::new(self.rot_imgs.indicator_mmap_small.none)
.middle_of(state.ids.grid)
.w_h(32.0 * ind_scale, 37.0 * ind_scale)
.color(Some(UI_HIGHLIGHT_0))
.set(state.ids.indicator, ui);
// Compass directions
let dirs = [
(Vec2::new(0.0, 1.0), state.ids.mmap_north, "N", true),