diff --git a/voxygen/src/hud/chat.rs b/voxygen/src/hud/chat.rs new file mode 100644 index 0000000000..af957af428 --- /dev/null +++ b/voxygen/src/hud/chat.rs @@ -0,0 +1,124 @@ +use crate::ui::Ui; +use conrod_core::{ + input::Key, + position::Dimension, + widget::{List, Rectangle, Text, TextEdit}, + widget_ids, Color, Colorable, Positionable, Sizeable, UiCell, Widget, +}; +use std::collections::VecDeque; + +widget_ids! { + struct Ids { + message_box, + message_box_bg, + input, + input_bg, + } +} +// Consider making this a Widget +pub struct Chat { + ids: Ids, + messages: VecDeque, + input: String, + new_messages: bool, +} +impl Chat { + pub fn new(ui: &mut Ui) -> Self { + Chat { + ids: Ids::new(ui.id_generator()), + messages: VecDeque::new(), + input: String::new(), + new_messages: false, + } + } + pub fn new_message(&mut self, msg: String) { + self.messages.push_back(msg); + self.new_messages = true; + } + // Determine if the message box is scrolled to the bottom + // (i.e. the player is viewing new messages) + // If so scroll down when new messages are added + fn scroll_new_messages(&mut self, ui_widgets: &mut UiCell) { + if let Some(scroll) = ui_widgets + .widget_graph() + .widget(self.ids.message_box) + .and_then(|widget| widget.maybe_y_scroll_state) + { + // If previously scrolled to the bottom stay there + if scroll.offset >= scroll.offset_bounds.start { + ui_widgets.scroll_widget(self.ids.message_box, [0.0, std::f64::MAX]); + } + } + } + pub fn update_layout(&mut self, ui_widgets: &mut UiCell) { + // If enter is pressed send the current message + if ui_widgets + .widget_input(self.ids.input) + .presses() + .key() + .any(|key_press| match key_press.key { + Key::Return => true, + _ => false, + }) + { + self.new_message(self.input.clone()); + // Scroll to the bottom + // TODO: uncomment when we can actually get chat messages from other people + //ui_widgets.scroll_widget(self.ids.message_box, [0.0, std::f64::MAX]); + self.input.clear(); + } + + // Maintain scrolling + if self.new_messages { + self.scroll_new_messages(ui_widgets); + self.new_messages = false; + } + + // Chat input with rectangle as background + let text_edit = TextEdit::new(&self.input) + .w(500.0) + .restrict_to_height(false) + .font_size(30) + .bottom_left_with_margin_on(ui_widgets.window, 10.0); + let dims = match ( + text_edit.get_x_dimension(ui_widgets), + text_edit.get_y_dimension(ui_widgets), + ) { + (Dimension::Absolute(x), Dimension::Absolute(y)) => [x, y], + _ => [0.0, 0.0], + }; + Rectangle::fill(dims) + .rgba(0.0, 0.0, 0.0, 0.8) + .x_position(text_edit.get_x_position(ui_widgets)) + .y_position(text_edit.get_y_position(ui_widgets)) + .set(self.ids.input_bg, ui_widgets); + if let Some(str) = text_edit.set(self.ids.input, ui_widgets) { + self.input = str.to_string(); + self.input.retain(|c| c != '\n'); + } + + // Message box + Rectangle::fill([500.0, 90.0]) + .rgba(0.0, 0.0, 0.0, 0.5) + .up_from(self.ids.input, 0.0) + .set(self.ids.message_box_bg, ui_widgets); + let (mut items, scrollbar) = List::flow_down(self.messages.len()) + .middle_of(self.ids.message_box_bg) + // Why does scrollbar disappear when the list is the exact same height as its contents? + .scrollbar_next_to() + .scrollbar_thickness(20.0) + .scrollbar_color(Color::Rgba(0.0, 0.0, 0.0, 1.0)) + .set(self.ids.message_box, ui_widgets); + while let Some(item) = items.next(ui_widgets) { + item.set( + Text::new(&self.messages[item.i]) + .font_size(30) + .rgba(1.0, 1.0, 1.0, 1.0), + ui_widgets, + ) + } + if let Some(s) = scrollbar { + s.set(ui_widgets) + } + } +} diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs new file mode 100644 index 0000000000..d8a0d6131f --- /dev/null +++ b/voxygen/src/hud/mod.rs @@ -0,0 +1,1214 @@ +mod chat; + +use crate::{ + render::Renderer, + ui::{ScaleMode, Ui}, + window::Window, + Error, GlobalState, PlayState, PlayStateResult, +}; +use conrod_core::{ + color::TRANSPARENT, + event::Input, + image::Id as ImgId, + text::font::Id as FontId, + widget::{text_box::Event as TextBoxEvent, Button, Canvas, Image, TextBox, TitleBar}, + widget_ids, Borderable, Color, + Color::Rgba, + Colorable, Labelable, Positionable, Sizeable, Widget, +}; + +widget_ids! { + struct Ids { + //Bag and Inventory + bag, + bag_contents, + bag_close, + bag_map_open, + //Halp + halp, + //ESC-Menu + esc_bg, + fireplace, + menu_button_1, + menu_button_2, + menu_button_3, + menu_button_4, + menu_button_5, + //Mini-Map + mmap_frame, + mmap_frame_bg, + mmap_button_0, + mmap_button_1, + mmap_button_2, + mmap_button_3, + mmap_button_4, + mmap_button_5, + mmap_icons, + mmap_location, + //Action-Bar + xp_bar, + l_click, + r_click, + health_bar, + mana_bar, + sb_grid_l, + sb_grid_r, + sb_grid_bg_l, + sb_grid_bg_r, + //Window Frames + window_frame_0, + window_frame_1, + window_frame_2, + window_frame_3, + window_frame_4, + window_frame_5, + //0 Settings-Window + settings_bg, + settings_icon, + settings_button_mo, + settings_close, + settings_title, + //Contents + button_help, + button_help2, + interface, + video, + sound, + gameplay, + controls, + //1 Social + social_frame, + social_bg, + social_icon, + social_close, + social_title, + //2 Map + map_frame, + map_bg, + map_icon, + map_close, + map_title, + //3 Spellbook + spellbook_frame, + spellbook_bg, + spellbook_icon, + spellbook_close, + spellbook_title, + //4 Charwindow + charwindow_frame, + charwindow_bg, + charwindow_icon, + charwindow_close, + charwindow_title, + //5 Quest-Log + questlog_frame, + questlog_bg, + questlog_icon, + questlog_close, + questlog_title, + + } +} + +// TODO: make macro to mimic widget_ids! for images ids or find another solution to simplify addition of new images. +struct Imgs { + //Missing: ActionBar, Health/Mana/Energy Bar & Char Window BG/Frame + // Bag + bag: ImgId, + bag_hover: ImgId, + bag_press: ImgId, + bag_open: ImgId, + bag_open_hover: ImgId, + bag_open_press: ImgId, + bag_contents: ImgId, + + // Close button + close_button: ImgId, + close_button_hover: ImgId, + close_button_press: ImgId, + + // Menu + esc_bg: ImgId, + fireplace: ImgId, + button_dark: ImgId, + button_dark_hover: ImgId, + button_dark_press: ImgId, + + // MiniMap + mmap_frame: ImgId, + mmap_frame_bg: ImgId, + mmap_icons: ImgId, + + // Settings at Mini-Map + mmap_button: ImgId, + mmap_button_hover: ImgId, + mmap_button_press: ImgId, + mmap_button_open: ImgId, + + // SkillBar Module + sb_grid: ImgId, + sb_grid_bg: ImgId, + l_click: ImgId, + r_click: ImgId, + mana_bar: ImgId, + health_bar: ImgId, + xp_bar: ImgId, + + //Buff Frame(s) + //buff_frame: ImgId, + //buff_frame_bg: ImgId, + //buff_frame_red: ImgId, + //buff_frame_green: ImgId, + + //Missing: Buff Frame Animation + window_frame: ImgId, + //Settings-Window + settings_bg: ImgId, + settings_icon: ImgId, + settings_button_mo: ImgId, + check: ImgId, + check_mo: ImgId, + check_press: ImgId, + check_checked: ImgId, + check_checked_mo: ImgId, + slider: ImgId, + slider_indicator: ImgId, + button_blank: ImgId, + button_blue_mo: ImgId, + button_blue_press: ImgId, + //Social-Window + social_bg: ImgId, + social_icon: ImgId, + //Map-Window + map_bg: ImgId, + map_icon: ImgId, + map_frame: ImgId, + //Spell Book Window + spellbook_bg: ImgId, + spellbook_icon: ImgId, + //Char Window + charwindow_bg: ImgId, + charwindow_icon: ImgId, + //Quest-Log Window + questlog_bg: ImgId, + questlog_icon: ImgId, + //Halp + //halp: ImgId, +} +impl Imgs { + fn new(ui: &mut Ui, renderer: &mut Renderer) -> Imgs { + let mut load = |filename| { + let image = image::open( + &[env!("CARGO_MANIFEST_DIR"), "/test_assets/ui/hud/", filename].concat(), + ) + .unwrap(); + ui.new_image(renderer, &image).unwrap() + }; + Imgs { + // Bag + bag: load("bag/icon/0_bag.png"), + bag_hover: load("bag/icon/1_bag_hover.png"), + bag_press: load("bag/icon/2_bag_press.png"), + bag_open: load("bag/icon/3_bag_open.png"), + bag_open_hover: load("bag/icon/4_bag_open_hover.png"), + bag_open_press: load("bag/icon/5_bag_open_press.png"), + bag_contents: load("bag/bg.png"), + + // Close button + close_button: load("x/0_x.png"), + close_button_hover: load("x/1_x_hover.png"), + close_button_press: load("x/2_x_press.png"), + + // Esc-Menu + esc_bg: load("menu/bg.png"), + fireplace: load("menu/fireplace_1.png"), + button_dark: load("menu/button_dark.png"), + button_dark_hover: load("menu/button_dark_hover.png"), + button_dark_press: load("menu/button_dark_press.png"), + + // MiniMap + mmap_frame: load("mmap/mmap_frame.png"), + mmap_frame_bg: load("mmap/mmap_bg.png"), + mmap_icons: load("mmap/mmap_icons.png"), + + // Settings at Mini-Map + mmap_button: load("mmap/grid.png"), + mmap_button_hover: load("mmap/hover.png"), + mmap_button_press: load("mmap/press.png"), + mmap_button_open: load("mmap/open.png"), + + // Skillbar Module + sb_grid: load("skill_bar/sbar_grid.png"), + sb_grid_bg: load("skill_bar/sbar_grid_bg.png"), + l_click: load("skill_bar/l.png"), + r_click: load("skill_bar/r.png"), + mana_bar: load("skill_bar/mana_bar.png"), + health_bar: load("skill_bar/health_bar.png"), + xp_bar: load("skill_bar/xp_bar.png"), + + //Buff Frame(s) + //buff_frame: load("skill_bar/buff_frame.png"), + //buff_frame_bg: load("skill_bar/buff_frame_bg.png"), + //buff_frame_red: load("skill_bar/buff_frame_red.png"), + //buff_frame_green: load("skill_bar/buff_frame_green.png"), + + //Missing: Buff Frame Animation (.gif ?!) + window_frame: load("window_frame.png"), + + //Settings Window + settings_bg: load("settings/bg.png"), + settings_icon: load("settings/icon.png"), + settings_button_mo: load("settings/mo.png"), + check: load("settings/check.png"), + check_mo: load("settings/check_mo.png"), + check_press: load("settings/check_press.png"), + check_checked: load("settings/check_checked.png"), + check_checked_mo: load("settings/check_checked_mo.png"), + slider: load("settings/slider.png"), + slider_indicator: load("settings/slider_indicator.png"), + button_blank: load("settings/button_blank.png"), + button_blue_mo: load("settings/mo.png"), + button_blue_press: load("settings/press.png"), + + //Social Window + social_bg: load("social/bg.png"), + social_icon: load("social/icon.png"), + + //Map Window + map_bg: load("map/bg.png"), + map_icon: load("map/icon.png"), + map_frame: load("map/window_frame_map.png"), + + // Spell Book Window + spellbook_bg: load("spellbook/bg.png"), + spellbook_icon: load("spellbook/icon.png"), + + //Char Window + charwindow_bg: load("charwindow/bg.png"), + charwindow_icon: load("charwindow/icon.png"), + + //Quest-Log Window + questlog_bg: load("questlog/bg.png"), + questlog_icon: load("questlog/icon.png"), + } + } +} + +pub struct Hud { + ui: Ui, + ids: Ids, + imgs: Imgs, + chat: chat::Chat, + font_metamorph: FontId, + font_whitney: FontId, + show_help: bool, + bag_open: bool, + menu_open: bool, + mmap_button_0: bool, + mmap_button_1: bool, + mmap_button_2: bool, + mmap_button_3: bool, + mmap_button_4: bool, + mmap_button_5: bool, + settings_interface: bool, + settings_video: bool, + settings_sound: bool, + settings_gameplay: bool, + settings_controls: bool, +} + +impl Hud { + pub fn new(window: &mut Window) -> Self { + let mut ui = Ui::new(window).unwrap(); + // TODO: adjust/remove this, right now it is used to demonstrate window scaling functionality + ui.scaling_mode(ScaleMode::RelativeToWindow([1920.0, 1080.0].into())); + // Generate ids + let mut ids = Ids::new(ui.id_generator()); + // Load images + let imgs = Imgs::new(&mut ui, window.renderer_mut()); + // Load fonts + let font_whitney = ui.new_font( + conrod_core::text::font::from_file(concat!( + env!("CARGO_MANIFEST_DIR"), + "/test_assets/font/Whitney-Book.ttf" + )) + .unwrap(), + ); + let font_metamorph = ui.new_font( + conrod_core::text::font::from_file(concat!( + env!("CARGO_MANIFEST_DIR"), + "/test_assets/font/Metamorphous-Regular.ttf" + )) + .unwrap(), + ); + // Chat box + let chat = chat::Chat::new(&mut ui); + Self { + ui, + imgs, + ids, + chat, + settings_interface: false, + settings_controls: false, + settings_gameplay: false, + settings_sound: false, + settings_video: false, + show_help: true, + bag_open: false, + menu_open: false, + mmap_button_0: false, + mmap_button_1: false, + mmap_button_2: false, + mmap_button_3: false, + mmap_button_4: false, + mmap_button_5: false, + + font_metamorph, + font_whitney, + } + } + + fn update_layout(&mut self) { + let ref mut ui_widgets = self.ui.set_widgets(); + // Chat box + self.chat.update_layout(ui_widgets); + // Check if the bag was clicked + // (can't use .was_clicked() because we are changing the image and this is after setting the widget which causes flickering as it takes a frame to change after the mouse button is lifted) + if ui_widgets + .widget_input(self.ids.bag) + .clicks() + .left() + .count() + % 2 + == 1 + { + self.bag_open = !self.bag_open; + } + // Bag contents + // Note that display_contents is set before checking if the bag was clicked + // this ensures that the contents and open bag img are displayed on the same frame + //Help Text + if self.show_help { + TitleBar::new( + " + Tab = Free Cursor + Esc = Open/Close Menus + Q = Back to Login + + F1 = Toggle this Window + F2 = Toggle Interface + + M = Map + I = Inventory + L = Quest-Log + C = Character Window + O = Social + P = Spellbook + N = Settings", + self.ids.halp, + ) + .rgba(235.0, 170.0, 114.0, 0.3) + .border_rgba(235.0, 170.0, 114.0, 1.0) + .top_left_with_margins_on(ui_widgets.window, -18.0, -30.0) + .w_h(300.0, 300.0) + .font_id(self.font_whitney) + .label_font_size(18) + .label_rgba(0.0, 0.0, 0.0, 1.0) + .left_justify_label() + .set(self.ids.halp, ui_widgets); + if Button::image(self.imgs.button_dark) + .w_h(50.0, 30.0) + .bottom_right_with_margin_on(self.ids.halp, 0.0) + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label("Close") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.button_help2, ui_widgets) + .was_clicked() + { + self.show_help = false; + }; + } + if self.bag_open { + // Contents + Image::new(self.imgs.bag_contents) + .w_h(1504.0 / 4.0, 1760.0 / 4.0) + .bottom_right_with_margins(88.0, 68.0) + .set(self.ids.bag_contents, ui_widgets); + + // X-button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 3.0, 244.0 * 0.22 / 3.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.bag_contents, 5.0, 17.0) + .set(self.ids.bag_close, ui_widgets) + .was_clicked() + { + self.bag_open = false; + } + } + + // Minimap frame and bg + Image::new(self.imgs.mmap_frame_bg) + .w_h(1750.0 / 8.0, 1650.0 / 8.0) + .top_right_with_margins_on(ui_widgets.window, 20.0, 30.0) + .set(self.ids.mmap_frame_bg, ui_widgets); + + Image::new(self.imgs.mmap_frame) + .w_h(1750.0 / 8.0, 1650.0 / 8.0) + .top_right_with_margins_on(ui_widgets.window, 20.0, 30.0) + .set(self.ids.mmap_frame, ui_widgets); + + Image::new(self.imgs.mmap_icons) + .w_h(448.0 / 14.93, 2688.0 / 14.93) + .right_from(self.ids.mmap_frame, 0.0) + .align_bottom_of(self.ids.mmap_frame) + .set(self.ids.mmap_icons, ui_widgets); + //Title + //TODO Make it display the actual Location + TitleBar::new("Unknown Location", self.ids.mmap_frame) + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .top_right_with_margins_on(self.ids.mmap_frame, 5.0, 0.0) + .w_h(1750.0 / 8.0, 15.0) + .label_font_size(14) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.mmap_location, ui_widgets); + + // Minimap Buttons + + //0 Settings + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .top_right_with_margins_on(self.ids.mmap_icons, 0.0, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_0, ui_widgets) + .was_clicked() + { + self.mmap_button_0 = !self.mmap_button_0; + self.mmap_button_1 = false; + self.mmap_button_2 = false; + self.mmap_button_3 = false; + self.mmap_button_4 = false; + self.mmap_button_5 = false; + self.bag_open = false; + }; + //2 Map + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .down_from(self.ids.mmap_button_1, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_2, ui_widgets) + .was_clicked() + { + self.mmap_button_2 = !self.mmap_button_2; + self.bag_open = false; + }; + + //Other Windows can only be accessed, when Settings are closed. Opening Settings will close all other Windows including the Bag. + //Opening the Map won't close the windows displayed before. + + if self.mmap_button_0 == false && self.mmap_button_2 == false { + //1 Social + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .down_from(self.ids.mmap_button_0, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_1, ui_widgets) + .was_clicked() + { + self.mmap_button_1 = !self.mmap_button_1; + self.mmap_button_2 = false; + self.mmap_button_3 = false; + self.mmap_button_5 = false; + }; + + //3 Spellbook + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .down_from(self.ids.mmap_button_2, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_3, ui_widgets) + .was_clicked() + { + self.mmap_button_1 = false; + self.mmap_button_2 = false; + self.mmap_button_3 = !self.mmap_button_3; + self.mmap_button_5 = false; + }; + //4 Char-Window + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .down_from(self.ids.mmap_button_3, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_4, ui_widgets) + .was_clicked() + { + self.mmap_button_4 = !self.mmap_button_4; + }; + //5 Quest-Log + if Button::image(self.imgs.mmap_button) + .w_h(448.0 / 15.0, 448.0 / 15.0) + .down_from(self.ids.mmap_button_4, 0.0) + .hover_image(self.imgs.mmap_button_hover) + .press_image(self.imgs.mmap_button_press) + .set(self.ids.mmap_button_5, ui_widgets) + .was_clicked() + { + self.mmap_button_1 = false; + self.mmap_button_2 = false; + self.mmap_button_3 = false; + self.mmap_button_5 = !self.mmap_button_5; + }; + } + + // Skillbar Module + + //Experience-Bar + Image::new(self.imgs.xp_bar) + .w_h(2688.0 / 4.0, 116.0 / 4.0) + .mid_bottom_of(ui_widgets.window) + .set(self.ids.xp_bar, ui_widgets); + + //LeftGrid + Image::new(self.imgs.sb_grid) + .w_h(2240.0 / 8.0, 448.0 / 8.0) + .up_from(self.ids.xp_bar, 0.0) + .align_left_of(self.ids.xp_bar) + .set(self.ids.sb_grid_l, ui_widgets); + + Image::new(self.imgs.sb_grid_bg) + .w_h(2240.0 / 8.0, 448.0 / 8.0) + .middle_of(self.ids.sb_grid_l) + .set(self.ids.sb_grid_bg_l, ui_widgets); + + //Right Grid + Image::new(self.imgs.sb_grid) + .w_h(2240.0 / 8.0, 448.0 / 8.0) + .up_from(self.ids.xp_bar, 0.0) + .align_right_of(self.ids.xp_bar) + .set(self.ids.sb_grid_r, ui_widgets); + + Image::new(self.imgs.sb_grid_bg) + .w_h(2240.0 / 8.0, 448.0 / 8.0) + .middle_of(self.ids.sb_grid_r) + .set(self.ids.sb_grid_bg_r, ui_widgets); + + //Right and Left Click + Image::new(self.imgs.l_click) + .w_h(224.0 / 4.0, 320.0 / 4.0) + .right_from(self.ids.sb_grid_bg_l, 0.0) + .align_bottom_of(self.ids.sb_grid_bg_l) + .set(self.ids.l_click, ui_widgets); + + Image::new(self.imgs.r_click) + .w_h(224.0 / 4.0, 320.0 / 4.0) + .left_from(self.ids.sb_grid_bg_r, 0.0) + .align_bottom_of(self.ids.sb_grid_bg_r) + .set(self.ids.r_click, ui_widgets); + + //Health- and Mana-Bar + Image::new(self.imgs.health_bar) + .w_h(1120.0 / 4.0, 96.0 / 4.0) + .left_from(self.ids.l_click, 0.0) + .align_top_of(self.ids.l_click) + .set(self.ids.health_bar, ui_widgets); + + Image::new(self.imgs.mana_bar) + .w_h(1120.0 / 4.0, 96.0 / 4.0) + .right_from(self.ids.r_click, 0.0) + .align_top_of(self.ids.r_click) + .set(self.ids.mana_bar, ui_widgets); + + //Buffs/Debuffs + + //Buffs + + //Debuffs + + // Bag + if self.mmap_button_2 == false { + Button::image(if self.bag_open { + self.imgs.bag_open + } else { + self.imgs.bag + }) + .bottom_right_with_margin_on(ui_widgets.window, 20.0) + .hover_image(if self.bag_open { + self.imgs.bag_open_hover + } else { + self.imgs.bag_hover + }) + .press_image(if self.bag_open { + self.imgs.bag_open_press + } else { + self.imgs.bag_press + }) + .w_h(420.0 / 6.0, 480.0 / 6.0) + .set(self.ids.bag, ui_widgets); + } + if self.mmap_button_2 { + Image::new(self.imgs.bag) + .bottom_right_with_margin_on(ui_widgets.window, 20.0) + .w_h(420.0 / 4.0, 480.0 / 4.0) + .set(self.ids.bag_map_open, ui_widgets); + } + + //Windows + + //Char Window will always appear at the left side. Other Windows either appear at the left side, + //or when the Char Window is opened they will appear right from it. + + //0 Settings + + if self.mmap_button_0 { + //BG + Image::new(self.imgs.settings_bg) + .middle_of(ui_widgets.window) + .w_h(1648.0 / 2.5, 1952.0 / 2.5) + .set(self.ids.settings_bg, ui_widgets); + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 2.5, 244.0 * 0.22 / 2.5) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.settings_bg, 4.0, 4.0) + .set(self.ids.settings_close, ui_widgets) + .was_clicked() + { + self.mmap_button_0 = false; + self.settings_interface = true; + self.settings_controls = false; + self.settings_gameplay = false; + self.settings_sound = false; + self.settings_video = false; + } + + //Title + TitleBar::new("Settings", self.ids.settings_bg) + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(20.0) + .w_h(600.0 / 3.0, 8.0) + .label_font_size(30) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.settings_title, ui_widgets); + //Icon + Image::new(self.imgs.settings_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.settings_bg, -10.0, -10.0) + .set(self.ids.settings_icon, ui_widgets); + + //1 Interface//////////////////////////// + if Button::image(self.imgs.button_blank) + .w_h(304.0 / 2.5, 80.0 / 2.5) + .hover_image(self.imgs.button_blue_mo) + .press_image(self.imgs.button_blue_press) + .top_left_with_margins_on(self.ids.settings_bg, 10.0, 10.0) + .label("Interface") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.interface, ui_widgets) + .was_clicked() + { + self.settings_interface = true; + self.settings_controls = false; + self.settings_gameplay = false; + self.settings_sound = false; + self.settings_video = false; + } + //Toggle Help + if self.settings_interface { + if Button::image(if self.show_help { + self.imgs.check_checked + } else { + self.imgs.check + }) + .w_h(288.0 / 10.0, 288.0 / 10.0) + .middle_of(self.ids.settings_bg) + .hover_image(if self.show_help { + self.imgs.check_checked_mo + } else { + self.imgs.check_mo + }) + .press_image(self.imgs.check_press) + .label_x(conrod_core::position::Relative::Scalar(55.0)) + .label("Show Help") + .label_font_size(12) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.button_help, ui_widgets) + .was_clicked() + { + self.show_help = !self.show_help; + }; + } + //2 Gameplay//////////////// + if Button::image(self.imgs.button_blank) + .w_h(304.0 / 2.5, 80.0 / 2.5) + .hover_image(self.imgs.button_blue_mo) + .press_image(self.imgs.button_blue_press) + .down_from(self.ids.interface, 10.0) + .label("Gameplay") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.gameplay, ui_widgets) + .was_clicked() + { + self.settings_interface = false; + self.settings_controls = false; + self.settings_gameplay = true; + self.settings_sound = false; + self.settings_video = false; + } + + //3 Controls///////////////////// + if Button::image(self.imgs.button_blank) + .w_h(304.0 / 2.5, 80.0 / 2.5) + .hover_image(self.imgs.button_blue_mo) + .press_image(self.imgs.button_blue_press) + .down_from(self.ids.interface, 52.0) + .label("Controls") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.controls, ui_widgets) + .was_clicked() + { + self.settings_interface = false; + self.settings_controls = true; + self.settings_gameplay = false; + self.settings_sound = false; + self.settings_video = false; + } + + //4 Video//////////////////////////////// + if Button::image(self.imgs.button_blank) + .w_h(304.0 / 2.5, 80.0 / 2.5) + .hover_image(self.imgs.button_blue_mo) + .press_image(self.imgs.button_blue_press) + .down_from(self.ids.interface, 94.0) + .label("Video") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.video, ui_widgets) + .was_clicked() + { + self.settings_interface = false; + self.settings_controls = false; + self.settings_gameplay = false; + self.settings_sound = false; + self.settings_video = true; + } + + //5 Sound/////////////////////////////// + if Button::image(self.imgs.button_blank) + .w_h(304.0 / 2.5, 80.0 / 2.5) + .hover_image(self.imgs.button_blue_mo) + .press_image(self.imgs.button_blue_press) + .down_from(self.ids.interface, 136.0) + .label("Sound") + .label_font_size(10) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.sound, ui_widgets) + .was_clicked() + { + self.settings_interface = false; + self.settings_controls = false; + self.settings_gameplay = false; + self.settings_sound = true; + self.settings_video = false; + } + + //Toggle Help + if Button::image(if self.show_help { + self.imgs.check_checked + } else { + self.imgs.check + }) + .w_h(288.0 / 10.0, 288.0 / 10.0) + .middle_of(self.ids.settings_bg) + .hover_image(if self.show_help { + self.imgs.check_checked_mo + } else { + self.imgs.check_mo + }) + .press_image(self.imgs.check_press) + .label_x(conrod_core::position::Relative::Scalar(55.0)) + .label("Show Help") + .label_font_size(12) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.button_help, ui_widgets) + .was_clicked() + { + self.show_help = !self.show_help; + }; + } + //1 Social + + if self.mmap_button_1 { + //Frame + if self.mmap_button_4 { + Image::new(self.imgs.window_frame) + .right_from(self.ids.charwindow_frame, 20.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.social_frame, ui_widgets); + } else { + Image::new(self.imgs.window_frame) + .top_left_with_margins_on(ui_widgets.window, 200.0, 90.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.social_frame, ui_widgets); + } + + //BG + Image::new(self.imgs.social_bg) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .middle_of(self.ids.social_frame) + .set(self.ids.social_bg, ui_widgets); + + //Icon + Image::new(self.imgs.social_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.social_frame, -10.0, -10.0) + .set(self.ids.social_icon, ui_widgets); + + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 4.0, 244.0 * 0.22 / 4.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.social_frame, 4.0, 4.0) + .set(self.ids.social_close, ui_widgets) + .was_clicked() + { + self.mmap_button_1 = false; + } + //Title + TitleBar::new("Social", self.ids.social_frame) + .center_justify_label() + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(10.0) + .w_h(500.0 / 3.0, 8.0) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.social_title, ui_widgets); + } + + //3 Spell Book + if self.mmap_button_3 { + //Frame + if self.mmap_button_4 { + Image::new(self.imgs.window_frame) + .right_from(self.ids.charwindow_frame, 20.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.spellbook_frame, ui_widgets); + } else { + Image::new(self.imgs.window_frame) + .top_left_with_margins_on(ui_widgets.window, 200.0, 90.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.spellbook_frame, ui_widgets); + } + + //BG + Image::new(self.imgs.spellbook_bg) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .middle_of(self.ids.spellbook_frame) + .set(self.ids.spellbook_bg, ui_widgets); + + //Icon + Image::new(self.imgs.spellbook_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.spellbook_frame, -10.0, -10.0) + .set(self.ids.spellbook_icon, ui_widgets); + + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 4.0, 244.0 * 0.22 / 4.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.spellbook_frame, 4.0, 4.0) + .set(self.ids.spellbook_close, ui_widgets) + .was_clicked() + { + self.mmap_button_3 = false; + } + //Title + TitleBar::new("Spellbook", self.ids.spellbook_frame) + .center_justify_label() + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(10.0) + .w_h(500.0 / 3.0, 8.0) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.spellbook_title, ui_widgets); + } + + //4 Char-Window + if self.mmap_button_4 { + //Frame + Image::new(self.imgs.window_frame) + .top_left_with_margins_on(ui_widgets.window, 200.0, 90.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.charwindow_frame, ui_widgets); + + //BG + Image::new(self.imgs.charwindow_bg) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .middle_of(self.ids.charwindow_frame) + .set(self.ids.charwindow_bg, ui_widgets); + + //Icon + Image::new(self.imgs.charwindow_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.charwindow_frame, -10.0, -10.0) + .set(self.ids.charwindow_icon, ui_widgets); + + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 4.0, 244.0 * 0.22 / 4.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.charwindow_frame, 4.0, 4.0) + .set(self.ids.charwindow_close, ui_widgets) + .was_clicked() + { + self.mmap_button_4 = false; + } + //Title + TitleBar::new("Character Name", self.ids.charwindow_frame) //Add in actual Character Name + .center_justify_label() + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(10.0) + .w_h(500.0 / 3.0, 8.0) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.charwindow_title, ui_widgets); + } + + //5 Quest-Log + if self.mmap_button_5 { + //Frame + if self.mmap_button_4 { + Image::new(self.imgs.window_frame) + .right_from(self.ids.charwindow_frame, 20.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.questlog_frame, ui_widgets); + } else { + Image::new(self.imgs.window_frame) + .top_left_with_margins_on(ui_widgets.window, 200.0, 90.0) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .set(self.ids.questlog_frame, ui_widgets); + } + + //BG + Image::new(self.imgs.questlog_bg) + .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .middle_of(self.ids.questlog_frame) + .set(self.ids.questlog_bg, ui_widgets); + + //Icon + Image::new(self.imgs.questlog_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.questlog_frame, -10.0, -10.0) + .set(self.ids.questlog_icon, ui_widgets); + + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 4.0, 244.0 * 0.22 / 4.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.questlog_frame, 4.0, 4.0) + .set(self.ids.questlog_close, ui_widgets) + .was_clicked() + { + self.mmap_button_5 = false; + } + //Title + TitleBar::new("Quest-Log", self.ids.questlog_frame) + .center_justify_label() + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(10.0) + .w_h(500.0 / 3.0, 8.0) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.questlog_title, ui_widgets); + } + //2 Map + if self.mmap_button_2 { + //Frame + Image::new(self.imgs.map_frame) + .middle_of(ui_widgets.window) + .w_h(5000.0 / 4.0, 3000.0 / 4.0) + .set(self.ids.map_frame, ui_widgets); + + //BG + Image::new(self.imgs.map_bg) + .w_h(5000.0 / 4.0, 3000.0 / 4.0) + .middle_of(self.ids.map_frame) + .set(self.ids.map_bg, ui_widgets); + + //Icon + Image::new(self.imgs.map_icon) + .w_h(224.0 / 3.0, 224.0 / 3.0) + .top_left_with_margins_on(self.ids.map_frame, -10.0, -10.0) + .set(self.ids.map_icon, ui_widgets); + + //X-Button + if Button::image(self.imgs.close_button) + .w_h(244.0 * 0.22 / 1.0, 244.0 * 0.22 / 1.0) + .hover_image(self.imgs.close_button_hover) + .press_image(self.imgs.close_button_press) + .top_right_with_margins_on(self.ids.map_frame, 1.0, 1.0) + .set(self.ids.map_close, ui_widgets) + .was_clicked() + { + self.mmap_button_2 = false; + } + //Title + TitleBar::new("Map", self.ids.map_frame) + .center_justify_label() + .color(TRANSPARENT) + .border_color(TRANSPARENT) + .mid_top_with_margin(10.0) + .w_h(500.0 / 3.0, 8.0) + .label_font_size(50) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .set(self.ids.map_title, ui_widgets); + } + + //ESC-MENU + //Background + if self.menu_open { + Image::new(self.imgs.esc_bg) + .w_h(228.0, 450.0) + .middle_of(ui_widgets.window) + .set(self.ids.esc_bg, ui_widgets); + + Image::new(self.imgs.fireplace) + .w_h(180.0, 60.0) + .mid_top_with_margin_on(self.ids.esc_bg, 50.0) + .set(self.ids.fireplace, ui_widgets); + + //Settings + if Button::image(self.imgs.button_dark) + .mid_top_with_margin_on(self.ids.esc_bg, 115.0) + .w_h(170.0, 50.0) + .label("Settings") + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .set(self.ids.menu_button_1, ui_widgets) + .was_clicked() + { + self.menu_open = false; + self.mmap_button_0 = true; + }; + //Controls + if Button::image(self.imgs.button_dark) + .mid_top_with_margin_on(self.ids.esc_bg, 175.0) + .w_h(170.0, 50.0) + .label("Controls") + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .set(self.ids.menu_button_2, ui_widgets) + .was_clicked() + { + //self.menu_open = false; + + }; + //Servers + + if Button::image(self.imgs.button_dark) + .mid_top_with_margin_on(self.ids.esc_bg, 235.0) + .w_h(170.0, 50.0) + .label("Servers") + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .set(self.ids.menu_button_3, ui_widgets) + .was_clicked() + { + //self.menu_open = false; + + }; + //Logout + + if Button::image(self.imgs.button_dark) + .mid_top_with_margin_on(self.ids.esc_bg, 295.0) + .w_h(170.0, 50.0) + .label("Logout") + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .set(self.ids.menu_button_4, ui_widgets) + .was_clicked() + {}; + //Quit + + if Button::image(self.imgs.button_dark) + .mid_top_with_margin_on(self.ids.esc_bg, 355.0) + .w_h(170.0, 50.0) + .label("Quit") + .hover_image(self.imgs.button_dark_hover) + .press_image(self.imgs.button_dark_press) + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .set(self.ids.menu_button_5, ui_widgets) + .was_clicked() + { + use std::process; + + process::exit(0x0256); + }; + } + } + + pub fn toggle_menu(&mut self) { + self.menu_open = !self.menu_open; + } + + pub fn handle_event(&mut self, input: Input) { + self.ui.handle_event(input); + } + + pub fn maintain(&mut self, renderer: &mut Renderer) { + self.update_layout(); + self.ui.maintain(renderer); + } + + pub fn render(&self, renderer: &mut Renderer) { + self.ui.render(renderer); + } + pub fn toggle_windows(&mut self) { + if self.bag_open == false + && self.menu_open == false + && self.mmap_button_0 == false + && self.mmap_button_1 == false + && self.mmap_button_2 == false + && self.mmap_button_3 == false + && self.mmap_button_4 == false + && self.mmap_button_5 == false + { + self.menu_open = true; + } else { + self.bag_open = false; + self.menu_open = false; + self.mmap_button_0 = false; + self.mmap_button_1 = false; + self.mmap_button_2 = false; + self.mmap_button_3 = false; + self.mmap_button_4 = false; + self.mmap_button_5 = false; + } + } +} diff --git a/voxygen/src/main.rs b/voxygen/src/main.rs index da36849d3e..4f580753c6 100644 --- a/voxygen/src/main.rs +++ b/voxygen/src/main.rs @@ -1,7 +1,9 @@ #![feature(drain_filter)] +#![recursion_limit="2048"] pub mod anim; pub mod error; +pub mod hud; pub mod key_state; pub mod menu; pub mod mesh; diff --git a/voxygen/src/menu/main/mod.rs b/voxygen/src/menu/main/mod.rs index 3726a85d34..9b6bf72895 100644 --- a/voxygen/src/menu/main/mod.rs +++ b/voxygen/src/menu/main/mod.rs @@ -1,19 +1,14 @@ mod ui; -use std::time::Duration; -use vek::*; -use common::clock::Clock; use crate::{ - PlayState, - PlayStateResult, - GlobalState, - window::{ - Event, - Window, - }, session::SessionState, + window::{Event, Window}, + GlobalState, PlayState, PlayStateResult, }; +use common::clock::Clock; +use std::time::Duration; use ui::MainMenuUi; +use vek::*; const FPS: u64 = 60; @@ -25,18 +20,21 @@ impl MainMenuState { /// Create a new `MainMenuState` pub fn new(window: &mut Window) -> Self { Self { - main_menu_ui: MainMenuUi::new(window) + main_menu_ui: MainMenuUi::new(window), } } - } -// The background colour -const BG_COLOR: Rgba = Rgba { r: 0.0, g: 0.3, b: 1.0, a: 1.0 }; +// Background colour +const BG_COLOR: Rgba = Rgba { + r: 0.0, + g: 0.3, + b: 1.0, + a: 1.0, +}; impl PlayState for MainMenuState { fn play(&mut self, global_state: &mut GlobalState) -> PlayStateResult { - // Set up an fps clock let mut clock = Clock::new(); @@ -50,14 +48,15 @@ impl PlayState for MainMenuState { self.main_menu_ui.handle_event(input); } // Ignore all other events - _ => {}, + _ => {} } } global_state.window.renderer_mut().clear(BG_COLOR); // Maintain the UI - self.main_menu_ui.maintain(global_state.window.renderer_mut()); + self.main_menu_ui + .maintain(global_state.window.renderer_mut()); // Check if there should be a login attempt if let Some((username, address)) = self.main_menu_ui.login_attempt() { // For now just start a new session @@ -71,15 +70,17 @@ impl PlayState for MainMenuState { // Finish the frame global_state.window.renderer_mut().flush(); - global_state.window + global_state + .window .swap_buffers() .expect("Failed to swap window buffers"); // Wait for the next tick clock.tick(Duration::from_millis(1000 / FPS)); - } } - fn name(&self) -> &'static str { "Title" } + fn name(&self) -> &'static str { + "Title" + } } diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index 13b9d2ca42..251c6bd48f 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -1,34 +1,27 @@ +use crate::{ + render::Renderer, + ui::{ScaleMode, Ui}, + window::Window, + Error, GlobalState, PlayState, PlayStateResult, +}; use conrod_core::{ - Positionable, - Sizeable, - Widget, - Labelable, - Colorable, - Borderable, - widget_ids, + color::TRANSPARENT, event::Input, image::Id as ImgId, text::font::Id as FontId, - widget::{ - Image, - Button, - Canvas, - TextBox, - text_box::Event as TextBoxEvent, - } -}; -use crate::{ - window::Window, - render::Renderer, - ui::{Ui, ScaleMode} + widget::{text_box::Event as TextBoxEvent, Button, Canvas, Image, TextBox}, + widget_ids, Borderable, Color, + Color::Rgba, + Colorable, Labelable, Positionable, Sizeable, Widget, }; -widget_ids!{ +widget_ids! { struct Ids { // Background and logo bg, v_logo, - // Login + alpha_version, + // Login, Singleplayer login_button, login_text, address_text, @@ -37,6 +30,8 @@ widget_ids!{ username_text, username_bg, username_field, + singleplayer_button, + singleplayer_text, // Buttons servers_button, servers_text, @@ -50,6 +45,7 @@ widget_ids!{ struct Imgs { bg: ImgId, v_logo: ImgId, + alpha_version: ImgId, address_text: ImgId, username_text: ImgId, @@ -59,6 +55,7 @@ struct Imgs { login_button: ImgId, login_button_hover: ImgId, login_button_press: ImgId, + singleplayer_text: ImgId, servers_text: ImgId, settings_text: ImgId, @@ -70,12 +67,21 @@ struct Imgs { impl Imgs { fn new(ui: &mut Ui, renderer: &mut Renderer) -> Imgs { let mut load = |filename| { - let image = image::open(&[env!("CARGO_MANIFEST_DIR"), "/test_assets/ui/main/", filename].concat()).unwrap(); + let image = image::open( + &[ + env!("CARGO_MANIFEST_DIR"), + "/test_assets/ui/main/", + filename, + ] + .concat(), + ) + .unwrap(); ui.new_image(renderer, &image).unwrap() }; Imgs { bg: load("bg.png"), - v_logo: load("v_logo_a01.png"), + v_logo: load("v_logo.png"), + alpha_version: load("text/a01.png"), // Input fields address_text: load("text/server_address.png"), @@ -84,6 +90,7 @@ impl Imgs { // Login button login_text: load("text/login.png"), + singleplayer_text: load("text/singleplayer.png"), login_button: load("buttons/button_login.png"), login_button_hover: load("buttons/button_login_hover.png"), login_button_press: load("buttons/button_login_press.png"), @@ -103,8 +110,9 @@ pub struct MainMenuUi { ui: Ui, ids: Ids, imgs: Imgs, - font_id: FontId, - username: String, + font_metamorph: FontId, + font_whitney: FontId, + username: String, server_address: String, attempt_login: bool, } @@ -118,17 +126,29 @@ impl MainMenuUi { let ids = Ids::new(ui.id_generator()); // Load images let imgs = Imgs::new(&mut ui, window.renderer_mut()); - // Load font - let font_id = ui.new_font(conrod_core::text::font::from_file( - concat!(env!("CARGO_MANIFEST_DIR"), "/test_assets/font/Metamorphous-Regular.ttf") - ).unwrap()); + // Load fonts + let font_whitney = ui.new_font( + conrod_core::text::font::from_file(concat!( + env!("CARGO_MANIFEST_DIR"), + "/test_assets/font/Whitney-Book.ttf" + )) + .unwrap(), + ); + let font_metamorph = ui.new_font( + conrod_core::text::font::from_file(concat!( + env!("CARGO_MANIFEST_DIR"), + "/test_assets/font/Metamorphous-Regular.ttf" + )) + .unwrap(), + ); Self { ui, imgs, ids, - font_id, - username: "Username".to_string(), - server_address: "Server-Address".to_string(), + font_metamorph, + font_whitney, + username: "Username".to_string(), + server_address: "Server Address".to_string(), attempt_login: false, } } @@ -145,13 +165,18 @@ impl MainMenuUi { fn update_layout(&mut self) { let ref mut ui_widgets = self.ui.set_widgets(); - // Background image & Veloren logo - Image::new(self.imgs.bg) - .middle_of(ui_widgets.window) - .set(self.ids.bg, ui_widgets); - Image::new(self.imgs.v_logo) + // Background image, Veloren logo, Alpha-Version Label + Image::new(self.imgs.bg) + .middle_of(ui_widgets.window) + .set(self.ids.bg, ui_widgets); + Button::image(self.imgs.v_logo) .w_h(346.0, 111.0) .top_left_with_margins(30.0, 40.0) + .label("Alpha 0.1") + .label_rgba(255.0, 255.0, 255.0, 1.0) + .label_font_size(10) + .label_y(conrod_core::position::Relative::Scalar(-40.0)) + .label_x(conrod_core::position::Relative::Scalar(-100.0)) .set(self.ids.v_logo, ui_widgets); // Input fields @@ -159,65 +184,57 @@ impl MainMenuUi { macro_rules! login { () => { self.attempt_login = true; - } + }; } - use conrod_core::color::TRANSPARENT; // Username // TODO: get a lower resolution and cleaner input_bg.png Image::new(self.imgs.input_bg) - .w_h(672.0/2.0, 166.0/2.0) + .w_h(337.0, 67.0) .middle_of(ui_widgets.window) .set(self.ids.username_bg, ui_widgets); - Image::new(self.imgs.username_text) - .w_h(149.0, 24.0) - .up(0.0) - .align_left() - .set(self.ids.username_text, ui_widgets); // TODO: figure out why cursor is rendered inconsistently for event in TextBox::new(&self.username) - .w_h(580.0/2.0, 60.0/2.0) - .mid_bottom_with_margin_on(self.ids.username_bg, 44.0/2.0) + .w_h(580.0 / 2.0, 60.0 / 2.0) + .mid_bottom_with_margin_on(self.ids.username_bg, 44.0 / 2.0) .font_size(20) + .font_id(self.font_whitney) + .text_color(Color::Rgba(220.0, 220.0, 220.0, 0.8)) // transparent background .color(TRANSPARENT) .border_color(TRANSPARENT) .set(self.ids.username_field, ui_widgets) - { - match event { - TextBoxEvent::Update(username) => { - // Note: TextBox limits the input string length to what fits in it - self.username = username.to_string(); - } - TextBoxEvent::Enter => login!(), + { + match event { + TextBoxEvent::Update(username) => { + // Note: TextBox limits the input string length to what fits in it + self.username = username.to_string(); } + TextBoxEvent::Enter => login!(), } + } // Server address - Image::new(self.imgs.address_text) - .w_h(227.0, 28.0) - .down_from(self.ids.username_bg, 10.0) - .align_left_of(self.ids.username_bg) - .set(self.ids.address_text, ui_widgets); Image::new(self.imgs.input_bg) - .w_h(672.0/2.0, 166.0/2.0) - .down(0.0) - .align_left() + .w_h(337.0, 67.0) + .down_from(self.ids.username_bg, 10.0) .set(self.ids.address_bg, ui_widgets); for event in TextBox::new(&self.server_address) - .w_h(580.0/2.0, 60.0/2.0) - .mid_bottom_with_margin_on(self.ids.address_bg, 44.0/2.0) + .w_h(580.0 / 2.0, 60.0 / 2.0) + .mid_bottom_with_margin_on(self.ids.address_bg, 44.0 / 2.0) .font_size(20) + .font_id(self.font_whitney) + .text_color(Color::Rgba(220.0, 220.0, 220.0, 0.8)) // transparent background .color(TRANSPARENT) .border_color(TRANSPARENT) .set(self.ids.address_field, ui_widgets) - { - match event { - TextBoxEvent::Update(server_address) => { - self.server_address = server_address.to_string(); - } - TextBoxEvent::Enter => login!(), + { + match event { + TextBoxEvent::Update(server_address) => { + self.server_address = server_address.to_string(); } + TextBoxEvent::Enter => login!(), } + } // Login button if Button::image(self.imgs.login_button) .hover_image(self.imgs.login_button_hover) @@ -225,54 +242,74 @@ impl MainMenuUi { .w_h(258.0, 68.0) .down_from(self.ids.address_bg, 20.0) .align_middle_x_of(self.ids.address_bg) + .label("Login") + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(28) + .label_y(conrod_core::position::Relative::Scalar(5.0)) .set(self.ids.login_button, ui_widgets) .was_clicked() - { - login!(); - } - Image::new(self.imgs.login_text) - .w_h(83.0, 34.0) - .graphics_for(self.ids.login_button) // capture the input for the button - .middle_of(self.ids.login_button) - .set(self.ids.login_text, ui_widgets); - - // Other buttons + { + login!(); + } + //Singleplayer button + if Button::image(self.imgs.login_button) + .hover_image(self.imgs.login_button_hover) + .press_image(self.imgs.login_button_press) + .w_h(258.0, 68.0) + .down_from(self.ids.login_button, 20.0) + .align_middle_x_of(self.ids.address_bg) + .label("Singleplayer") + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(26) + .label_y(conrod_core::position::Relative::Scalar(5.0)) + .label_x(conrod_core::position::Relative::Scalar(2.0)) + .set(self.ids.singleplayer_button, ui_widgets) + .was_clicked() + { + login!(); + } // Quit - Button::image(self.imgs.button) + if Button::image(self.imgs.button) .w_h(203.0, 53.0) .bottom_left_with_margins_on(ui_widgets.window, 60.0, 30.0) .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) - .set(self.ids.quit_button, ui_widgets); - Image::new(self.imgs.quit_text) - .w_h(52.0, 26.0) - .graphics_for(self.ids.quit_button) // capture the input for the button - .middle_of(self.ids.quit_button) - .set(self.ids.quit_text, ui_widgets); + .label("Quit") + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .label_y(conrod_core::position::Relative::Scalar(3.0)) + .set(self.ids.quit_button, ui_widgets) + .was_clicked() + { + use PlayStateResult::Shutdown; + PlayStateResult::Pop; + }; // Settings - Button::image(self.imgs.button) + if Button::image(self.imgs.button) .w_h(203.0, 53.0) .up_from(self.ids.quit_button, 8.0) .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) - .set(self.ids.settings_button, ui_widgets); - Image::new(self.imgs.settings_text) - .w_h(98.0, 28.0) - .graphics_for(self.ids.settings_button) - .middle_of(self.ids.settings_button) - .set(self.ids.settings_text, ui_widgets); + .label("Settings") + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .label_y(conrod_core::position::Relative::Scalar(3.0)) + .set(self.ids.settings_button, ui_widgets) + .was_clicked() + {}; // Servers - Button::image(self.imgs.button) + if Button::image(self.imgs.button) .w_h(203.0, 53.0) .up_from(self.ids.settings_button, 8.0) .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) - .set(self.ids.servers_button, ui_widgets); - Image::new(self.imgs.servers_text) - .w_h(93.0, 20.0) - .graphics_for(self.ids.servers_button) - .middle_of(self.ids.servers_button) - .set(self.ids.servers_text, ui_widgets); + .label("Servers") + .label_rgba(220.0, 220.0, 220.0, 0.8) + .label_font_size(20) + .label_y(conrod_core::position::Relative::Scalar(3.0)) + .set(self.ids.servers_button, ui_widgets) + .was_clicked() + {}; } pub fn handle_event(&mut self, input: Input) { diff --git a/voxygen/src/menu/mod.rs b/voxygen/src/menu/mod.rs index 1f7389c409..359d3a601f 100644 --- a/voxygen/src/menu/mod.rs +++ b/voxygen/src/menu/mod.rs @@ -1,3 +1,2 @@ -pub mod title; pub mod main; -pub mod test_hud; +pub mod title; diff --git a/voxygen/src/menu/test_hud.rs b/voxygen/src/menu/test_hud.rs deleted file mode 100644 index 9e2202efd3..0000000000 --- a/voxygen/src/menu/test_hud.rs +++ /dev/null @@ -1,273 +0,0 @@ -// TODO: figure out where exactly this code should be located - -// Library -use conrod_core::{ - Positionable, - Sizeable, - Widget, - Labelable, - widget_ids, - event::Input, - image::Id as ImgId, - text::font::Id as FontId, - widget::{ - Image, - Button, - Canvas, - } -}; - -// Crate -use crate::{ - window::Window, - render::Renderer, - ui::Ui, -}; - -widget_ids!{ - struct Ids { - bag, - bag_contents, - bag_close, - menu_top, - menu_mid, - menu_bot, - menu_canvas, - menu_buttons[], - bag_belt, - belt_buttons[], - mmap_frame, - sbar_bg - } -} - -// TODO: make macro to mimic widget_ids! for images ids or find another solution to simplify addition of new images. -struct Imgs { - //Missing: ActionBar, Health/Mana/Energy Bar & Char Window BG/Frame - // Bag - bag: ImgId, - bag_hover: ImgId, - bag_press: ImgId, - bag_open: ImgId, - bag_open_hover: ImgId, - bag_open_press: ImgId, - bag_contents: ImgId, - // Close button - close_button: ImgId, - close_button_hover: ImgId, - close_button_press: ImgId, - // Settings belt - belt_bg: ImgId, - belt_grid: ImgId, - belt_grid_hover: ImgId, - belt_grid_press: ImgId, - //belt_grid_open: ImgId, - // Menu - menu_top: ImgId, - menu_mid: ImgId, - menu_bot: ImgId, - menu_button: ImgId, - // MiniMap - mmap_frame: ImgId, - // SkillBar - sbar_bg: ImgId - } -impl Imgs { - fn new(ui: &mut Ui, renderer: &mut Renderer) -> Imgs { - let mut load = |filename| { - let image = image::open(&[env!("CARGO_MANIFEST_DIR"), "/test_assets/ui/hud/", filename].concat()).unwrap(); - ui.new_image(renderer, &image).unwrap() - }; - Imgs { - // Bag - bag: load("bag/icon/0_bag.png"), - bag_hover: load("bag/icon/1_bag_hover.png"), - bag_press: load("bag/icon/2_bag_press.png"), - bag_open: load("bag/icon/3_bag_open.png"), - bag_open_hover: load("bag/icon/4_bag_open_hover.png"), - bag_open_press: load("bag/icon/5_bag_open_press.png"), - bag_contents: load("bag/bg.png"), - // Close button - close_button: load("x/0_x.png"), - close_button_hover: load("x/1_x_hover.png"), - close_button_press: load("x/2_x_press.png"), - // Settings belt - belt_bg: load("belt/belt_bg.png"), - belt_grid: load("belt/belt_grid.png"), - belt_grid_hover: load("belt/belt_hover.png"), - belt_grid_press: load("belt/belt_press.png"), - //belt_grid_open: load("belt/belt_open.png"), - // Menu - menu_button: load("menu/main/menu_button.png"), - menu_top: load("menu/main/menu_top.png"), - menu_mid: load("menu/main/menu_mid.png"), - menu_bot: load("menu/main/menu_bottom.png"), - // MiniMap - mmap_frame: load("mmap/mmap_frame.png"), - // SkillBar - sbar_bg: load("skill_bar/sbar_bg.png"), - } - } -} - -pub struct TestHud { - ui: Ui, - ids: Ids, - imgs: Imgs, - bag_open: bool, - menu_open: bool, - font_id: FontId, -} - -impl TestHud { - pub fn new(window: &mut Window) -> Self { - let mut ui = Ui::new(window).unwrap(); - // Generate ids - let mut ids = Ids::new(ui.id_generator()); - ids.menu_buttons.resize(5, &mut ui.id_generator()); - ids.belt_buttons.resize(6, &mut ui.id_generator()); - // Load images - let imgs = Imgs::new(&mut ui, window.renderer_mut()); - // Load font - let font_id = ui.new_font(conrod_core::text::font::from_file( - concat!(env!("CARGO_MANIFEST_DIR"), "/test_assets/font/Metamorphous-Regular.ttf") - ).unwrap()); - Self { - ui, - imgs, - ids, - bag_open: false, - menu_open: false, - font_id, - } - } - - fn update_layout(&mut self) { - - let ref mut ui_widgets = self.ui.set_widgets(); - - // Check if the bag was clicked - // (can't use .was_clicked() because we are changing the image and this is after setting the widget which causes flickering as it takes a frame to change after the mouse button is lifted) - if ui_widgets.widget_input(self.ids.bag).clicks().left().count() % 2 == 1 { - self.bag_open = !self.bag_open; - } - // Bag contents - // Note that display_contents is set before checking if the bag was clicked - // this ensures that the contents and open bag img are displayed on the same frame - if self.bag_open { - // Contents - Image::new(self.imgs.bag_contents) - .w_h(1504.0/4.0, 1760.0/4.0) - .bottom_right_with_margins(88.0, 68.0) - .set(self.ids.bag_contents, ui_widgets); - - // X-button - if Button::image(self.imgs.close_button) - .w_h(144.0/4.0, 144.0/4.0) - .hover_image(self.imgs.close_button_hover) - .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.bag_contents, 0.0, 12.0) - .set(self.ids.bag_close, ui_widgets) - .was_clicked() { - self.bag_open = false; - } - - } - // Belt menu - Image::new(self.imgs.belt_bg) - .w_h(448.0/2.0, 56.0/2.0) - .bottom_left_with_margins_on(self.ids.bag, 5.0, -167.0) - .set(self.ids.bag_belt, ui_widgets); - // Belt buttons - for i in 0..6 { - Button::image(self.imgs.belt_grid) - .w_h(56.0/2.0, 56.0/2.0) - .bottom_left_with_margins_on(self.ids.bag_belt, 0.0, 28.0 * i as f64) - .hover_image(self.imgs.belt_grid_hover) - .press_image(self.imgs.belt_grid_press) - .set(self.ids.belt_buttons[i], ui_widgets); - } - - // Minimap frame - Image::new(self.imgs.mmap_frame) - .w_h(1232.0/8.0, 976.0/8.0) - .top_right_of(ui_widgets.window) - .set(self.ids.mmap_frame, ui_widgets); - - // Action bar - Image::new(self.imgs.sbar_bg) - .w_h(2240.0/8.0, 906.0/8.0) - .mid_bottom_of(ui_widgets.window) - .set(self.ids.sbar_bg, ui_widgets); - - // Bag - Button::image(if self.bag_open {self.imgs.bag_open} else {self.imgs.bag}) - .bottom_right_with_margin_on(ui_widgets.window, 20.0) - .hover_image(if self.bag_open {self.imgs.bag_open_hover} else {self.imgs.bag_hover}) - .press_image(if self.bag_open {self.imgs.bag_open_press} else {self.imgs.bag_press}) - .w_h(420.0/4.0, 480.0/4.0) - .set(self.ids.bag, ui_widgets); - - // An attempt to make a resizable image based container for buttons - // Maybe this could be made into a Widget type if it is useful - if self.menu_open { - let num = self.ids.menu_buttons.len(); - // Canvas to hold everything together - Canvas::new() - .w_h(106.0, 54.0 + num as f64 * 30.0) - .middle_of(ui_widgets.window) - .set(self.ids.menu_canvas, ui_widgets); - // Top of menu - Image::new(self.imgs.menu_top) - .w_h(106.0, 28.0) - .mid_top_of(self.ids.menu_canvas) - .set(self.ids.menu_top, ui_widgets); - // Bottom of Menu - // Note: conrod defaults to the last used parent - Image::new(self.imgs.menu_bot) - .w_h(106.0, 26.0) - .mid_bottom() - .set(self.ids.menu_bot, ui_widgets); - // Midsection background - Image::new(self.imgs.menu_mid) - .w_h(106.0, num as f64 * 30.0) - .mid_bottom_with_margin(26.0) - .set(self.ids.menu_mid, ui_widgets); - // Menu buttons - if num > 0 { - Button::image(self.imgs.menu_button) - .mid_top_with_margin_on(self.ids.menu_mid, 8.0) - .w_h(48.0, 20.0) - .label(&format!("Button {}", 1)) - .label_rgb(1.0, 0.4, 1.0) - .label_font_size(7) - .set(self.ids.menu_buttons[0], ui_widgets); - } - for i in 1..num { - Button::image(self.imgs.menu_button) - .down(10.0) - .label(&format!("Button {}", i + 1)) - .label_rgb(1.0, 0.4, 1.0) - .label_font_size(7) - .set(self.ids.menu_buttons[i], ui_widgets); - } - } - } - - pub fn toggle_menu(&mut self) { - self.menu_open = !self.menu_open; - } - - pub fn handle_event(&mut self, input: Input) { - self.ui.handle_event(input); - } - - pub fn maintain(&mut self, renderer: &mut Renderer) { - self.update_layout(); - self.ui.maintain(renderer); - } - - pub fn render(&self, renderer: &mut Renderer) { - self.ui.render(renderer); - } -} diff --git a/voxygen/src/menu/title/mod.rs b/voxygen/src/menu/title/mod.rs index 8c09c98298..9ecb1aea52 100644 --- a/voxygen/src/menu/title/mod.rs +++ b/voxygen/src/menu/title/mod.rs @@ -1,19 +1,14 @@ mod ui; -use std::time::Duration; -use vek::*; -use common::clock::Clock; -use crate::{ - PlayState, - PlayStateResult, - GlobalState, - window::{ - Event, - Window, - }, -}; use super::main::MainMenuState; +use crate::{ + window::{Event, Window}, + GlobalState, PlayState, PlayStateResult, +}; +use common::clock::Clock; +use std::time::Duration; use ui::TitleUi; +use vek::*; const FPS: u64 = 60; @@ -25,18 +20,21 @@ impl TitleState { /// Create a new `TitleState` pub fn new(window: &mut Window) -> Self { Self { - title_ui: TitleUi::new(window) + title_ui: TitleUi::new(window), } } - } // The background colour -const BG_COLOR: Rgba = Rgba { r: 0.0, g: 0.3, b: 1.0, a: 1.0 }; +const BG_COLOR: Rgba = Rgba { + r: 0.0, + g: 0.3, + b: 1.0, + a: 1.0, +}; impl PlayState for TitleState { fn play(&mut self, global_state: &mut GlobalState) -> PlayStateResult { - // Set up an fps clock let mut clock = Clock::new(); @@ -45,16 +43,18 @@ impl PlayState for TitleState { for event in global_state.window.fetch_events() { match event { Event::Close => return PlayStateResult::Shutdown, - // When space is pressed, go to the main menu - Event::Char(' ') => return PlayStateResult::Push( - Box::new(MainMenuState::new(&mut global_state.window)), - ), + // When any key is pressed, go to the main menu + Event::Char(_) => { + return PlayStateResult::Push(Box::new(MainMenuState::new( + &mut global_state.window, + ))); + } // Pass events to ui Event::UiEvent(input) => { self.title_ui.handle_event(input); } // Ignore all other events - _ => {}, + _ => {} } } @@ -68,15 +68,17 @@ impl PlayState for TitleState { // Finish the frame global_state.window.renderer_mut().flush(); - global_state.window + global_state + .window .swap_buffers() .expect("Failed to swap window buffers"); // Wait for the next tick clock.tick(Duration::from_millis(1000 / FPS)); - } } - fn name(&self) -> &'static str { "Title" } + fn name(&self) -> &'static str { + "Title" + } } diff --git a/voxygen/src/menu/title/ui.rs b/voxygen/src/menu/title/ui.rs index dc554b06f8..42af907f5a 100644 --- a/voxygen/src/menu/title/ui.rs +++ b/voxygen/src/menu/title/ui.rs @@ -1,17 +1,9 @@ +use crate::{render::Renderer, ui::Ui, window::Window}; use conrod_core::{ - Positionable, - Widget, event::Input, image::Id as ImgId, - widget::{ - Image as ImageWidget, - Id as WidgId, - } -}; -use crate::{ - window::Window, - render::Renderer, - ui::Ui + widget::{Id as WidgId, Image as ImageWidget}, + Positionable, Widget, }; pub struct TitleUi { @@ -24,7 +16,12 @@ impl TitleUi { pub fn new(window: &mut Window) -> Self { let mut ui = Ui::new(window).unwrap(); let widget_id = ui.id_generator().next(); - let image = image::open(concat!(env!("CARGO_MANIFEST_DIR"), "/test_assets/ui/title/test.png")).unwrap(); + // TODO: use separate image for logo + let image = image::open(concat!( + env!("CARGO_MANIFEST_DIR"), + "/test_assets/ui/title/splash.png" + )) + .unwrap(); let title_img_id = ui.new_image(window.renderer_mut(), &image).unwrap(); Self { ui, diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index ccbb5e86f6..1ba89309e7 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -21,7 +21,7 @@ use crate::{ window::{Event, Key, Window}, render::Renderer, scene::Scene, - menu::test_hud::TestHud, + hud::Hud, }; const FPS: u64 = 60; @@ -30,8 +30,7 @@ pub struct SessionState { scene: Scene, client: Client, key_state: KeyState, - // TODO: remove this - test_hud: TestHud, + hud: Hud, } /// Represents an active game session (i.e: one that is being played) @@ -44,7 +43,7 @@ impl SessionState { scene: Scene::new(window.renderer_mut(), &client), client, key_state: KeyState::new(), - test_hud: TestHud::new(window), + hud: Hud::new(window), }) } } @@ -83,7 +82,7 @@ impl SessionState { // Render the screen using the global renderer self.scene.render_to(renderer); // Draw the UI to the screen - self.test_hud.render(renderer); + self.hud.render(renderer); // Finish the frame renderer.flush(); @@ -111,12 +110,16 @@ impl PlayState for SessionState { loop { // Handle window events for event in global_state.window.fetch_events() { + let _handled = match event { + Event::Close => return PlayStateResult::Shutdown, // When 'q' is pressed, exit the session Event::Char('q') => return PlayStateResult::Pop, // When 'm' is pressed, open/close the in-game test menu - Event::Char('m') => self.test_hud.toggle_menu(), + Event::Char('m') => self.hud.toggle_menu(), + // Close windows on esc + Event::KeyDown(Key::Escape) => self.hud.toggle_windows(), // Toggle cursor grabbing Event::KeyDown(Key::ToggleCursor) => { global_state.window.grab_cursor(!global_state.window.is_cursor_grabbed()); @@ -133,7 +136,7 @@ impl PlayState for SessionState { Event::KeyUp(Key::MoveRight) => self.key_state.right = false, // Pass events to ui Event::UiEvent(input) => { - self.test_hud.handle_event(input); + self.hud.handle_event(input); } // Pass all other events to the scene event => { self.scene.handle_input_event(event); }, @@ -148,7 +151,7 @@ impl PlayState for SessionState { // Maintain the scene self.scene.maintain(global_state.window.renderer_mut(), &self.client); // Maintain the UI - self.test_hud.maintain(global_state.window.renderer_mut()); + self.hud.maintain(global_state.window.renderer_mut()); // Render the session self.render(global_state.window.renderer_mut()); diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index 550101d6cf..f71b9ae5fc 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -28,13 +28,13 @@ impl Window { let events_loop = glutin::EventsLoop::new(); let win_builder = glutin::WindowBuilder::new() - .with_title("Veloren (Voxygen)") - .with_dimensions(glutin::dpi::LogicalSize::new(800.0, 500.0)) - .with_maximized(false); + .with_title("Veloren") + .with_dimensions(glutin::dpi::LogicalSize::new(1366.0, 768.0)) + .with_maximized(true); let ctx_builder = glutin::ContextBuilder::new() .with_gl(glutin::GlRequest::Specific(glutin::Api::OpenGl, (3, 2))) - .with_vsync(true); + .with_vsync(false); let ( window, @@ -49,7 +49,8 @@ impl Window { ).map_err(|err| Error::BackendError(Box::new(err)))?; let mut key_map = HashMap::new(); - key_map.insert(glutin::VirtualKeyCode::Escape, Key::ToggleCursor); + key_map.insert(glutin::VirtualKeyCode::Tab, Key::ToggleCursor); + key_map.insert(glutin::VirtualKeyCode::Escape, Key::Escape); key_map.insert(glutin::VirtualKeyCode::W, Key::MoveForward); key_map.insert(glutin::VirtualKeyCode::A, Key::MoveLeft); key_map.insert(glutin::VirtualKeyCode::S, Key::MoveBack); @@ -84,12 +85,12 @@ impl Window { let mut events = vec![]; self.events_loop.poll_events(|event| match { // Hack grab of events for testing ui - if let Some(event) = conrod_winit::convert_event(event.clone(), window.window()) { + if let Some(event) = conrod_winit::convert_event(event.clone(), window.window()) { events.push(Event::UiEvent(event)); - } + } event } { - glutin::Event::WindowEvent { event, .. } => match event { + glutin::Event::WindowEvent { event, .. } => match event { glutin::WindowEvent::CloseRequested => events.push(Event::Close), glutin::WindowEvent::Resized(glutin::dpi::LogicalSize { width, height }) => { let (mut color_view, mut depth_view) = renderer.target_views_mut(); @@ -101,6 +102,7 @@ impl Window { events.push(Event::Resize(Vec2::new(width as u32, height as u32))); }, glutin::WindowEvent::ReceivedCharacter(c) => events.push(Event::Char(c)), + glutin::WindowEvent::KeyboardInput { input, .. } => match input.virtual_keycode { Some(keycode) => match key_map.get(&keycode) { Some(&key) => events.push(match input.state { @@ -157,6 +159,7 @@ pub enum Key { MoveBack, MoveLeft, MoveRight, + Escape, } /// Represents an incoming event from the window diff --git a/voxygen/test_assets/font/Whitney-Book.ttf b/voxygen/test_assets/font/Whitney-Book.ttf new file mode 100644 index 0000000000..a003999ecc Binary files /dev/null and b/voxygen/test_assets/font/Whitney-Book.ttf differ diff --git a/voxygen/test_assets/ui/hud/menu/main/.gitattributes b/voxygen/test_assets/ui/hud/.gitattributes similarity index 100% rename from voxygen/test_assets/ui/hud/menu/main/.gitattributes rename to voxygen/test_assets/ui/hud/.gitattributes diff --git a/voxygen/test_assets/ui/hud/charwindow/.gitattributes b/voxygen/test_assets/ui/hud/charwindow/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/charwindow/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/charwindow/bg.png b/voxygen/test_assets/ui/hud/charwindow/bg.png new file mode 100644 index 0000000000..9ead0631a9 --- /dev/null +++ b/voxygen/test_assets/ui/hud/charwindow/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:db97de1c965ab5fcac1c5ebd2230070e7b2fb7996bafa4c9660f5d3cd85ab595 +size 226667 diff --git a/voxygen/test_assets/ui/hud/charwindow/icon.png b/voxygen/test_assets/ui/hud/charwindow/icon.png new file mode 100644 index 0000000000..efaf7f83cf --- /dev/null +++ b/voxygen/test_assets/ui/hud/charwindow/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2b7bd9a2d3a383addd7463450acd26b965e0bb256c14221f0c0652d75f013d0 +size 17565 diff --git a/voxygen/test_assets/ui/hud/map/.gitattributes b/voxygen/test_assets/ui/hud/map/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/map/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/map/bg.png b/voxygen/test_assets/ui/hud/map/bg.png new file mode 100644 index 0000000000..8be101135c --- /dev/null +++ b/voxygen/test_assets/ui/hud/map/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d357a71de1a8bab2c316293324f3f829bea300e785bcb6a70c63af2627446f8e +size 17455 diff --git a/voxygen/test_assets/ui/hud/map/icon.png b/voxygen/test_assets/ui/hud/map/icon.png new file mode 100644 index 0000000000..c417fd61e4 --- /dev/null +++ b/voxygen/test_assets/ui/hud/map/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4450d03fbd53f56968d3c9fd04d6f1c7e8428be77d8579caea11a29795fddb20 +size 14696 diff --git a/voxygen/test_assets/ui/hud/map/window_frame_map.png b/voxygen/test_assets/ui/hud/map/window_frame_map.png new file mode 100644 index 0000000000..b076f4a22f --- /dev/null +++ b/voxygen/test_assets/ui/hud/map/window_frame_map.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1f95efbb3159303ae832e63c4ad9d688112246dff74d5f6de6be81d281dfdce7 +size 19693 diff --git a/voxygen/test_assets/ui/hud/menu/.gitattributes b/voxygen/test_assets/ui/hud/menu/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/menu/Button_dark_press.png b/voxygen/test_assets/ui/hud/menu/Button_dark_press.png new file mode 100644 index 0000000000..4b6dcb1454 --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/Button_dark_press.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5f9a4ff1794ceed7998a43ae7ec4adbba7153173ffee42de3ac576a6ad074bbd +size 2801 diff --git a/voxygen/test_assets/ui/hud/menu/bg.png b/voxygen/test_assets/ui/hud/menu/bg.png new file mode 100644 index 0000000000..1e84e7e71e --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4dfd2d81b46c35cecc30f247ca3f1256a132c57fba11908d27a77f27a0c34710 +size 3283 diff --git a/voxygen/test_assets/ui/hud/menu/button_dark.png b/voxygen/test_assets/ui/hud/menu/button_dark.png new file mode 100644 index 0000000000..bc21ef648a --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/button_dark.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1efe47a2d92e36410d0347e9925176a4c0350b6136251ff9033a09bceb2ccf5d +size 2510 diff --git a/voxygen/test_assets/ui/hud/menu/button_dark_hover.png b/voxygen/test_assets/ui/hud/menu/button_dark_hover.png new file mode 100644 index 0000000000..e2a91e5e1a --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/button_dark_hover.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0d40def4fefc5829ece1cbbeda3016883bd47003d163b1780e470e3a2485b968 +size 4487 diff --git a/voxygen/test_assets/ui/hud/menu/fireplace_1.png b/voxygen/test_assets/ui/hud/menu/fireplace_1.png new file mode 100644 index 0000000000..2ec92e6dbf --- /dev/null +++ b/voxygen/test_assets/ui/hud/menu/fireplace_1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cc5dbe2df746729a74c4fd087552906e900cc8a88391a7a45ed8a405813bbe85 +size 19781 diff --git a/voxygen/test_assets/ui/hud/menu/main/menu_bottom.png b/voxygen/test_assets/ui/hud/menu/main/menu_bottom.png deleted file mode 100644 index 1958401269..0000000000 --- a/voxygen/test_assets/ui/hud/menu/main/menu_bottom.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:90624736e7834a7c9a3b9eeed1496cd7160d5f2b4e955fc7c1217e2dbec0abdf -size 1532 diff --git a/voxygen/test_assets/ui/hud/menu/main/menu_button.png b/voxygen/test_assets/ui/hud/menu/main/menu_button.png deleted file mode 100644 index 74d794cf7f..0000000000 --- a/voxygen/test_assets/ui/hud/menu/main/menu_button.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aeabfd4409f4256e58beaf472852b553b980f187d3c638b5448260d1c0b6ef15 -size 1260 diff --git a/voxygen/test_assets/ui/hud/menu/main/menu_mid.png b/voxygen/test_assets/ui/hud/menu/main/menu_mid.png deleted file mode 100644 index 4a4fa69534..0000000000 --- a/voxygen/test_assets/ui/hud/menu/main/menu_mid.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f26d3b9905955346f0249b485207b9b7b872205d8ef32b22fa6f2e62684499cc -size 1197 diff --git a/voxygen/test_assets/ui/hud/menu/main/menu_top.png b/voxygen/test_assets/ui/hud/menu/main/menu_top.png deleted file mode 100644 index b080f97920..0000000000 --- a/voxygen/test_assets/ui/hud/menu/main/menu_top.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b5e58b133b25be4f317c43e9db0416b06b7f5f45d20af02993eb10dfbc5abb16 -size 3806 diff --git a/voxygen/test_assets/ui/hud/mmap/grid.png b/voxygen/test_assets/ui/hud/mmap/grid.png new file mode 100644 index 0000000000..b73f4d68f5 --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/grid.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7245fce9bf3611341a321210574115ebe7da9bbda5322116330d8f9d965a01b +size 1947 diff --git a/voxygen/test_assets/ui/hud/mmap/hover.png b/voxygen/test_assets/ui/hud/mmap/hover.png new file mode 100644 index 0000000000..c1d2873a7e --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/hover.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e287e02aef5d7cef52cf6ba85bebeae96b069264c6506ffc69c709594085e40 +size 1941 diff --git a/voxygen/test_assets/ui/hud/mmap/mmap_bg.png b/voxygen/test_assets/ui/hud/mmap/mmap_bg.png new file mode 100644 index 0000000000..43b0c53326 --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/mmap_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0968a7d1f814fda8488bb6749265ec7cebcb84fb6eedf35e0cf27b34e5c07dee +size 22880 diff --git a/voxygen/test_assets/ui/hud/mmap/mmap_frame.png b/voxygen/test_assets/ui/hud/mmap/mmap_frame.png index b4371f13b6..3286b739f8 100644 --- a/voxygen/test_assets/ui/hud/mmap/mmap_frame.png +++ b/voxygen/test_assets/ui/hud/mmap/mmap_frame.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3832785ff378d7d811698737948ccf3aa2eb45c8bf9706db0c46e40e20074464 -size 10793 +oid sha256:9cd00503350dca9695df14035ce6ea81406114603de39edba61006d2f4300467 +size 14814 diff --git a/voxygen/test_assets/ui/hud/mmap/mmap_icons.png b/voxygen/test_assets/ui/hud/mmap/mmap_icons.png new file mode 100644 index 0000000000..24a37274f1 --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/mmap_icons.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:beaf7d5aac0d3d2b31a403bd734583903973402d460f33927128a3cbc91dbfd5 +size 64112 diff --git a/voxygen/test_assets/ui/hud/mmap/open.png b/voxygen/test_assets/ui/hud/mmap/open.png new file mode 100644 index 0000000000..fa6dbdfab4 --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/open.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b3c8d09b3b41c075294b3976f283f715745b25f0dea74363f5c5debcf9188e0b +size 1935 diff --git a/voxygen/test_assets/ui/hud/mmap/press.png b/voxygen/test_assets/ui/hud/mmap/press.png new file mode 100644 index 0000000000..5a4692bb1d --- /dev/null +++ b/voxygen/test_assets/ui/hud/mmap/press.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eba2a5e35ba1187e7bdf50001673e526d577d965948def6d42e7a86be150daf5 +size 1677 diff --git a/voxygen/test_assets/ui/hud/questlog/.gitattributes b/voxygen/test_assets/ui/hud/questlog/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/questlog/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/questlog/bg.png b/voxygen/test_assets/ui/hud/questlog/bg.png new file mode 100644 index 0000000000..8be101135c --- /dev/null +++ b/voxygen/test_assets/ui/hud/questlog/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d357a71de1a8bab2c316293324f3f829bea300e785bcb6a70c63af2627446f8e +size 17455 diff --git a/voxygen/test_assets/ui/hud/questlog/icon.png b/voxygen/test_assets/ui/hud/questlog/icon.png new file mode 100644 index 0000000000..4f9dc04824 --- /dev/null +++ b/voxygen/test_assets/ui/hud/questlog/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d11ccdd6a77b5858f1260c5001f1d0ca908ad888d2ef29f7b777a637e6eb2a79 +size 2282 diff --git a/voxygen/test_assets/ui/hud/settings/.gitattributes b/voxygen/test_assets/ui/hud/settings/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/settings/bg.png b/voxygen/test_assets/ui/hud/settings/bg.png new file mode 100644 index 0000000000..f684bb4162 --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5da0c7e192cd126ef1f1d8a868cee31395000ef9a242cebe924e4fb91cd23af0 +size 19829 diff --git a/voxygen/test_assets/ui/hud/settings/button_blank.png b/voxygen/test_assets/ui/hud/settings/button_blank.png new file mode 100644 index 0000000000..945be0f72f Binary files /dev/null and b/voxygen/test_assets/ui/hud/settings/button_blank.png differ diff --git a/voxygen/test_assets/ui/hud/settings/check.png b/voxygen/test_assets/ui/hud/settings/check.png new file mode 100644 index 0000000000..9e77ded17f --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/check.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca55483f01836b9c2c88bedcfd27b36b33e690c53c2af1f0b522ff22106957ef +size 7721 diff --git a/voxygen/test_assets/ui/hud/settings/check_checked.png b/voxygen/test_assets/ui/hud/settings/check_checked.png new file mode 100644 index 0000000000..30f73a66db --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/check_checked.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d860ec940dbaf90860f92de09f602aa5efdfd1794ee95f6612cd80c614198088 +size 9260 diff --git a/voxygen/test_assets/ui/hud/settings/check_checked_mo.png b/voxygen/test_assets/ui/hud/settings/check_checked_mo.png new file mode 100644 index 0000000000..16c3117d7f --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/check_checked_mo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:29a7e48d20c9223c5aabd9db943f2c44549d6ac8fd2898389f9cab60a913dbe2 +size 9405 diff --git a/voxygen/test_assets/ui/hud/settings/check_mo.png b/voxygen/test_assets/ui/hud/settings/check_mo.png new file mode 100644 index 0000000000..389d55ba3e --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/check_mo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69a5fe909642e0b48bfba80881834064d40714dff188f4b3c63cee947fde8955 +size 7904 diff --git a/voxygen/test_assets/ui/hud/settings/check_press.png b/voxygen/test_assets/ui/hud/settings/check_press.png new file mode 100644 index 0000000000..0c3cdb3b3a --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/check_press.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c3fd745cb7d69b8c4dbb9cb33c848174006267b2eba504be9af8288c64e8607 +size 8674 diff --git a/voxygen/test_assets/ui/hud/settings/icon.png b/voxygen/test_assets/ui/hud/settings/icon.png new file mode 100644 index 0000000000..028704a0da --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b34e23056a85d37c6afc59a2bc9c7f0a085bf6c4b49bbc0a775048c24f64ff92 +size 17985 diff --git a/voxygen/test_assets/ui/hud/settings/mo.png b/voxygen/test_assets/ui/hud/settings/mo.png new file mode 100644 index 0000000000..1c2144ec5c --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/mo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd05445824bb1dbbcf83d0d01a86f81df0796ebb38be7c319f271fc6701d02cf +size 4108 diff --git a/voxygen/test_assets/ui/hud/settings/press.png b/voxygen/test_assets/ui/hud/settings/press.png new file mode 100644 index 0000000000..00e38e05d2 --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/press.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c56debb954a487147c9858e1686dfb16707b8438da77de74e66bc57226bd27fa +size 4400 diff --git a/voxygen/test_assets/ui/hud/settings/slider.png b/voxygen/test_assets/ui/hud/settings/slider.png new file mode 100644 index 0000000000..c7189c07fa --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/slider.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5098dc337a89e1f1496dade09b498aefceb64a6d2cd2c9bb1b26d4d2bac74972 +size 2059 diff --git a/voxygen/test_assets/ui/hud/settings/slider_indicator.png b/voxygen/test_assets/ui/hud/settings/slider_indicator.png new file mode 100644 index 0000000000..b473a440aa --- /dev/null +++ b/voxygen/test_assets/ui/hud/settings/slider_indicator.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5b2dd7fa1cba4e4972d5ae47f230310430389d06a4a676339a10a8cf6a7642b1 +size 2191 diff --git a/voxygen/test_assets/ui/hud/skill_bar/buff_frame.png b/voxygen/test_assets/ui/hud/skill_bar/buff_frame.png new file mode 100644 index 0000000000..8e909072cc Binary files /dev/null and b/voxygen/test_assets/ui/hud/skill_bar/buff_frame.png differ diff --git a/voxygen/test_assets/ui/hud/skill_bar/buff_frame_bg.png b/voxygen/test_assets/ui/hud/skill_bar/buff_frame_bg.png new file mode 100644 index 0000000000..292207098a Binary files /dev/null and b/voxygen/test_assets/ui/hud/skill_bar/buff_frame_bg.png differ diff --git a/voxygen/test_assets/ui/hud/skill_bar/buff_frame_red.png b/voxygen/test_assets/ui/hud/skill_bar/buff_frame_red.png new file mode 100644 index 0000000000..1803ca170b Binary files /dev/null and b/voxygen/test_assets/ui/hud/skill_bar/buff_frame_red.png differ diff --git a/voxygen/test_assets/ui/hud/skill_bar/buff_green.png b/voxygen/test_assets/ui/hud/skill_bar/buff_green.png new file mode 100644 index 0000000000..c9fb59cebb Binary files /dev/null and b/voxygen/test_assets/ui/hud/skill_bar/buff_green.png differ diff --git a/voxygen/test_assets/ui/hud/skill_bar/health_bar.png b/voxygen/test_assets/ui/hud/skill_bar/health_bar.png new file mode 100644 index 0000000000..76ef36d3e8 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/health_bar.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaa6464cc6b1a9e3a40fd19e58fb7daaa0da7c2efde615884c74a915e523377d +size 1487 diff --git a/voxygen/test_assets/ui/hud/skill_bar/health_bar_filled.png b/voxygen/test_assets/ui/hud/skill_bar/health_bar_filled.png new file mode 100644 index 0000000000..ba94caa62e --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/health_bar_filled.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:18dfc1ca76e137aab8412ba75e20472e460cd36ce0062d769d4f6ce72e41a17f +size 1493 diff --git a/voxygen/test_assets/ui/hud/skill_bar/l.png b/voxygen/test_assets/ui/hud/skill_bar/l.png new file mode 100644 index 0000000000..91330e80f8 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/l.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6269a339395399727b8e8d89492b041876077655c4c678bfa18ac560734de5c4 +size 2469 diff --git a/voxygen/test_assets/ui/hud/skill_bar/mana_bar.png b/voxygen/test_assets/ui/hud/skill_bar/mana_bar.png new file mode 100644 index 0000000000..6305242f97 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/mana_bar.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:263e6381a5cb9a980fc1240f83ff1d557285b76557d9ca157f833149af9a551c +size 1508 diff --git a/voxygen/test_assets/ui/hud/skill_bar/mana_bar_full.png b/voxygen/test_assets/ui/hud/skill_bar/mana_bar_full.png new file mode 100644 index 0000000000..944504b4c1 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/mana_bar_full.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ea2064d26ef08321cd4a1a18b3936534dc0dfe5b186778dca4985ec57fe6d067 +size 1512 diff --git a/voxygen/test_assets/ui/hud/skill_bar/r.png b/voxygen/test_assets/ui/hud/skill_bar/r.png new file mode 100644 index 0000000000..d18e2e6d95 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/r.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8771539aa9fc51c1383ccc86dc6e97e4f86e34861ae8b6e881fb6e30cf08261c +size 2535 diff --git a/voxygen/test_assets/ui/hud/skill_bar/sbar_bg.png b/voxygen/test_assets/ui/hud/skill_bar/sbar_bg.png deleted file mode 100644 index a31f3f6480..0000000000 --- a/voxygen/test_assets/ui/hud/skill_bar/sbar_bg.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9500e728cc2da6f039cdd14535414c8cf1a50a796ac91c861cade8689bc3b57b -size 11295 diff --git a/voxygen/test_assets/ui/hud/skill_bar/sbar_grid.png b/voxygen/test_assets/ui/hud/skill_bar/sbar_grid.png new file mode 100644 index 0000000000..573d57d7d9 --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/sbar_grid.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:63e54e7098fe9823f8e153dc99f81d87bd207d8a52c7635509e82bc06632f8c7 +size 5748 diff --git a/voxygen/test_assets/ui/hud/skill_bar/sbar_grid_bg.png b/voxygen/test_assets/ui/hud/skill_bar/sbar_grid_bg.png new file mode 100644 index 0000000000..26294abfeb --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/sbar_grid_bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad87c51915c5c206f621f4bae7eb279aa365e8fa2f3b358c716223c9ee7525aa +size 5953 diff --git a/voxygen/test_assets/ui/hud/skill_bar/xp_bar.png b/voxygen/test_assets/ui/hud/skill_bar/xp_bar.png new file mode 100644 index 0000000000..8180a533ab --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/xp_bar.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37e38dfaa31beb66b4bbc0e9f2cadede08da6702c1187dbbddd673971674fb24 +size 4505 diff --git a/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l.png b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l.png new file mode 100644 index 0000000000..a8de98bbfd --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1cfe6e5b0bf26772c47399e4c6e246a86ab485d6e146a67a241ead9b885f63e1 +size 2356 diff --git a/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l_filled.png b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l_filled.png new file mode 100644 index 0000000000..1c5982ef3b --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_l_filled.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:41ab8efd9e177b17a42f699ee40a604a3ab5e35fb40f6185eaddceddb7e1abbd +size 2049 diff --git a/voxygen/test_assets/ui/hud/skill_bar/xp_bar_r.png b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_r.png new file mode 100644 index 0000000000..db69f3decc --- /dev/null +++ b/voxygen/test_assets/ui/hud/skill_bar/xp_bar_r.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7737eba27ee3eedf7796d43f4c9010b2e207f59b2deb0917d7358334fe57d075 +size 2285 diff --git a/voxygen/test_assets/ui/hud/social/.gitattributes b/voxygen/test_assets/ui/hud/social/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/social/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/social/bg.png b/voxygen/test_assets/ui/hud/social/bg.png new file mode 100644 index 0000000000..8be101135c --- /dev/null +++ b/voxygen/test_assets/ui/hud/social/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d357a71de1a8bab2c316293324f3f829bea300e785bcb6a70c63af2627446f8e +size 17455 diff --git a/voxygen/test_assets/ui/hud/social/icon.png b/voxygen/test_assets/ui/hud/social/icon.png new file mode 100644 index 0000000000..a3d81fa011 --- /dev/null +++ b/voxygen/test_assets/ui/hud/social/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b87a847ab11568e346326a3c57b29e5b7b9652c7f5e04f95a657c534a577330e +size 10648 diff --git a/voxygen/test_assets/ui/hud/spellbook/.gitattributes b/voxygen/test_assets/ui/hud/spellbook/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/hud/spellbook/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/hud/spellbook/bg.png b/voxygen/test_assets/ui/hud/spellbook/bg.png new file mode 100644 index 0000000000..8be101135c --- /dev/null +++ b/voxygen/test_assets/ui/hud/spellbook/bg.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d357a71de1a8bab2c316293324f3f829bea300e785bcb6a70c63af2627446f8e +size 17455 diff --git a/voxygen/test_assets/ui/hud/spellbook/icon.png b/voxygen/test_assets/ui/hud/spellbook/icon.png new file mode 100644 index 0000000000..73f7d09b82 --- /dev/null +++ b/voxygen/test_assets/ui/hud/spellbook/icon.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:966ef8c9b7bfc4e7c4363f3edce304a8dff763f07acc404733b95861293478ff +size 9161 diff --git a/voxygen/test_assets/ui/hud/window_frame.png b/voxygen/test_assets/ui/hud/window_frame.png new file mode 100644 index 0000000000..3bd6b4fa1d --- /dev/null +++ b/voxygen/test_assets/ui/hud/window_frame.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6de998c58d28a6659a31732d4a853d829d96111520d258b540a812b521d9312 +size 20431 diff --git a/voxygen/test_assets/ui/hud/window_frame_map.png b/voxygen/test_assets/ui/hud/window_frame_map.png new file mode 100644 index 0000000000..cb3ccd6a57 --- /dev/null +++ b/voxygen/test_assets/ui/hud/window_frame_map.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3a3fcad0daae462b61debc2df9dafe0549d7e5bdcc9bb97b84a79b9f7d94a5b1 +size 19594 diff --git a/voxygen/test_assets/ui/hud/window_frame_old.png b/voxygen/test_assets/ui/hud/window_frame_old.png new file mode 100644 index 0000000000..02bf90b2ff --- /dev/null +++ b/voxygen/test_assets/ui/hud/window_frame_old.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4ac89d87409afb1f805b232b87409b7c2d80f459a822e59a4b51e8b128826cfd +size 20803 diff --git a/voxygen/test_assets/ui/hud/x/0_x.png b/voxygen/test_assets/ui/hud/x/0_x.png index bd93effd4e..455aced925 100644 --- a/voxygen/test_assets/ui/hud/x/0_x.png +++ b/voxygen/test_assets/ui/hud/x/0_x.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:209e2a99fcc72f4368bdc95078e7ffc768a49c26f8424dada9629e18d03413e6 -size 1541 +oid sha256:88092f03ce8dccb1eadd75072de4df98b2affa0b8e333bdba739606d000dd161 +size 14877 diff --git a/voxygen/test_assets/ui/hud/x/1_x_hover.png b/voxygen/test_assets/ui/hud/x/1_x_hover.png index 9374317427..9f1457cb8d 100644 --- a/voxygen/test_assets/ui/hud/x/1_x_hover.png +++ b/voxygen/test_assets/ui/hud/x/1_x_hover.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a936f248c0a4f7100a01f92c348ab5abcaf50175512e0b8e4ac1f36df35f5d8 -size 1541 +oid sha256:6ab2c11fb5cdf9dd8fd4dd6e91580ac7e66d8e6164bca5d4946eaabfde7d67d5 +size 18506 diff --git a/voxygen/test_assets/ui/hud/x/2_x_press.png b/voxygen/test_assets/ui/hud/x/2_x_press.png index 0bb6c4ca0c..741f333c90 100644 --- a/voxygen/test_assets/ui/hud/x/2_x_press.png +++ b/voxygen/test_assets/ui/hud/x/2_x_press.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:57935e2a746df79ea202a74561cdcf4013ba72de3bd6c97025db0272e85e629e -size 2887 +oid sha256:3488cc85d18f9c2cbfe708e18716847c759f0a72116ca9d12a1decb6f7028122 +size 10901 diff --git a/voxygen/test_assets/ui/main/buttons/button_hover.png b/voxygen/test_assets/ui/main/buttons/button_hover.png index a6e516dd15..b9db9aace7 100644 --- a/voxygen/test_assets/ui/main/buttons/button_hover.png +++ b/voxygen/test_assets/ui/main/buttons/button_hover.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f945a853b2609c41ee6d0c5678e1fda68fafc2b92e4601f5dc6b178e47ace6a -size 4024 +oid sha256:82ef8cf28ddf0f282d4d02c1a4b0ded2dfaa54a9fb86c7ab3e19a5b046ed59ae +size 3527 diff --git a/voxygen/test_assets/ui/main/buttons/button_login_hover.png b/voxygen/test_assets/ui/main/buttons/button_login_hover.png index 633f70509e..c9de5fcf1e 100644 --- a/voxygen/test_assets/ui/main/buttons/button_login_hover.png +++ b/voxygen/test_assets/ui/main/buttons/button_login_hover.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19edef0c2a08f954e16245439ca94e207c29893a924b9809720bb28cec8cc63a -size 4744 +oid sha256:34921467d9fd9020faac1dedfe7edc2db8a9bb402962b5a2812b76f46d194975 +size 4794 diff --git a/voxygen/test_assets/ui/main/text/White/.gitattributes b/voxygen/test_assets/ui/main/text/White/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/main/text/White/login.png b/voxygen/test_assets/ui/main/text/White/login.png new file mode 100644 index 0000000000..e55f36f3d8 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/login.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e61d22bc7438a567ad0a8fd45a29eabd755ad2d7872ff61712211a725645193e +size 2077 diff --git a/voxygen/test_assets/ui/main/text/White/quit.png b/voxygen/test_assets/ui/main/text/White/quit.png new file mode 100644 index 0000000000..44d7b6180f --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/quit.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1295ab1f34b160e0b8d71b5b8fa03ca4ec3359335dfaea7a24174f96cfbefe20 +size 1550 diff --git a/voxygen/test_assets/ui/main/text/White/server_address.png b/voxygen/test_assets/ui/main/text/White/server_address.png new file mode 100644 index 0000000000..b9324b78fe --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/server_address.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a0a9b9d0a287d5b67c175bc28ee7af427d5c9f01d421c1fafc04440b442f1232 +size 5669 diff --git a/voxygen/test_assets/ui/main/text/White/servers.png b/voxygen/test_assets/ui/main/text/White/servers.png new file mode 100644 index 0000000000..8c8e64b38c --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/servers.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d8e9830be2e54339b547b84b17103b8b3b3f2c59f1b4bd8c9f4a0176c9eac9b1 +size 2317 diff --git a/voxygen/test_assets/ui/main/text/White/settings.png b/voxygen/test_assets/ui/main/text/White/settings.png new file mode 100644 index 0000000000..d39d8910af --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/settings.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e12d7360bf4dc584272f531b53dd96e59c17b0a5acba9d8b6b7d7d30a6e5148 +size 2748 diff --git a/voxygen/test_assets/ui/main/text/White/username.png b/voxygen/test_assets/ui/main/text/White/username.png new file mode 100644 index 0000000000..4748fc697e --- /dev/null +++ b/voxygen/test_assets/ui/main/text/White/username.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c641b645857e746ee511d6f633c05f78a3c89eb0484d8ffa905fbed8764921cb +size 4101 diff --git a/voxygen/test_assets/ui/main/text/Yellow/.gitattributes b/voxygen/test_assets/ui/main/text/Yellow/.gitattributes new file mode 100644 index 0000000000..c091529f36 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/.gitattributes @@ -0,0 +1 @@ +*.png filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/voxygen/test_assets/ui/main/text/Yellow/a01.png b/voxygen/test_assets/ui/main/text/Yellow/a01.png new file mode 100644 index 0000000000..21ab7e873b --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/a01.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8088394d2e5acab7914e2ee692a2df674614ecbb0eec229548da4a94a181e15 +size 1075 diff --git a/voxygen/test_assets/ui/main/text/Yellow/login.png b/voxygen/test_assets/ui/main/text/Yellow/login.png new file mode 100644 index 0000000000..b1249cf8ae --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/login.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:006818467f94c2b380099866111ff25da53ea555ea26f0b0ef5ec4e59db7a3a9 +size 2088 diff --git a/voxygen/test_assets/ui/main/text/Yellow/quit.png b/voxygen/test_assets/ui/main/text/Yellow/quit.png new file mode 100644 index 0000000000..46b5588028 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/quit.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0678e620f0c7ef00671995bbfb95b03349d46a66fe38f5c5d1b8ac42e6daed9a +size 1540 diff --git a/voxygen/test_assets/ui/main/text/Yellow/server_address.png b/voxygen/test_assets/ui/main/text/Yellow/server_address.png new file mode 100644 index 0000000000..34c3ce7f35 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/server_address.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fba8a3329e257ea3a763d20f3e279dd7abab62e55c2ccd2df947228916b8533a +size 4828 diff --git a/voxygen/test_assets/ui/main/text/Yellow/servers.png b/voxygen/test_assets/ui/main/text/Yellow/servers.png new file mode 100644 index 0000000000..faea8721e8 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/servers.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a36a22e175811f428a08eae13dbbb386bd640761074ede7ae853852dfa127f0 +size 2286 diff --git a/voxygen/test_assets/ui/main/text/Yellow/settings.png b/voxygen/test_assets/ui/main/text/Yellow/settings.png new file mode 100644 index 0000000000..7f6477a4a0 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/settings.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:032d9bc74f540a736f8ab325d8e7cd261f1df7b4bd469baeb7d87238ec356c3c +size 2646 diff --git a/voxygen/test_assets/ui/main/text/Yellow/username.png b/voxygen/test_assets/ui/main/text/Yellow/username.png new file mode 100644 index 0000000000..f7c2387ce8 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/Yellow/username.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b616ce11ee9c8700b82f631c769b738273a7191973804d834028f53206078981 +size 3429 diff --git a/voxygen/test_assets/ui/main/text/a01.png b/voxygen/test_assets/ui/main/text/a01.png new file mode 100644 index 0000000000..ac671c5f28 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/a01.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e128b6fb6f18a7b963ee24823bae6d412966fbff8ede2b7525914dabfff383a +size 3745 diff --git a/voxygen/test_assets/ui/main/text/login.png b/voxygen/test_assets/ui/main/text/login.png index b1249cf8ae..e55f36f3d8 100644 --- a/voxygen/test_assets/ui/main/text/login.png +++ b/voxygen/test_assets/ui/main/text/login.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:006818467f94c2b380099866111ff25da53ea555ea26f0b0ef5ec4e59db7a3a9 -size 2088 +oid sha256:e61d22bc7438a567ad0a8fd45a29eabd755ad2d7872ff61712211a725645193e +size 2077 diff --git a/voxygen/test_assets/ui/main/text/quit.png b/voxygen/test_assets/ui/main/text/quit.png index 46b5588028..44d7b6180f 100644 --- a/voxygen/test_assets/ui/main/text/quit.png +++ b/voxygen/test_assets/ui/main/text/quit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0678e620f0c7ef00671995bbfb95b03349d46a66fe38f5c5d1b8ac42e6daed9a -size 1540 +oid sha256:1295ab1f34b160e0b8d71b5b8fa03ca4ec3359335dfaea7a24174f96cfbefe20 +size 1550 diff --git a/voxygen/test_assets/ui/main/text/server_address.png b/voxygen/test_assets/ui/main/text/server_address.png index 34c3ce7f35..b9324b78fe 100644 --- a/voxygen/test_assets/ui/main/text/server_address.png +++ b/voxygen/test_assets/ui/main/text/server_address.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fba8a3329e257ea3a763d20f3e279dd7abab62e55c2ccd2df947228916b8533a -size 4828 +oid sha256:a0a9b9d0a287d5b67c175bc28ee7af427d5c9f01d421c1fafc04440b442f1232 +size 5669 diff --git a/voxygen/test_assets/ui/main/text/servers.png b/voxygen/test_assets/ui/main/text/servers.png index faea8721e8..8c8e64b38c 100644 --- a/voxygen/test_assets/ui/main/text/servers.png +++ b/voxygen/test_assets/ui/main/text/servers.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9a36a22e175811f428a08eae13dbbb386bd640761074ede7ae853852dfa127f0 -size 2286 +oid sha256:d8e9830be2e54339b547b84b17103b8b3b3f2c59f1b4bd8c9f4a0176c9eac9b1 +size 2317 diff --git a/voxygen/test_assets/ui/main/text/settings.png b/voxygen/test_assets/ui/main/text/settings.png index 7f6477a4a0..d39d8910af 100644 --- a/voxygen/test_assets/ui/main/text/settings.png +++ b/voxygen/test_assets/ui/main/text/settings.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:032d9bc74f540a736f8ab325d8e7cd261f1df7b4bd469baeb7d87238ec356c3c -size 2646 +oid sha256:1e12d7360bf4dc584272f531b53dd96e59c17b0a5acba9d8b6b7d7d30a6e5148 +size 2748 diff --git a/voxygen/test_assets/ui/main/text/singleplayer.png b/voxygen/test_assets/ui/main/text/singleplayer.png new file mode 100644 index 0000000000..00882ad555 --- /dev/null +++ b/voxygen/test_assets/ui/main/text/singleplayer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b965c627162cc2e08a6eb909314849c1b9a266bd84d0e9dd280c1a5196d6db4 +size 4153 diff --git a/voxygen/test_assets/ui/main/text/username.png b/voxygen/test_assets/ui/main/text/username.png index f7c2387ce8..4748fc697e 100644 --- a/voxygen/test_assets/ui/main/text/username.png +++ b/voxygen/test_assets/ui/main/text/username.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b616ce11ee9c8700b82f631c769b738273a7191973804d834028f53206078981 -size 3429 +oid sha256:c641b645857e746ee511d6f633c05f78a3c89eb0484d8ffa905fbed8764921cb +size 4101 diff --git a/voxygen/test_assets/ui/main/v_logo.png b/voxygen/test_assets/ui/main/v_logo.png new file mode 100644 index 0000000000..10eab9f035 --- /dev/null +++ b/voxygen/test_assets/ui/main/v_logo.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19a961b3b76850ad80292389bec3ebf97ab1e2bfe62d3b0566110f88d126d25c +size 10130 diff --git a/voxygen/test_assets/ui/main/v_logo_a01.png b/voxygen/test_assets/ui/main/v_logo_a01.png index 0eb9003f42..2ab02f9661 100644 --- a/voxygen/test_assets/ui/main/v_logo_a01.png +++ b/voxygen/test_assets/ui/main/v_logo_a01.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c65197bee0402baac9e77dcbf774e38a0a4b5c4533f6fe7756eef3a3ae549158 -size 32623 +oid sha256:d6eb1a5fa8f9c06e460b29826d462f3e5617ae9b1b558c6dbeb38d03f02868a1 +size 11664 diff --git a/voxygen/test_assets/ui/title/splash.png b/voxygen/test_assets/ui/title/splash.png new file mode 100644 index 0000000000..f70bc75bc7 --- /dev/null +++ b/voxygen/test_assets/ui/title/splash.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fc7ee2049341b1642de7ffd1a448f9e35558b3bbe6a3d833565cee610e1f45d3 +size 759589 diff --git a/voxygen/test_assets/ui/title/test.png b/voxygen/test_assets/ui/title/test.png deleted file mode 100644 index 8c3da8f238..0000000000 --- a/voxygen/test_assets/ui/title/test.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2918209672b43a1d58994dfa4e1daa477b38af6c5a183ae58bd776838dfb6012 -size 4648282