mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Show indicator over site icons
This commit is contained in:
parent
765a1ca17b
commit
7c6fe69922
@ -542,7 +542,6 @@ impl<'a> Widget for Map<'a> {
|
|||||||
SiteKind::Castle => self.imgs.mmap_site_castle_hover,
|
SiteKind::Castle => self.imgs.mmap_site_castle_hover,
|
||||||
})
|
})
|
||||||
.image_color(UI_HIGHLIGHT_0)
|
.image_color(UI_HIGHLIGHT_0)
|
||||||
.parent(ui.window)
|
|
||||||
.with_tooltip(
|
.with_tooltip(
|
||||||
self.tooltip_manager,
|
self.tooltip_manager,
|
||||||
title,
|
title,
|
||||||
@ -673,6 +672,7 @@ impl<'a> Widget for Map<'a> {
|
|||||||
.color(Some(UI_HIGHLIGHT_0))
|
.color(Some(UI_HIGHLIGHT_0))
|
||||||
.set(state.ids.indicator, ui);
|
.set(state.ids.indicator, ui);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Info about controls
|
// Info about controls
|
||||||
let icon_size = Vec2::new(tweak!(25.6), tweak!(28.8));
|
let icon_size = Vec2::new(tweak!(25.6), tweak!(28.8));
|
||||||
let recenter: bool;
|
let recenter: bool;
|
||||||
|
@ -216,14 +216,6 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
.source_rectangle(rect_src)
|
.source_rectangle(rect_src)
|
||||||
.set(state.ids.grid, ui);
|
.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
|
// Map icons
|
||||||
if state.ids.mmap_site_icons.len() < self.client.sites().len() {
|
if state.ids.mmap_site_icons.len() < self.client.sites().len() {
|
||||||
state.update(|state| {
|
state.update(|state| {
|
||||||
@ -299,6 +291,14 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
.set(state.ids.mmap_site_icons[i], ui);
|
.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
|
// Compass directions
|
||||||
let dirs = [
|
let dirs = [
|
||||||
(Vec2::new(0.0, 1.0), state.ids.mmap_north, "N", true),
|
(Vec2::new(0.0, 1.0), state.ids.mmap_north, "N", true),
|
||||||
|
Loading…
Reference in New Issue
Block a user