mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
cleanup, changelog, small bugfixes
fmt fix rebase fmt
This commit is contained in:
parent
b5a2104ca5
commit
8b9db7b179
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Campfire resting heal
|
- Campfire resting heal
|
||||||
- Initial support for game plugins, both server-side and client-side
|
- Initial support for game plugins, both server-side and client-side
|
||||||
- Reflective LoD water
|
- Reflective LoD water
|
||||||
|
- Map indicators for group members
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
BIN
assets/voxygen/element/buttons/checkbox/active.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/checkbox/active.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/active.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/checkbox/active.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/hover.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/checkbox/hover.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/checkbox/hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/inactive.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/checkbox/inactive.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/inactive.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/checkbox/inactive.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/inactive_hover.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/checkbox/inactive_hover.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/inactive_hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/checkbox/inactive_hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/press.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/checkbox/press.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/checkbox/press.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/checkbox/press.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/active.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/radio/active.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/active.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/radio/active.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/hover.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/radio/hover.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/radio/hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/inactive.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/radio/inactive.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/inactive.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/radio/inactive.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/inactive_hover.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/radio/inactive_hover.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/inactive_hover.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/radio/inactive_hover.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/press.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/buttons/radio/press.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/buttons/radio/press.vox
(Stored with Git LFS)
BIN
assets/voxygen/element/buttons/radio/press.vox
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/de_buffs/buff_campfire_heal_0.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/de_buffs/buff_campfire_heal_0.png
(Stored with Git LFS)
Binary file not shown.
@ -1474,7 +1474,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
for (_invite, /*alignment,*/ agent, controller) in
|
for (_invite, /*alignment,*/ agent, controller) in
|
||||||
(&invites, /*&alignments,*/ &mut agents, &mut controllers).join()
|
(&invites, /*&alignments,*/ &mut agents, &mut controllers).join()
|
||||||
{
|
{
|
||||||
let accept = false; // set back to "matches!(alignment, Alignment::Npc)" when we got better NPC recruitment mechanics
|
let accept = true; // set back to "matches!(alignment, Alignment::Npc)" when we got better NPC recruitment mechanics
|
||||||
if accept {
|
if accept {
|
||||||
// Clear agent comp
|
// Clear agent comp
|
||||||
*agent = Agent::default();
|
*agent = Agent::default();
|
||||||
|
@ -26,18 +26,6 @@ image_ids! {
|
|||||||
flower: "voxygen.element.icons.item_flower",
|
flower: "voxygen.element.icons.item_flower",
|
||||||
grass: "voxygen.element.icons.item_grass",
|
grass: "voxygen.element.icons.item_grass",
|
||||||
|
|
||||||
// Checkboxes and Radio buttons
|
|
||||||
check: "voxygen.element.buttons.radio.inactive",
|
|
||||||
check_mo: "voxygen.element.buttons.radio.inactive_hover",
|
|
||||||
check_press: "voxygen.element.buttons.radio.press",
|
|
||||||
check_checked: "voxygen.element.buttons.radio.active",
|
|
||||||
check_checked_mo: "voxygen.element.buttons.radio.hover",
|
|
||||||
checkbox: "voxygen.element.buttons.checkbox.inactive",
|
|
||||||
checkbox_mo: "voxygen.element.buttons.checkbox.inactive_hover",
|
|
||||||
checkbox_press: "voxygen.element.buttons.checkbox.press",
|
|
||||||
checkbox_checked: "voxygen.element.buttons.checkbox.active",
|
|
||||||
checkbox_checked_mo: "voxygen.element.buttons.checkbox.hover",
|
|
||||||
|
|
||||||
// Charwindow
|
// Charwindow
|
||||||
xp_charwindow: "voxygen.element.frames.xp_charwindow",
|
xp_charwindow: "voxygen.element.frames.xp_charwindow",
|
||||||
divider: "voxygen.element.frames.divider_charwindow",
|
divider: "voxygen.element.frames.divider_charwindow",
|
||||||
@ -53,6 +41,19 @@ image_ids! {
|
|||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
<ImageGraphic>
|
<ImageGraphic>
|
||||||
|
|
||||||
|
// Checkboxes and Radio buttons
|
||||||
|
check: "voxygen.element.buttons.radio.inactive",
|
||||||
|
check_mo: "voxygen.element.buttons.radio.inactive_hover",
|
||||||
|
check_press: "voxygen.element.buttons.radio.press",
|
||||||
|
check_checked: "voxygen.element.buttons.radio.active",
|
||||||
|
check_checked_mo: "voxygen.element.buttons.radio.hover",
|
||||||
|
checkbox: "voxygen.element.buttons.checkbox.inactive",
|
||||||
|
checkbox_mo: "voxygen.element.buttons.checkbox.inactive_hover",
|
||||||
|
checkbox_press: "voxygen.element.buttons.checkbox.press",
|
||||||
|
checkbox_checked: "voxygen.element.buttons.checkbox.active",
|
||||||
|
checkbox_checked_mo: "voxygen.element.buttons.checkbox.hover",
|
||||||
|
|
||||||
// Selection Frame
|
// Selection Frame
|
||||||
selection: "voxygen.element.frames.selection",
|
selection: "voxygen.element.frames.selection",
|
||||||
selection_hover: "voxygen.element.frames.selection_hover",
|
selection_hover: "voxygen.element.frames.selection_hover",
|
||||||
@ -180,7 +181,6 @@ image_ids! {
|
|||||||
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
indicator_mmap: "voxygen.element.buttons.indicator_mmap",
|
||||||
indicator_map_overlay: "voxygen.element.buttons.indicator_mmap_small",
|
indicator_map_overlay: "voxygen.element.buttons.indicator_mmap_small",
|
||||||
indicator_group: "voxygen.element.map.group_indicator",
|
indicator_group: "voxygen.element.map.group_indicator",
|
||||||
indicator_group_hover: "voxygen.element.map.group_indicator_hover",
|
|
||||||
indicator_group_up: "voxygen.element.map.group_indicator_arrow_up",
|
indicator_group_up: "voxygen.element.map.group_indicator_arrow_up",
|
||||||
indicator_group_down: "voxygen.element.map.group_indicator_arrow_down",
|
indicator_group_down: "voxygen.element.map.group_indicator_arrow_down",
|
||||||
|
|
||||||
|
@ -9,9 +9,8 @@ use crate::{
|
|||||||
GlobalState,
|
GlobalState,
|
||||||
};
|
};
|
||||||
use client::{self, Client};
|
use client::{self, Client};
|
||||||
use common::{
|
use common::{comp, comp::group::Role, terrain::TerrainChunkSize, vol::RectVolSize};
|
||||||
comp, comp::group::Role, msg::world_msg::SiteKind, terrain::TerrainChunkSize, vol::RectVolSize,
|
use common_net::msg::world_msg::SiteKind;
|
||||||
};
|
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
color, position,
|
color, position,
|
||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
@ -657,23 +656,27 @@ impl<'a> Widget for Map<'a> {
|
|||||||
Role::Pet => None,
|
Role::Pet => None,
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let group_size = group_members.len();
|
let group_size = group_members.len();
|
||||||
//let in_group = !group_members.is_empty();
|
//let in_group = !group_members.is_empty();
|
||||||
let uid_allocator = client_state
|
let uid_allocator = client_state
|
||||||
.ecs()
|
.ecs()
|
||||||
.read_resource::<common::sync::UidAllocator>();
|
.read_resource::<common_net::sync::UidAllocator>();
|
||||||
if state.ids.member_indicators.len() < group_size {
|
if state.ids.member_indicators.len() < group_size {
|
||||||
state.update(|s| {
|
state.update(|s| {
|
||||||
s.ids
|
s.ids
|
||||||
.member_indicators
|
.member_indicators
|
||||||
.resize(group_size, &mut ui.widget_id_generator())
|
.resize(group_size, &mut ui.widget_id_generator())
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
for (i, &uid) in group_members.iter().copied().enumerate() {
|
for (i, &uid) in group_members.iter().copied().enumerate() {
|
||||||
let entity = uid_allocator.retrieve_entity_internal(uid.into());
|
let entity = uid_allocator.retrieve_entity_internal(uid.into());
|
||||||
let member_pos = entity.and_then(|entity| member_pos.get(entity));
|
let member_pos = entity.and_then(|entity| member_pos.get(entity));
|
||||||
let stats = entity.and_then(|entity| stats.get(entity));
|
let stats = entity.and_then(|entity| stats.get(entity));
|
||||||
let name= if let Some(stats) = stats {stats.name.to_string()} else {"".to_string()};
|
let name = if let Some(stats) = stats {
|
||||||
|
stats.name.to_string()
|
||||||
|
} else {
|
||||||
|
"".to_string()
|
||||||
|
};
|
||||||
|
|
||||||
if let Some(member_pos) = member_pos {
|
if let Some(member_pos) = member_pos {
|
||||||
// Site pos in world coordinates relative to the player
|
// Site pos in world coordinates relative to the player
|
||||||
@ -695,33 +698,27 @@ impl<'a> Widget for Map<'a> {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
let factor = 1.2;
|
let factor = 1.2;
|
||||||
let z_comparison = (member_pos.0.z - player_pos.z) as i32;
|
let z_comparison = (member_pos.0.z - player_pos.z) as i32;
|
||||||
|
|
||||||
Button::image(match z_comparison {
|
Button::image(match z_comparison {
|
||||||
10..=i32::MAX => self.imgs.indicator_group_up,
|
10..=i32::MAX => self.imgs.indicator_group_up,
|
||||||
i32::MIN..=-10 => self.imgs.indicator_group_down,
|
i32::MIN..=-10 => self.imgs.indicator_group_down,
|
||||||
_ => self.imgs.indicator_group,
|
_ => self.imgs.indicator_group,
|
||||||
})
|
})
|
||||||
.x_y_position_relative_to(
|
.x_y_position_relative_to(
|
||||||
state.ids.grid,
|
state.ids.grid,
|
||||||
position::Relative::Scalar(rpos.x as f64),
|
position::Relative::Scalar(rpos.x as f64),
|
||||||
position::Relative::Scalar(rpos.y as f64),
|
position::Relative::Scalar(rpos.y as f64),
|
||||||
)
|
)
|
||||||
.w_h(20.0 * factor, 20.0 * factor)
|
.w_h(20.0 * factor, 20.0 * factor)
|
||||||
.floating(true)
|
.floating(true)
|
||||||
.with_tooltip(
|
.with_tooltip(self.tooltip_manager, &name, "", &site_tooltip, TEXT_COLOR)
|
||||||
self.tooltip_manager,
|
.set(state.ids.member_indicators[i], ui);
|
||||||
&name,
|
|
||||||
"",
|
|
||||||
&site_tooltip,
|
|
||||||
TEXT_COLOR,
|
|
||||||
)
|
|
||||||
.set(state.ids.member_indicators[i], ui);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Cursor pos relative to playerpos and widget size
|
// Cursor pos relative to playerpos and widget size
|
||||||
// Cursor stops moving on an axis as soon as it's position exceeds the maximum
|
// Cursor stops moving on an axis as soon as it's position exceeds the maximum
|
||||||
// // size of the widget
|
// // size of the widget
|
||||||
|
|
||||||
// Offset from map center due to dragging
|
// Offset from map center due to dragging
|
||||||
let rcpos = drag.map(|e| e as f32);
|
let rcpos = drag.map(|e| e as f32);
|
||||||
|
@ -5,7 +5,8 @@ use super::{
|
|||||||
};
|
};
|
||||||
use crate::ui::{fonts::Fonts, img_ids};
|
use crate::ui::{fonts::Fonts, img_ids};
|
||||||
use client::{self, Client};
|
use client::{self, Client};
|
||||||
use common::{comp, comp::group::Role, msg::world_msg::SiteKind, terrain::TerrainChunkSize, vol::RectVolSize};
|
use common::{comp, comp::group::Role, terrain::TerrainChunkSize, vol::RectVolSize};
|
||||||
|
use common_net::msg::world_msg::SiteKind;
|
||||||
use conrod_core::{
|
use conrod_core::{
|
||||||
color, position,
|
color, position,
|
||||||
widget::{self, Button, Image, Rectangle, Text},
|
widget::{self, Button, Image, Rectangle, Text},
|
||||||
@ -296,70 +297,70 @@ impl<'a> Widget for MiniMap<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Group member indicators
|
// Group member indicators
|
||||||
let client_state = self.client.state();
|
let client_state = self.client.state();
|
||||||
let member_pos = client_state.ecs().read_storage::<common::comp::Pos>();
|
let member_pos = client_state.ecs().read_storage::<common::comp::Pos>();
|
||||||
let group_members = self
|
let group_members = self
|
||||||
.client
|
.client
|
||||||
.group_members()
|
.group_members()
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|(u, r)| match r {
|
.filter_map(|(u, r)| match r {
|
||||||
Role::Member => Some(u),
|
Role::Member => Some(u),
|
||||||
Role::Pet => None,
|
Role::Pet => None,
|
||||||
})
|
|
||||||
.collect::<Vec<_>>();
|
|
||||||
let group_size = group_members.len();
|
|
||||||
//let in_group = !group_members.is_empty();
|
|
||||||
let uid_allocator = client_state
|
|
||||||
.ecs()
|
|
||||||
.read_resource::<common::sync::UidAllocator>();
|
|
||||||
if state.ids.member_indicators.len() < group_size {
|
|
||||||
state.update(|s| {
|
|
||||||
s.ids
|
|
||||||
.member_indicators
|
|
||||||
.resize(group_size, &mut ui.widget_id_generator())
|
|
||||||
})
|
|
||||||
};
|
|
||||||
for (i, &uid) in group_members.iter().copied().enumerate() {
|
|
||||||
let entity = uid_allocator.retrieve_entity_internal(uid.into());
|
|
||||||
let member_pos = entity.and_then(|entity| member_pos.get(entity));
|
|
||||||
|
|
||||||
if let Some(member_pos) = member_pos {
|
|
||||||
// Site pos in world coordinates relative to the player
|
|
||||||
let rwpos = member_pos.0.xy().map(|e| e as f32) - player_pos;
|
|
||||||
// Convert to chunk coordinates
|
|
||||||
let rcpos = rwpos.map2(TerrainChunkSize::RECT_SIZE, |e, sz| e / sz as f32);
|
|
||||||
// Convert to fractional coordinates relative to the worldsize
|
|
||||||
let rfpos = rcpos / max_zoom as f32;
|
|
||||||
// Convert to unrotated pixel coordinates from the player location on the map
|
|
||||||
// (the center)
|
|
||||||
// Accounting for zooming
|
|
||||||
let rpixpos = rfpos.map2(map_size, |e, sz| e * sz as f32 * zoom as f32);
|
|
||||||
let rpos = Vec2::unit_x().rotated_z(self.ori.x) * rpixpos.x
|
|
||||||
+ Vec2::unit_y().rotated_z(self.ori.x) * rpixpos.y;
|
|
||||||
|
|
||||||
if rpos
|
|
||||||
.map2(map_size, |e, sz| e.abs() > sz as f32 / 2.0)
|
|
||||||
.reduce_or()
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let factor = 1.2;
|
|
||||||
let z_comparison = (member_pos.0.z - player_pos.z) as i32;
|
|
||||||
Button::image(match z_comparison {
|
|
||||||
10..=i32::MAX => self.imgs.indicator_group_up,
|
|
||||||
i32::MIN..=-10 => self.imgs.indicator_group_down,
|
|
||||||
_ => self.imgs.indicator_group,
|
|
||||||
})
|
})
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
let group_size = group_members.len();
|
||||||
|
//let in_group = !group_members.is_empty();
|
||||||
|
let uid_allocator = client_state
|
||||||
|
.ecs()
|
||||||
|
.read_resource::<common_net::sync::UidAllocator>();
|
||||||
|
if state.ids.member_indicators.len() < group_size {
|
||||||
|
state.update(|s| {
|
||||||
|
s.ids
|
||||||
|
.member_indicators
|
||||||
|
.resize(group_size, &mut ui.widget_id_generator())
|
||||||
|
})
|
||||||
|
};
|
||||||
|
for (i, &uid) in group_members.iter().copied().enumerate() {
|
||||||
|
let entity = uid_allocator.retrieve_entity_internal(uid.into());
|
||||||
|
let member_pos = entity.and_then(|entity| member_pos.get(entity));
|
||||||
|
|
||||||
|
if let Some(member_pos) = member_pos {
|
||||||
|
// Site pos in world coordinates relative to the player
|
||||||
|
let rwpos = member_pos.0.xy().map(|e| e as f32) - player_pos;
|
||||||
|
// Convert to chunk coordinates
|
||||||
|
let rcpos = rwpos.map2(TerrainChunkSize::RECT_SIZE, |e, sz| e / sz as f32);
|
||||||
|
// Convert to fractional coordinates relative to the worldsize
|
||||||
|
let rfpos = rcpos / max_zoom as f32;
|
||||||
|
// Convert to unrotated pixel coordinates from the player location on the map
|
||||||
|
// (the center)
|
||||||
|
// Accounting for zooming
|
||||||
|
let rpixpos = rfpos.map2(map_size, |e, sz| e * sz as f32 * zoom as f32);
|
||||||
|
let rpos = Vec2::unit_x().rotated_z(self.ori.x) * rpixpos.x
|
||||||
|
+ Vec2::unit_y().rotated_z(self.ori.x) * rpixpos.y;
|
||||||
|
|
||||||
|
if rpos
|
||||||
|
.map2(map_size, |e, sz| e.abs() > sz as f32 / 2.0)
|
||||||
|
.reduce_or()
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
let factor = 1.2;
|
||||||
|
let z_comparison = (member_pos.0.z - player_pos.z) as i32;
|
||||||
|
Button::image(match z_comparison {
|
||||||
|
10..=i32::MAX => self.imgs.indicator_group_up,
|
||||||
|
i32::MIN..=-10 => self.imgs.indicator_group_down,
|
||||||
|
_ => self.imgs.indicator_group,
|
||||||
|
})
|
||||||
.x_y_position_relative_to(
|
.x_y_position_relative_to(
|
||||||
state.ids.grid,
|
state.ids.grid,
|
||||||
position::Relative::Scalar(rpos.x as f64),
|
position::Relative::Scalar(rpos.x as f64),
|
||||||
position::Relative::Scalar(rpos.y as f64),
|
position::Relative::Scalar(rpos.y as f64),
|
||||||
)
|
)
|
||||||
.w_h(16.0 * factor, 16.0 * factor)
|
.w_h(16.0 * factor, 16.0 * factor)
|
||||||
.image_color(Color::Rgba(1.0, 1.0, 1.0, 1.0))
|
.image_color(Color::Rgba(1.0, 1.0, 1.0, 1.0))
|
||||||
.set(state.ids.member_indicators[i], ui);
|
.set(state.ids.member_indicators[i], ui);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Indicator
|
// Indicator
|
||||||
let ind_scale = 0.4;
|
let ind_scale = 0.4;
|
||||||
|
@ -607,7 +607,7 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
.fabricate(hotbar::Slot::Four, [40.0; 2])
|
.fabricate(hotbar::Slot::Four, [40.0; 2])
|
||||||
.filled_slot(self.imgs.inv_slot)
|
.filled_slot(self.imgs.inv_slot)
|
||||||
.right_from(state.ids.slot3, 0.0);
|
.right_from(state.ids.slot3, 0.0);
|
||||||
if let Some((title, desc)) = tooltip_text(hotbar::Slot::Three) {
|
if let Some((title, desc)) = tooltip_text(hotbar::Slot::Four) {
|
||||||
slot.with_tooltip(self.tooltip_manager, title, desc, &item_tooltip, TEXT_COLOR)
|
slot.with_tooltip(self.tooltip_manager, title, desc, &item_tooltip, TEXT_COLOR)
|
||||||
.set(state.ids.slot4, ui);
|
.set(state.ids.slot4, ui);
|
||||||
} else {
|
} else {
|
||||||
@ -618,7 +618,7 @@ impl<'a> Widget for Skillbar<'a> {
|
|||||||
.fabricate(hotbar::Slot::Five, [40.0; 2])
|
.fabricate(hotbar::Slot::Five, [40.0; 2])
|
||||||
.filled_slot(self.imgs.inv_slot)
|
.filled_slot(self.imgs.inv_slot)
|
||||||
.right_from(state.ids.slot4, 0.0);
|
.right_from(state.ids.slot4, 0.0);
|
||||||
if let Some((title, desc)) = tooltip_text(hotbar::Slot::Three) {
|
if let Some((title, desc)) = tooltip_text(hotbar::Slot::Five) {
|
||||||
slot.with_tooltip(self.tooltip_manager, title, desc, &item_tooltip, TEXT_COLOR)
|
slot.with_tooltip(self.tooltip_manager, title, desc, &item_tooltip, TEXT_COLOR)
|
||||||
.set(state.ids.slot5, ui);
|
.set(state.ids.slot5, ui);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user