mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
skillbar update part 1
skillbar rework part 2
This commit is contained in:
parent
0df061a38e
commit
f096bece5c
BIN
assets/voxygen/element/icons/m1.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/m1.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/icons/m2.png
(Stored with Git LFS)
BIN
assets/voxygen/element/icons/m2.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/bar_content.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/bar_content.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/bg.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/skillbar/bg.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/skillbar/energybar_bg.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/energybar_bg.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/frame.png
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/element/skillbar/frame.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/element/skillbar/healthbar_bg.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/healthbar_bg.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_active.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_active.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_big.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_big.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_l.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_l.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_l_active.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_l_active.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_r.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_r.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/skillbar_slot_r_active.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/skillbar_slot_r_active.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/xp_bar_content.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/xp_bar_content.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/xp_bar_left.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/xp_bar_left.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/xp_bar_mid.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/xp_bar_mid.png
(Stored with Git LFS)
Binary file not shown.
BIN
assets/voxygen/element/skillbar/xp_bar_right.png
(Stored with Git LFS)
BIN
assets/voxygen/element/skillbar/xp_bar_right.png
(Stored with Git LFS)
Binary file not shown.
@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
img_ids::Imgs, Show, BLACK, ERROR_COLOR, GROUP_COLOR, HP_COLOR, KILL_COLOR, LOW_HP_COLOR,
|
||||
MANA_COLOR, TEXT_COLOR, TEXT_COLOR_GREY, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
STAMINA_COLOR, TEXT_COLOR, TEXT_COLOR_GREY, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
@ -404,7 +404,7 @@ impl<'a> Widget for Group<'a> {
|
||||
// Stamina
|
||||
Image::new(self.imgs.bar_content)
|
||||
.w_h(100.0 * stam_perc, 8.0)
|
||||
.color(Some(MANA_COLOR))
|
||||
.color(Some(STAMINA_COLOR))
|
||||
.top_left_with_margins_on(state.ids.member_panels_bg[i], 26.0, 2.0)
|
||||
.set(state.ids.member_stam[i], ui);
|
||||
}
|
||||
|
@ -147,22 +147,12 @@ image_ids! {
|
||||
|
||||
// Skillbar
|
||||
level_up: "voxygen.element.misc_bg.level_up",
|
||||
level_down: "voxygen.element.misc_bg.level_down",
|
||||
xp_bar_mid: "voxygen.element.skillbar.xp_bar_mid",
|
||||
xp_bar_left: "voxygen.element.skillbar.xp_bar_left",
|
||||
xp_bar_right: "voxygen.element.skillbar.xp_bar_right",
|
||||
healthbar_bg: "voxygen.element.skillbar.healthbar_bg",
|
||||
energybar_bg: "voxygen.element.skillbar.energybar_bg",
|
||||
level_down:"voxygen.element.misc_bg.level_down",
|
||||
bar_content: "voxygen.element.skillbar.bar_content",
|
||||
skillbar_slot_big: "voxygen.element.skillbar.skillbar_slot_big",
|
||||
skillbar_slot_big_bg: "voxygen.element.skillbar.skillbar_slot_big",
|
||||
skillbar_slot_big_act: "voxygen.element.skillbar.skillbar_slot_big",
|
||||
skillbar_slot: "voxygen.element.skillbar.skillbar_slot",
|
||||
skillbar_slot_act: "voxygen.element.skillbar.skillbar_slot_active",
|
||||
skillbar_slot_l: "voxygen.element.skillbar.skillbar_slot_l",
|
||||
skillbar_slot_r: "voxygen.element.skillbar.skillbar_slot_r",
|
||||
skillbar_slot_l_act: "voxygen.element.skillbar.skillbar_slot_l_active",
|
||||
skillbar_slot_r_act: "voxygen.element.skillbar.skillbar_slot_r_active",
|
||||
skillbar_bg: "voxygen.element.skillbar.bg",
|
||||
skillbar_frame: "voxygen.element.skillbar.frame",
|
||||
m1_ico: "voxygen.element.icons.m1",
|
||||
m2_ico: "voxygen.element.icons.m2",
|
||||
|
||||
// Other Icons/Art
|
||||
skull: "voxygen.element.icons.skull",
|
||||
|
@ -91,7 +91,7 @@ const BLACK: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0);
|
||||
const HP_COLOR: Color = Color::Rgba(0.33, 0.63, 0.0, 1.0);
|
||||
const LOW_HP_COLOR: Color = Color::Rgba(0.93, 0.59, 0.03, 1.0);
|
||||
const CRITICAL_HP_COLOR: Color = Color::Rgba(0.79, 0.19, 0.17, 1.0);
|
||||
const MANA_COLOR: Color = Color::Rgba(0.29, 0.62, 0.75, 0.9);
|
||||
const STAMINA_COLOR: Color = Color::Rgba(0.29, 0.62, 0.75, 0.9);
|
||||
//const TRANSPARENT: Color = Color::Rgba(0.0, 0.0, 0.0, 0.0);
|
||||
//const FOCUS_COLOR: Color = Color::Rgba(1.0, 0.56, 0.04, 1.0);
|
||||
//const RAGE_COLOR: Color = Color::Rgba(0.5, 0.04, 0.13, 1.0);
|
||||
@ -2031,10 +2031,7 @@ impl Hud {
|
||||
},
|
||||
settings_window::Event::CrosshairType(crosshair_type) => {
|
||||
events.push(Event::CrosshairType(crosshair_type));
|
||||
},
|
||||
settings_window::Event::ToggleXpBar(xp_bar) => {
|
||||
events.push(Event::ToggleXpBar(xp_bar));
|
||||
},
|
||||
},
|
||||
settings_window::Event::ToggleBarNumbers(bar_numbers) => {
|
||||
events.push(Event::ToggleBarNumbers(bar_numbers));
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
img_ids::Imgs, DEFAULT_NPC, FACTION_COLOR, GROUP_COLOR, GROUP_MEMBER, HP_COLOR, LOW_HP_COLOR,
|
||||
MANA_COLOR, REGION_COLOR, SAY_COLOR, TELL_COLOR, TEXT_BG, TEXT_COLOR,
|
||||
REGION_COLOR, SAY_COLOR, STAMINA_COLOR, TELL_COLOR, TEXT_BG, TEXT_COLOR,
|
||||
};
|
||||
use crate::{
|
||||
i18n::VoxygenLocalization,
|
||||
@ -254,7 +254,7 @@ impl<'a> Widget for Overhead<'a> {
|
||||
|
||||
Rectangle::fill_with(
|
||||
[72.0 * energy_factor * BARSIZE, MANA_BAR_HEIGHT],
|
||||
MANA_COLOR,
|
||||
STAMINA_COLOR,
|
||||
)
|
||||
.x_y(
|
||||
((3.5 + (energy_factor * 36.5)) - 36.45) * BARSIZE,
|
||||
|
@ -1,6 +1,5 @@
|
||||
use super::{
|
||||
img_ids::Imgs, BarNumbers, CrosshairType, PressBehavior, ShortcutNumbers, Show, XpBar,
|
||||
CRITICAL_HP_COLOR, ERROR_COLOR, HP_COLOR, LOW_HP_COLOR, MANA_COLOR, MENU_BG,
|
||||
img_ids::Imgs, BarNumbers, CrosshairType, PressBehavior, ShortcutNumbers, Show, CRITICAL_HP_COLOR, ERROR_COLOR, HP_COLOR, LOW_HP_COLOR, MENU_BG, STAMINA_COLOR,
|
||||
TEXT_BIND_CONFLICT_COLOR, TEXT_COLOR, UI_HIGHLIGHT_0, UI_MAIN,
|
||||
};
|
||||
use crate::{
|
||||
@ -258,8 +257,7 @@ pub struct State {
|
||||
pub enum Event {
|
||||
ToggleHelp,
|
||||
ToggleDebug,
|
||||
ToggleTips(bool),
|
||||
ToggleXpBar(XpBar),
|
||||
ToggleTips(bool),
|
||||
ToggleBarNumbers(BarNumbers),
|
||||
ToggleShortcutNumbers(ShortcutNumbers),
|
||||
ChangeTab(SettingsTab),
|
||||
@ -795,41 +793,7 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
.font_size(self.fonts.cyri.scale(18))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.hotbar_title, ui);
|
||||
// Show xp bar
|
||||
if Button::image(match self.global_state.settings.gameplay.xp_bar {
|
||||
XpBar::Always => self.imgs.checkbox_checked,
|
||||
XpBar::OnGain => self.imgs.checkbox,
|
||||
})
|
||||
.w_h(18.0, 18.0)
|
||||
.hover_image(match self.global_state.settings.gameplay.xp_bar {
|
||||
XpBar::Always => self.imgs.checkbox_checked_mo,
|
||||
XpBar::OnGain => self.imgs.checkbox_mo,
|
||||
})
|
||||
.press_image(match self.global_state.settings.gameplay.xp_bar {
|
||||
XpBar::Always => self.imgs.checkbox_checked,
|
||||
XpBar::OnGain => self.imgs.checkbox_press,
|
||||
})
|
||||
.down_from(state.ids.hotbar_title, 8.0)
|
||||
.set(state.ids.show_xpbar_button, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
match self.global_state.settings.gameplay.xp_bar {
|
||||
XpBar::Always => events.push(Event::ToggleXpBar(XpBar::OnGain)),
|
||||
XpBar::OnGain => events.push(Event::ToggleXpBar(XpBar::Always)),
|
||||
}
|
||||
}
|
||||
Text::new(
|
||||
&self
|
||||
.localized_strings
|
||||
.get("hud.settings.toggle_bar_experience"),
|
||||
)
|
||||
.right_from(state.ids.show_xpbar_button, 10.0)
|
||||
.font_size(self.fonts.cyri.scale(14))
|
||||
.font_id(self.fonts.cyri.conrod_id)
|
||||
.graphics_for(state.ids.show_xpbar_button)
|
||||
.color(TEXT_COLOR)
|
||||
.set(state.ids.show_xpbar_text, ui);
|
||||
.set(state.ids.hotbar_title, ui);
|
||||
// Show Shortcut Numbers
|
||||
if Button::image(match self.global_state.settings.gameplay.shortcut_numbers {
|
||||
ShortcutNumbers::On => self.imgs.checkbox_checked,
|
||||
@ -844,7 +808,7 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
ShortcutNumbers::On => self.imgs.checkbox_checked,
|
||||
ShortcutNumbers::Off => self.imgs.checkbox_press,
|
||||
})
|
||||
.down_from(state.ids.show_xpbar_button, 8.0)
|
||||
.down_from(state.ids.hotbar_title, 8.0)
|
||||
.set(state.ids.show_shortcuts_button, ui)
|
||||
.was_clicked()
|
||||
{
|
||||
@ -1692,7 +1656,7 @@ impl<'a> Widget for SettingsWindow<'a> {
|
||||
0..=14 => CRITICAL_HP_COLOR,
|
||||
15..=29 => LOW_HP_COLOR,
|
||||
30..=50 => HP_COLOR,
|
||||
_ => MANA_COLOR,
|
||||
_ => STAMINA_COLOR,
|
||||
};
|
||||
Text::new(&format!("FPS: {:.0}", self.fps))
|
||||
.color(fps_col)
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user