char selection frames, adjustments

This commit is contained in:
Monty Marz 2021-07-12 15:02:40 +02:00
parent 81b8cf21ff
commit e379aacf8c
16 changed files with 62 additions and 48 deletions

View File

@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Animations for using consumables. - Animations for using consumables.
- New danari character customizations - New danari character customizations
- Bald hairstyles for humans and danari - Bald hairstyles for humans and danari
- AI for sceptre weilders and sceptre cultists in Tier 5 dungeons - AI for sceptre wielders and sceptre cultists in Tier 5 dungeons
- HUD debug info now displays current biome and site - HUD debug info now displays current biome and site
### Changed ### Changed

BIN
assets/voxygen/element/ui/char_select/icons/bin.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/element/ui/char_select/icons/bin_hover.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
assets/voxygen/element/ui/char_select/icons/bin_press.png (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -519,7 +519,7 @@ impl<'a> Widget for Chat<'a> {
.filter(|t| t <= &1.5) .filter(|t| t <= &1.5)
{ {
let alpha = 1.0 - (time_since_hover / 1.5).powi(4); let alpha = 1.0 - (time_since_hover / 1.5).powi(4);
let shading = color::rgba(1.0, 1.0, 1.0, (chat_settings.chat_transp + 0.1) * alpha); let shading = color::rgba(1.0, 0.82, 0.27, (chat_settings.chat_transp + 0.1) * alpha);
Rectangle::fill([CHAT_BOX_WIDTH, CHAT_TAB_HEIGHT]) Rectangle::fill([CHAT_BOX_WIDTH, CHAT_TAB_HEIGHT])
.rgba(0.0, 0.0, 0.0, (chat_settings.chat_transp + 0.1) * alpha) .rgba(0.0, 0.0, 0.0, (chat_settings.chat_transp + 0.1) * alpha)

View File

@ -488,7 +488,8 @@ impl<'a> Widget for Crafting<'a> {
}) })
.w(157.0) .w(157.0)
.hover_image(self.imgs.selection_hover) .hover_image(self.imgs.selection_hover)
.press_image(self.imgs.selection_press); .press_image(self.imgs.selection_press)
.image_color(color::rgba(1.0, 0.82, 0.27, 1.0));
let text = Text::new(recipe.output.0.name()) let text = Text::new(recipe.output.0.name())
.color(if is_craftable { .color(if is_craftable {

View File

@ -752,6 +752,7 @@ impl<'a> Widget for Group<'a> {
}) })
.hover_image(self.imgs.selection_hover) .hover_image(self.imgs.selection_hover)
.press_image(self.imgs.selection_press) .press_image(self.imgs.selection_press)
.image_color(color::rgba(1.0, 0.82, 0.27, 1.0))
.crop_kids() .crop_kids()
.label_x(Relative::Place(Place::Start(Some(4.0)))) .label_x(Relative::Place(Place::Start(Some(4.0))))
.label(&char_name) .label(&char_name)

View File

@ -277,6 +277,7 @@ impl<'a> Widget for Chat<'a> {
.w_h(390.0 / (MAX_CHAT_TABS as f64), 19.0) .w_h(390.0 / (MAX_CHAT_TABS as f64), 19.0)
.hover_image(self.imgs.selection_hover) .hover_image(self.imgs.selection_hover)
.press_image(self.imgs.selection_press) .press_image(self.imgs.selection_press)
.image_color(color::rgba(1.0, 0.82, 0.27, 1.0))
.label(chat_tab.label.as_str()) .label(chat_tab.label.as_str())
.label_font_size(self.fonts.cyri.scale(12)) .label_font_size(self.fonts.cyri.scale(12))
.label_font_id(self.fonts.cyri.conrod_id) .label_font_id(self.fonts.cyri.conrod_id)

View File

@ -224,6 +224,7 @@ impl<'a> Widget for SettingsWindow<'a> {
.w_h(230.0, 48.0) .w_h(230.0, 48.0)
.hover_image(self.imgs.selection_hover) .hover_image(self.imgs.selection_hover)
.press_image(self.imgs.selection_press) .press_image(self.imgs.selection_press)
.image_color(color::rgba(1.0, 0.82, 0.27, 1.0))
.label(self.localized_strings.get(settings_tab.name_key())) .label(self.localized_strings.get(settings_tab.name_key()))
.label_font_size(self.fonts.cyri.scale(tab_font_scale)) .label_font_size(self.fonts.cyri.scale(tab_font_scale))
.label_font_id(self.fonts.cyri.conrod_id) .label_font_id(self.fonts.cyri.conrod_id)

View File

@ -284,7 +284,8 @@ impl<'a> Widget for Social<'a> {
} else { } else {
self.imgs.selection_press self.imgs.selection_press
}) })
.w_h(260.0, 20.0); .w_h(260.0, 20.0)
.image_color(color::rgba(1.0, 0.82, 0.27, 1.0));
let button = if i == 0 { let button = if i == 0 {
button.mid_top_with_margin_on(state.ids.online_align, 1.0) button.mid_top_with_margin_on(state.ids.online_align, 1.0)
} else { } else {

View File

@ -16,7 +16,7 @@ use crate::{
}, },
Element, IcedRenderer, IcedUi as Ui, Element, IcedRenderer, IcedUi as Ui,
}, },
img_ids::{BlankGraphic, ImageGraphic}, img_ids::ImageGraphic,
}, },
window, GlobalState, window, GlobalState,
}; };
@ -71,9 +71,9 @@ image_ids_ice! {
selection_hover: "voxygen.element.ui.generic.frames.selection_hover", selection_hover: "voxygen.element.ui.generic.frames.selection_hover",
selection_press: "voxygen.element.ui.generic.frames.selection_press", selection_press: "voxygen.element.ui.generic.frames.selection_press",
delete_button: "voxygen.element.ui.generic.buttons.x_red", delete_button: "voxygen.element.ui.char_select.icons.bin",
delete_button_hover: "voxygen.element.ui.generic.buttons.x_red_hover", delete_button_hover: "voxygen.element.ui.char_select.icons.bin_hover",
delete_button_press: "voxygen.element.ui.generic.buttons.x_red_press", delete_button_press: "voxygen.element.ui.char_select.icons.bin_press",
name_input: "voxygen.element.ui.generic.textbox", name_input: "voxygen.element.ui.generic.textbox",
@ -116,9 +116,6 @@ image_ids_ice! {
// Tooltips // Tooltips
tt_edge: "voxygen.element.ui.generic.frames.tooltip.edge", tt_edge: "voxygen.element.ui.generic.frames.tooltip.edge",
tt_corner: "voxygen.element.ui.generic.frames.tooltip.corner", tt_corner: "voxygen.element.ui.generic.frames.tooltip.corner",
<BlankGraphic>
nothing: (),
} }
} }
@ -407,6 +404,7 @@ impl Controls {
.style(style::container::Style::color(Rgba::new(0, 0, 0, 217))) .style(style::container::Style::color(Rgba::new(0, 0, 0, 217)))
.padding(12) .padding(12)
.center_x() .center_x()
.center_y()
.width(Length::Fill); .width(Length::Fill);
let characters = { let characters = {
@ -433,31 +431,26 @@ impl Controls {
.enumerate() .enumerate()
.map( .map(
|(i, (character_id, character, (select_button, delete_button)))| { |(i, (character_id, character, (select_button, delete_button)))| {
let select_col = if Some(i) == selected {
(255, 208, 69)
} else {
(255, 255, 255)
};
Overlay::new( Overlay::new(
// Delete button Container::new(
Button::new( // Delete button
delete_button, Button::new(
Space::new(Length::Units(16), Length::Units(16)), delete_button,
Space::new(Length::Units(16), Length::Units(16)),
)
.style(
style::button::Style::new(imgs.delete_button)
.hover_image(imgs.delete_button_hover)
.press_image(imgs.delete_button_press),
)
.on_press(Message::Delete(i)),
) )
.style( .padding(4),
style::button::Style::new(if Some(i) != selected {
imgs.nothing
} else {
imgs.delete_button
})
.hover_image(imgs.delete_button_hover)
.press_image(imgs.delete_button_press),
)
.on_press(Message::Delete(i))
.with_tooltip(
tooltip_manager,
move || {
tooltip::text(
i18n.get("char_selection.delete_permanently"),
tooltip_style,
)
},
),
// Select Button // Select Button
AspectRatioContainer::new( AspectRatioContainer::new(
Button::new( Button::new(
@ -467,7 +460,7 @@ impl Controls {
.size(fonts.cyri.scale(26)) .size(fonts.cyri.scale(26))
.into(), .into(),
Text::new( Text::new(
i18n.get("char_selection.uncanny_valley"), i18n.get("char_selection.uncanny_valley"), // TODO: Add actual location here
) )
.into(), .into(),
]), ]),
@ -477,10 +470,16 @@ impl Controls {
style::button::Style::new(if Some(i) == selected { style::button::Style::new(if Some(i) == selected {
imgs.selection_hover imgs.selection_hover
} else { } else {
imgs.nothing imgs.selection
}) })
.hover_image(imgs.selection_hover) .hover_image(imgs.selection_hover)
.press_image(imgs.selection_press), .press_image(imgs.selection_press)
.image_color(Rgba::new(
select_col.0,
select_col.1,
select_col.2,
255,
)),
) )
.width(Length::Fill) .width(Length::Fill)
.height(Length::Fill) .height(Length::Fill)
@ -488,8 +487,9 @@ impl Controls {
) )
.ratio_of_image(imgs.selection), .ratio_of_image(imgs.selection),
) )
.padding(2) .padding(0)
.align_x(Align::End) .align_x(Align::End)
.align_y(Align::End)
.into() .into()
}, },
) )