Merge branch 'pfau/char_selection_frames' into 'master'

Char selection list frames

See merge request 
This commit is contained in:
Monty Marz 2021-07-13 13:14:00 +00:00
commit 46f8bb764e
16 changed files with 62 additions and 48 deletions

@ -18,7 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Animations for using consumables.
- New danari character customizations
- 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
### 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.

@ -519,7 +519,7 @@ impl<'a> Widget for Chat<'a> {
.filter(|t| t <= &1.5)
{
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])
.rgba(0.0, 0.0, 0.0, (chat_settings.chat_transp + 0.1) * alpha)

@ -488,7 +488,8 @@ impl<'a> Widget for Crafting<'a> {
})
.w(157.0)
.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())
.color(if is_craftable {

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

@ -277,6 +277,7 @@ impl<'a> Widget for Chat<'a> {
.w_h(390.0 / (MAX_CHAT_TABS as f64), 19.0)
.hover_image(self.imgs.selection_hover)
.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_font_size(self.fonts.cyri.scale(12))
.label_font_id(self.fonts.cyri.conrod_id)

@ -224,6 +224,7 @@ impl<'a> Widget for SettingsWindow<'a> {
.w_h(230.0, 48.0)
.hover_image(self.imgs.selection_hover)
.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_font_size(self.fonts.cyri.scale(tab_font_scale))
.label_font_id(self.fonts.cyri.conrod_id)

@ -284,7 +284,8 @@ impl<'a> Widget for Social<'a> {
} else {
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 {
button.mid_top_with_margin_on(state.ids.online_align, 1.0)
} else {

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