From 85fbf8cbaae909676cefcfc88dbed226c6e5ee7d Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 00:01:57 +0200 Subject: [PATCH 1/6] Map Window, Settings Window Former-commit-id: 1522b1fb8567516ab92ebb7d22974a59e3695556 --- voxygen/src/hud/mod.rs | 100 ++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 30 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 228a89a0a8..7a2a03c308 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -99,6 +99,8 @@ widget_ids! { settings_button_mo, settings_close, settings_title, + settings_r, + settings_l, //Contents button_help, button_help2, @@ -123,6 +125,8 @@ widget_ids! { map_title, map_frame_l, map_frame_r, + map_frame_bl, + map_frame_br, //3 Spellbook spellbook_frame, spellbook_bg, @@ -238,6 +242,12 @@ pub(self) struct Imgs { window_frame: ImgId, window_frame_2: ImgId, //Settings-Window + settings_frame_r: ImgId, + settings_frame_l: ImgId, + settings_button: ImgId, + settings_button_pressed: ImgId, + settings_button_hover: ImgId, + settings_button_press: ImgId, settings_bg: ImgId, settings_icon: ImgId, settings_button_mo: ImgId, @@ -260,6 +270,8 @@ pub(self) struct Imgs { map_icon: ImgId, map_frame_l: ImgId, map_frame_r: ImgId, + map_frame_bl: ImgId, + map_frame_br: ImgId, // Spell Book Window spellbook_bg: ImgId, spellbook_icon: ImgId, @@ -388,6 +400,12 @@ impl Imgs { window_frame_2: load_img("element/frames/window_2.png", ui), // Settings Window + settings_frame_r: load_vox("element/frames/settings_r.vox", ui), + settings_frame_l: load_vox("element/frames/settings_l.vox", ui), + settings_button: load_vox("element/buttons/settings_button.vox", ui), + settings_button_pressed: load_vox("element/buttons/settings_button_pressed.vox", ui), + settings_button_hover: load_vox("element/buttons/settings_button_hover.vox", ui), + settings_button_press: load_vox("element/buttons/settings_button_press.vox", ui), settings_bg: load_img("element/frames/settings.png", ui), settings_icon: load_img("element/icons/settings.png", ui), settings_button_mo: load_img("element/buttons/blue_mo.png", ui), @@ -414,6 +432,8 @@ impl Imgs { map_icon: load_img("element/icons/map.png", ui), map_frame_l: load_vox("element/frames/map_l.vox", ui), map_frame_r: load_vox("element/frames/map_r.vox", ui), + map_frame_bl: load_vox("element/frames/map_bl.vox", ui), + map_frame_br: load_vox("element/frames/map_br.vox", ui), // Spell Book Window spellbook_bg: load_img("element/misc_bg/small_bg.png", ui), @@ -658,7 +678,7 @@ impl Hud { }; if Button::image(if self.mmap_open {self.imgs.mmap_open} else {self.imgs.mmap_closed}) - .w_h(10.0 * 2.0, 10.0 * 2.0) + .w_h(100.0 * 0.2, 100.0 * 0.2) .hover_image(if self.mmap_open {self.imgs.mmap_open_hover} else {self.imgs.mmap_closed_hover}) .press_image(if self.mmap_open {self.imgs.mmap_open_press} else {self.imgs.mmap_closed_press}) .top_right_with_margins_on(self.ids.mmap_frame, 0.0, 0.0) @@ -950,11 +970,11 @@ impl Hud { // Contents Image::new(self.imgs.bag_contents) .w_h(68.0 * 4.0, 123.0 * 4.0) - .bottom_right_with_margins_on(ui_widgets.window, 90.0, 5.0) + .bottom_right_with_margins_on(ui_widgets.window, 60.0, 5.0) .set(self.ids.bag_contents, ui_widgets); // Alignment for Grid - Rectangle::fill_with([(58.0 * 4.0) - 5.0, 100.0 * 4.0], color::TRANSPARENT) + Rectangle::fill_with([58.0 * 4.0 - 5.0, 100.0 * 4.0], color::TRANSPARENT) .top_left_with_margins_on(self.ids.bag_contents, 11.0 * 4.0, 5.0 * 4.0) .scroll_kids() .scroll_kids_vertically() @@ -1028,17 +1048,27 @@ impl Hud { // 0 Settings if let Windows::Settings = self.open_windows { - // BG - Image::new(self.imgs.window_frame) + // Alignment + Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) .middle_of(ui_widgets.window) - .w_h(1648.0 / 2.5, 1952.0 / 2.5) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.settings_bg, ui_widgets); + // Frame + Image::new(self.imgs.settings_frame_l) + .top_left_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_l, ui_widgets); + Image::new(self.imgs.settings_frame_r) + .top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_r, 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) + .w_h(28.0, 28.0) .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) + .top_right_with_margins_on(self.ids.settings_r, 0.0, 0.0) .set(self.ids.settings_close, ui_widgets) .was_clicked() { @@ -1048,15 +1078,15 @@ impl Hud { // Title Text::new("Settings") - .mid_top_with_margin_on(self.ids.settings_bg, 10.0) - .font_size(30) + .mid_top_with_margin_on(self.ids.settings_bg, 5.0) + .font_size(14) .color(TEXT_COLOR) .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); + //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); // TODO: Find out if we can remove this // Alignment Rectangle Rectangle::fill_with([1008.0 / 2.5, 1616.0 / 2.5], color::TRANSPARENT) @@ -1247,10 +1277,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.social_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.social_frame, 12.0, 0.0) .set(self.ids.social_close, ui_widgets) .was_clicked() { @@ -1297,10 +1327,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(14.0, 14.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.spellbook_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.spellbook_frame, 12.0, 0.0) .set(self.ids.spellbook_close, ui_widgets) .was_clicked() { @@ -1492,10 +1522,11 @@ impl Hud { // 2 Map if self.map_open { - // BG - Image::new(self.imgs.map_bg) - .w_h(824.0, 488.0) - .mid_top_with_margin_on(ui_widgets.window, 200.0) + // BG + Rectangle::fill_with([824.0, 976.0], color::TRANSPARENT) + .mid_top_with_margin_on(ui_widgets.window, 15.0) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.map_bg, ui_widgets); // Frame Image::new(self.imgs.map_frame_l) @@ -1504,8 +1535,17 @@ impl Hud { .set(self.ids.map_frame_l, ui_widgets); Image::new(self.imgs.map_frame_r) .top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) - .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .w_h(412.0, 488.0) .set(self.ids.map_frame_r, ui_widgets); + Image::new(self.imgs.map_frame_br) + .bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_br, ui_widgets); + Image::new(self.imgs.map_frame_bl) + .bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_bl, ui_widgets); + // Icon Image::new(self.imgs.map_icon) @@ -1515,21 +1555,21 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.map_frame_r, 17.0, 5.0) + .top_right_with_margins_on(self.ids.map_frame_r, 0.0, 0.0) .set(self.ids.map_close, ui_widgets) .was_clicked() { self.map_open = false; } // Title - Text::new("Map") - .mid_top_with_margin_on(self.ids.map_bg, -7.0) - .font_size(14) - .color(TEXT_COLOR) - .set(self.ids.map_title, ui_widgets); + //Text::new("Map") + //.mid_top_with_margin_on(self.ids.map_bg, -7.0) + //.font_size(14) + //.color(TEXT_COLOR) + //.set(self.ids.map_title, ui_widgets); } // ESC-MENU From dc1c4327e8bc7b7a45a2ad14a66fc35535963caa Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 00:01:57 +0200 Subject: [PATCH 2/6] Map Window, Settings Window Former-commit-id: c6878d353c8e3b92509d6e95fa75a0f874b5abf9 --- voxygen/src/hud/mod.rs | 100 ++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 30 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 228a89a0a8..7a2a03c308 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -99,6 +99,8 @@ widget_ids! { settings_button_mo, settings_close, settings_title, + settings_r, + settings_l, //Contents button_help, button_help2, @@ -123,6 +125,8 @@ widget_ids! { map_title, map_frame_l, map_frame_r, + map_frame_bl, + map_frame_br, //3 Spellbook spellbook_frame, spellbook_bg, @@ -238,6 +242,12 @@ pub(self) struct Imgs { window_frame: ImgId, window_frame_2: ImgId, //Settings-Window + settings_frame_r: ImgId, + settings_frame_l: ImgId, + settings_button: ImgId, + settings_button_pressed: ImgId, + settings_button_hover: ImgId, + settings_button_press: ImgId, settings_bg: ImgId, settings_icon: ImgId, settings_button_mo: ImgId, @@ -260,6 +270,8 @@ pub(self) struct Imgs { map_icon: ImgId, map_frame_l: ImgId, map_frame_r: ImgId, + map_frame_bl: ImgId, + map_frame_br: ImgId, // Spell Book Window spellbook_bg: ImgId, spellbook_icon: ImgId, @@ -388,6 +400,12 @@ impl Imgs { window_frame_2: load_img("element/frames/window_2.png", ui), // Settings Window + settings_frame_r: load_vox("element/frames/settings_r.vox", ui), + settings_frame_l: load_vox("element/frames/settings_l.vox", ui), + settings_button: load_vox("element/buttons/settings_button.vox", ui), + settings_button_pressed: load_vox("element/buttons/settings_button_pressed.vox", ui), + settings_button_hover: load_vox("element/buttons/settings_button_hover.vox", ui), + settings_button_press: load_vox("element/buttons/settings_button_press.vox", ui), settings_bg: load_img("element/frames/settings.png", ui), settings_icon: load_img("element/icons/settings.png", ui), settings_button_mo: load_img("element/buttons/blue_mo.png", ui), @@ -414,6 +432,8 @@ impl Imgs { map_icon: load_img("element/icons/map.png", ui), map_frame_l: load_vox("element/frames/map_l.vox", ui), map_frame_r: load_vox("element/frames/map_r.vox", ui), + map_frame_bl: load_vox("element/frames/map_bl.vox", ui), + map_frame_br: load_vox("element/frames/map_br.vox", ui), // Spell Book Window spellbook_bg: load_img("element/misc_bg/small_bg.png", ui), @@ -658,7 +678,7 @@ impl Hud { }; if Button::image(if self.mmap_open {self.imgs.mmap_open} else {self.imgs.mmap_closed}) - .w_h(10.0 * 2.0, 10.0 * 2.0) + .w_h(100.0 * 0.2, 100.0 * 0.2) .hover_image(if self.mmap_open {self.imgs.mmap_open_hover} else {self.imgs.mmap_closed_hover}) .press_image(if self.mmap_open {self.imgs.mmap_open_press} else {self.imgs.mmap_closed_press}) .top_right_with_margins_on(self.ids.mmap_frame, 0.0, 0.0) @@ -950,11 +970,11 @@ impl Hud { // Contents Image::new(self.imgs.bag_contents) .w_h(68.0 * 4.0, 123.0 * 4.0) - .bottom_right_with_margins_on(ui_widgets.window, 90.0, 5.0) + .bottom_right_with_margins_on(ui_widgets.window, 60.0, 5.0) .set(self.ids.bag_contents, ui_widgets); // Alignment for Grid - Rectangle::fill_with([(58.0 * 4.0) - 5.0, 100.0 * 4.0], color::TRANSPARENT) + Rectangle::fill_with([58.0 * 4.0 - 5.0, 100.0 * 4.0], color::TRANSPARENT) .top_left_with_margins_on(self.ids.bag_contents, 11.0 * 4.0, 5.0 * 4.0) .scroll_kids() .scroll_kids_vertically() @@ -1028,17 +1048,27 @@ impl Hud { // 0 Settings if let Windows::Settings = self.open_windows { - // BG - Image::new(self.imgs.window_frame) + // Alignment + Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) .middle_of(ui_widgets.window) - .w_h(1648.0 / 2.5, 1952.0 / 2.5) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.settings_bg, ui_widgets); + // Frame + Image::new(self.imgs.settings_frame_l) + .top_left_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_l, ui_widgets); + Image::new(self.imgs.settings_frame_r) + .top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_r, 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) + .w_h(28.0, 28.0) .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) + .top_right_with_margins_on(self.ids.settings_r, 0.0, 0.0) .set(self.ids.settings_close, ui_widgets) .was_clicked() { @@ -1048,15 +1078,15 @@ impl Hud { // Title Text::new("Settings") - .mid_top_with_margin_on(self.ids.settings_bg, 10.0) - .font_size(30) + .mid_top_with_margin_on(self.ids.settings_bg, 5.0) + .font_size(14) .color(TEXT_COLOR) .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); + //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); // TODO: Find out if we can remove this // Alignment Rectangle Rectangle::fill_with([1008.0 / 2.5, 1616.0 / 2.5], color::TRANSPARENT) @@ -1247,10 +1277,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.social_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.social_frame, 12.0, 0.0) .set(self.ids.social_close, ui_widgets) .was_clicked() { @@ -1297,10 +1327,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(14.0, 14.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.spellbook_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.spellbook_frame, 12.0, 0.0) .set(self.ids.spellbook_close, ui_widgets) .was_clicked() { @@ -1492,10 +1522,11 @@ impl Hud { // 2 Map if self.map_open { - // BG - Image::new(self.imgs.map_bg) - .w_h(824.0, 488.0) - .mid_top_with_margin_on(ui_widgets.window, 200.0) + // BG + Rectangle::fill_with([824.0, 976.0], color::TRANSPARENT) + .mid_top_with_margin_on(ui_widgets.window, 15.0) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.map_bg, ui_widgets); // Frame Image::new(self.imgs.map_frame_l) @@ -1504,8 +1535,17 @@ impl Hud { .set(self.ids.map_frame_l, ui_widgets); Image::new(self.imgs.map_frame_r) .top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) - .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .w_h(412.0, 488.0) .set(self.ids.map_frame_r, ui_widgets); + Image::new(self.imgs.map_frame_br) + .bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_br, ui_widgets); + Image::new(self.imgs.map_frame_bl) + .bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_bl, ui_widgets); + // Icon Image::new(self.imgs.map_icon) @@ -1515,21 +1555,21 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.map_frame_r, 17.0, 5.0) + .top_right_with_margins_on(self.ids.map_frame_r, 0.0, 0.0) .set(self.ids.map_close, ui_widgets) .was_clicked() { self.map_open = false; } // Title - Text::new("Map") - .mid_top_with_margin_on(self.ids.map_bg, -7.0) - .font_size(14) - .color(TEXT_COLOR) - .set(self.ids.map_title, ui_widgets); + //Text::new("Map") + //.mid_top_with_margin_on(self.ids.map_bg, -7.0) + //.font_size(14) + //.color(TEXT_COLOR) + //.set(self.ids.map_title, ui_widgets); } // ESC-MENU From b87958eeb29231ab6334851b6b2326c9bf0f0969 Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 20:13:22 +0200 Subject: [PATCH 3/6] settings window Former-commit-id: a63a117d9595db501b135677b720dbbfbdfad2ad --- voxygen/src/hud/mod.rs | 130 ++++++++++++++++++++++++++++------------- 1 file changed, 89 insertions(+), 41 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 7a2a03c308..794d63ea6f 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -95,6 +95,7 @@ widget_ids! { window_frame_5, //0 Settings-Window settings_bg, + settings_content, settings_icon, settings_button_mo, settings_close, @@ -1048,11 +1049,9 @@ impl Hud { // 0 Settings if let Windows::Settings = self.open_windows { - // Alignment + // Frame Alignment Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) - .middle_of(ui_widgets.window) - .scroll_kids() - .scroll_kids_vertically() + .middle_of(ui_widgets.window) .set(self.ids.settings_bg, ui_widgets); // Frame Image::new(self.imgs.settings_frame_l) @@ -1060,9 +1059,16 @@ impl Hud { .w_h(412.0, 488.0) .set(self.ids.settings_l, ui_widgets); Image::new(self.imgs.settings_frame_r) - .top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .right_from(self.ids.settings_l, 0.0) + .parent(self.ids.settings_bg) .w_h(412.0, 488.0) .set(self.ids.settings_r, ui_widgets); + // Content Alignment + Rectangle::fill_with([189.0*4.0, 97.0*4.0], color::TRANSPARENT) + .top_right_with_margins_on(self.ids.settings_r, 21.0*4.0, 4.0*4.0) + .scroll_kids() + .scroll_kids_vertically() + .set(self.ids.settings_content, ui_widgets); // X-Button if Button::image(self.imgs.close_button) .w_h(28.0, 28.0) @@ -1095,14 +1101,22 @@ impl Hud { // 1 Interface//////////////////////////// if Button::image(if let SettingsTab::Interface = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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, 78.0, 50.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Interface = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Interface = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .top_left_with_margins_on(self.ids.settings_l, 8.0*4.0, 2.0*4.0) .label("Interface") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1116,7 +1130,7 @@ impl Hud { self.show_help = ToggleButton::new(self.show_help, self.imgs.check, self.imgs.check_checked) .w_h(288.0 / 24.0, 288.0 / 24.0) - .top_left_with_margins_on(self.ids.rectangle, 15.0, 15.0) + .top_left_with_margins_on(self.ids.settings_content, 5.0, 5.0) .hover_images(self.imgs.check_checked_mo, self.imgs.check_mo) .press_images(self.imgs.check_press, self.imgs.check_press) .set(self.ids.button_help, ui_widgets); @@ -1165,15 +1179,23 @@ impl Hud { } // 2 Gameplay//////////////// - if Button::image(if let SettingsTab::Gameplay = self.settings_tab { - self.imgs.button_blue_mo + if Button::image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.interface, 0.0) .label("Gameplay") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1185,14 +1207,22 @@ impl Hud { // 3 Controls///////////////////// if Button::image(if let SettingsTab::Controls = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.gameplay, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Controls = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Controls = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.gameplay, 0.0) .label("Controls") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1203,16 +1233,25 @@ impl Hud { } // 4 Video//////////////////////////////// - if Button::image(if let SettingsTab::Video = self.settings_tab { - self.imgs.button_blue_mo + if Button::image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.controls, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.controls, 0.0) .label("Video") + .parent(self.ids.settings_r) .label_font_size(14) .label_color(TEXT_COLOR) .set(self.ids.video, ui_widgets) @@ -1223,14 +1262,23 @@ impl Hud { // 5 Sound/////////////////////////////// if Button::image(if let SettingsTab::Sound = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.video, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Sound = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Sound = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.video, 0.0) + .parent(self.ids.settings_r) .label("Sound") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1534,15 +1582,15 @@ impl Hud { .w_h(412.0, 488.0) .set(self.ids.map_frame_l, ui_widgets); Image::new(self.imgs.map_frame_r) - .top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .right_from(self.ids.map_frame_l, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_r, ui_widgets); Image::new(self.imgs.map_frame_br) - .bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .down_from(self.ids.map_frame_r, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_br, ui_widgets); Image::new(self.imgs.map_frame_bl) - .bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .down_from(self.ids.map_frame_l, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_bl, ui_widgets); From 30aa5f7291e99b961a99967a70411aaefa8a3b5d Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 00:01:57 +0200 Subject: [PATCH 4/6] Map Window, Settings Window Former-commit-id: 66f1b1d3e9e2dbb757bdbc82ed417b23cb201831 --- voxygen/src/hud/mod.rs | 100 ++++++++++++++++++++++++++++------------- 1 file changed, 70 insertions(+), 30 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 228a89a0a8..7a2a03c308 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -99,6 +99,8 @@ widget_ids! { settings_button_mo, settings_close, settings_title, + settings_r, + settings_l, //Contents button_help, button_help2, @@ -123,6 +125,8 @@ widget_ids! { map_title, map_frame_l, map_frame_r, + map_frame_bl, + map_frame_br, //3 Spellbook spellbook_frame, spellbook_bg, @@ -238,6 +242,12 @@ pub(self) struct Imgs { window_frame: ImgId, window_frame_2: ImgId, //Settings-Window + settings_frame_r: ImgId, + settings_frame_l: ImgId, + settings_button: ImgId, + settings_button_pressed: ImgId, + settings_button_hover: ImgId, + settings_button_press: ImgId, settings_bg: ImgId, settings_icon: ImgId, settings_button_mo: ImgId, @@ -260,6 +270,8 @@ pub(self) struct Imgs { map_icon: ImgId, map_frame_l: ImgId, map_frame_r: ImgId, + map_frame_bl: ImgId, + map_frame_br: ImgId, // Spell Book Window spellbook_bg: ImgId, spellbook_icon: ImgId, @@ -388,6 +400,12 @@ impl Imgs { window_frame_2: load_img("element/frames/window_2.png", ui), // Settings Window + settings_frame_r: load_vox("element/frames/settings_r.vox", ui), + settings_frame_l: load_vox("element/frames/settings_l.vox", ui), + settings_button: load_vox("element/buttons/settings_button.vox", ui), + settings_button_pressed: load_vox("element/buttons/settings_button_pressed.vox", ui), + settings_button_hover: load_vox("element/buttons/settings_button_hover.vox", ui), + settings_button_press: load_vox("element/buttons/settings_button_press.vox", ui), settings_bg: load_img("element/frames/settings.png", ui), settings_icon: load_img("element/icons/settings.png", ui), settings_button_mo: load_img("element/buttons/blue_mo.png", ui), @@ -414,6 +432,8 @@ impl Imgs { map_icon: load_img("element/icons/map.png", ui), map_frame_l: load_vox("element/frames/map_l.vox", ui), map_frame_r: load_vox("element/frames/map_r.vox", ui), + map_frame_bl: load_vox("element/frames/map_bl.vox", ui), + map_frame_br: load_vox("element/frames/map_br.vox", ui), // Spell Book Window spellbook_bg: load_img("element/misc_bg/small_bg.png", ui), @@ -658,7 +678,7 @@ impl Hud { }; if Button::image(if self.mmap_open {self.imgs.mmap_open} else {self.imgs.mmap_closed}) - .w_h(10.0 * 2.0, 10.0 * 2.0) + .w_h(100.0 * 0.2, 100.0 * 0.2) .hover_image(if self.mmap_open {self.imgs.mmap_open_hover} else {self.imgs.mmap_closed_hover}) .press_image(if self.mmap_open {self.imgs.mmap_open_press} else {self.imgs.mmap_closed_press}) .top_right_with_margins_on(self.ids.mmap_frame, 0.0, 0.0) @@ -950,11 +970,11 @@ impl Hud { // Contents Image::new(self.imgs.bag_contents) .w_h(68.0 * 4.0, 123.0 * 4.0) - .bottom_right_with_margins_on(ui_widgets.window, 90.0, 5.0) + .bottom_right_with_margins_on(ui_widgets.window, 60.0, 5.0) .set(self.ids.bag_contents, ui_widgets); // Alignment for Grid - Rectangle::fill_with([(58.0 * 4.0) - 5.0, 100.0 * 4.0], color::TRANSPARENT) + Rectangle::fill_with([58.0 * 4.0 - 5.0, 100.0 * 4.0], color::TRANSPARENT) .top_left_with_margins_on(self.ids.bag_contents, 11.0 * 4.0, 5.0 * 4.0) .scroll_kids() .scroll_kids_vertically() @@ -1028,17 +1048,27 @@ impl Hud { // 0 Settings if let Windows::Settings = self.open_windows { - // BG - Image::new(self.imgs.window_frame) + // Alignment + Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) .middle_of(ui_widgets.window) - .w_h(1648.0 / 2.5, 1952.0 / 2.5) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.settings_bg, ui_widgets); + // Frame + Image::new(self.imgs.settings_frame_l) + .top_left_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_l, ui_widgets); + Image::new(self.imgs.settings_frame_r) + .top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.settings_r, 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) + .w_h(28.0, 28.0) .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) + .top_right_with_margins_on(self.ids.settings_r, 0.0, 0.0) .set(self.ids.settings_close, ui_widgets) .was_clicked() { @@ -1048,15 +1078,15 @@ impl Hud { // Title Text::new("Settings") - .mid_top_with_margin_on(self.ids.settings_bg, 10.0) - .font_size(30) + .mid_top_with_margin_on(self.ids.settings_bg, 5.0) + .font_size(14) .color(TEXT_COLOR) .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); + //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); // TODO: Find out if we can remove this // Alignment Rectangle Rectangle::fill_with([1008.0 / 2.5, 1616.0 / 2.5], color::TRANSPARENT) @@ -1247,10 +1277,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.social_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.social_frame, 12.0, 0.0) .set(self.ids.social_close, ui_widgets) .was_clicked() { @@ -1297,10 +1327,10 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(14.0, 14.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.spellbook_frame, 17.0, 5.0) + .top_right_with_margins_on(self.ids.spellbook_frame, 12.0, 0.0) .set(self.ids.spellbook_close, ui_widgets) .was_clicked() { @@ -1492,10 +1522,11 @@ impl Hud { // 2 Map if self.map_open { - // BG - Image::new(self.imgs.map_bg) - .w_h(824.0, 488.0) - .mid_top_with_margin_on(ui_widgets.window, 200.0) + // BG + Rectangle::fill_with([824.0, 976.0], color::TRANSPARENT) + .mid_top_with_margin_on(ui_widgets.window, 15.0) + .scroll_kids() + .scroll_kids_vertically() .set(self.ids.map_bg, ui_widgets); // Frame Image::new(self.imgs.map_frame_l) @@ -1504,8 +1535,17 @@ impl Hud { .set(self.ids.map_frame_l, ui_widgets); Image::new(self.imgs.map_frame_r) .top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) - .w_h(1648.0 / 4.0, 1952.0 / 4.0) + .w_h(412.0, 488.0) .set(self.ids.map_frame_r, ui_widgets); + Image::new(self.imgs.map_frame_br) + .bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_br, ui_widgets); + Image::new(self.imgs.map_frame_bl) + .bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .w_h(412.0, 488.0) + .set(self.ids.map_frame_bl, ui_widgets); + // Icon Image::new(self.imgs.map_icon) @@ -1515,21 +1555,21 @@ impl Hud { // X-Button if Button::image(self.imgs.close_button) - .w_h(20.0, 20.0) + .w_h(28.0, 28.0) .hover_image(self.imgs.close_button_hover) .press_image(self.imgs.close_button_press) - .top_right_with_margins_on(self.ids.map_frame_r, 17.0, 5.0) + .top_right_with_margins_on(self.ids.map_frame_r, 0.0, 0.0) .set(self.ids.map_close, ui_widgets) .was_clicked() { self.map_open = false; } // Title - Text::new("Map") - .mid_top_with_margin_on(self.ids.map_bg, -7.0) - .font_size(14) - .color(TEXT_COLOR) - .set(self.ids.map_title, ui_widgets); + //Text::new("Map") + //.mid_top_with_margin_on(self.ids.map_bg, -7.0) + //.font_size(14) + //.color(TEXT_COLOR) + //.set(self.ids.map_title, ui_widgets); } // ESC-MENU From 30f86a303f2211c219f2c6e2feafb5df39facafc Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 20:13:22 +0200 Subject: [PATCH 5/6] settings window Former-commit-id: da0b82d0219fd2cfc105d5abb6e4d99caf87c379 --- voxygen/src/hud/mod.rs | 130 ++++++++++++++++++++++++++++------------- 1 file changed, 89 insertions(+), 41 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 7a2a03c308..794d63ea6f 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -95,6 +95,7 @@ widget_ids! { window_frame_5, //0 Settings-Window settings_bg, + settings_content, settings_icon, settings_button_mo, settings_close, @@ -1048,11 +1049,9 @@ impl Hud { // 0 Settings if let Windows::Settings = self.open_windows { - // Alignment + // Frame Alignment Rectangle::fill_with([824.0, 488.0], color::TRANSPARENT) - .middle_of(ui_widgets.window) - .scroll_kids() - .scroll_kids_vertically() + .middle_of(ui_widgets.window) .set(self.ids.settings_bg, ui_widgets); // Frame Image::new(self.imgs.settings_frame_l) @@ -1060,9 +1059,16 @@ impl Hud { .w_h(412.0, 488.0) .set(self.ids.settings_l, ui_widgets); Image::new(self.imgs.settings_frame_r) - .top_right_with_margins_on(self.ids.settings_bg, 0.0, 0.0) + .right_from(self.ids.settings_l, 0.0) + .parent(self.ids.settings_bg) .w_h(412.0, 488.0) .set(self.ids.settings_r, ui_widgets); + // Content Alignment + Rectangle::fill_with([189.0*4.0, 97.0*4.0], color::TRANSPARENT) + .top_right_with_margins_on(self.ids.settings_r, 21.0*4.0, 4.0*4.0) + .scroll_kids() + .scroll_kids_vertically() + .set(self.ids.settings_content, ui_widgets); // X-Button if Button::image(self.imgs.close_button) .w_h(28.0, 28.0) @@ -1095,14 +1101,22 @@ impl Hud { // 1 Interface//////////////////////////// if Button::image(if let SettingsTab::Interface = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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, 78.0, 50.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Interface = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Interface = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .top_left_with_margins_on(self.ids.settings_l, 8.0*4.0, 2.0*4.0) .label("Interface") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1116,7 +1130,7 @@ impl Hud { self.show_help = ToggleButton::new(self.show_help, self.imgs.check, self.imgs.check_checked) .w_h(288.0 / 24.0, 288.0 / 24.0) - .top_left_with_margins_on(self.ids.rectangle, 15.0, 15.0) + .top_left_with_margins_on(self.ids.settings_content, 5.0, 5.0) .hover_images(self.imgs.check_checked_mo, self.imgs.check_mo) .press_images(self.imgs.check_press, self.imgs.check_press) .set(self.ids.button_help, ui_widgets); @@ -1165,15 +1179,23 @@ impl Hud { } // 2 Gameplay//////////////// - if Button::image(if let SettingsTab::Gameplay = self.settings_tab { - self.imgs.button_blue_mo + if Button::image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Gameplay = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.interface, 0.0) .label("Gameplay") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1185,14 +1207,22 @@ impl Hud { // 3 Controls///////////////////// if Button::image(if let SettingsTab::Controls = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.gameplay, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Controls = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Controls = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.gameplay, 0.0) .label("Controls") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1203,16 +1233,25 @@ impl Hud { } // 4 Video//////////////////////////////// - if Button::image(if let SettingsTab::Video = self.settings_tab { - self.imgs.button_blue_mo + if Button::image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.controls, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Video = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.controls, 0.0) .label("Video") + .parent(self.ids.settings_r) .label_font_size(14) .label_color(TEXT_COLOR) .set(self.ids.video, ui_widgets) @@ -1223,14 +1262,23 @@ impl Hud { // 5 Sound/////////////////////////////// if Button::image(if let SettingsTab::Sound = self.settings_tab { - self.imgs.button_blue_mo + self.imgs.settings_button_pressed } else { - self.imgs.button_blank + self.imgs.settings_button }) - .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.video, 1.0) + .w_h(31.0*4.0, 12.0*4.0) + .hover_image(if let SettingsTab::Sound = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_hover + }) + .press_image(if let SettingsTab::Sound = self.settings_tab { + self.imgs.settings_button_pressed + } else { + self.imgs.settings_button_press + }) + .right_from(self.ids.video, 0.0) + .parent(self.ids.settings_r) .label("Sound") .label_font_size(14) .label_color(TEXT_COLOR) @@ -1534,15 +1582,15 @@ impl Hud { .w_h(412.0, 488.0) .set(self.ids.map_frame_l, ui_widgets); Image::new(self.imgs.map_frame_r) - .top_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .right_from(self.ids.map_frame_l, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_r, ui_widgets); Image::new(self.imgs.map_frame_br) - .bottom_right_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .down_from(self.ids.map_frame_r, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_br, ui_widgets); Image::new(self.imgs.map_frame_bl) - .bottom_left_with_margins_on(self.ids.map_bg, 0.0, 0.0) + .down_from(self.ids.map_frame_l, 0.0) .w_h(412.0, 488.0) .set(self.ids.map_frame_bl, ui_widgets); From 9b3f866f00ae6aa0e0055b70636b5e6071424810 Mon Sep 17 00:00:00 2001 From: Pfauenauge Date: Mon, 29 Apr 2019 20:51:26 +0200 Subject: [PATCH 6/6] settings window Former-commit-id: b647fa56d26cf9f8e4a2a14ebbad43384d87e50c --- voxygen/src/hud/mod.rs | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 794d63ea6f..7bdb483e45 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -1064,7 +1064,7 @@ impl Hud { .w_h(412.0, 488.0) .set(self.ids.settings_r, ui_widgets); // Content Alignment - Rectangle::fill_with([189.0*4.0, 97.0*4.0], color::TRANSPARENT) + Rectangle::fill_with([198.0*4.0, 97.0*4.0], color::TRANSPARENT) .top_right_with_margins_on(self.ids.settings_r, 21.0*4.0, 4.0*4.0) .scroll_kids() .scroll_kids_vertically() @@ -1093,11 +1093,7 @@ impl Hud { //.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); - // TODO: Find out if we can remove this - // Alignment Rectangle - Rectangle::fill_with([1008.0 / 2.5, 1616.0 / 2.5], color::TRANSPARENT) - .top_left_with_margins_on(self.ids.settings_bg, 77.0, 205.0) - .set(self.ids.rectangle, ui_widgets); + // TODO: Find out if we can remove this // 1 Interface//////////////////////////// if Button::image(if let SettingsTab::Interface = self.settings_tab { @@ -1136,7 +1132,7 @@ impl Hud { .set(self.ids.button_help, ui_widgets); Text::new("Show Help") .right_from(self.ids.button_help, 10.0) - .font_size(12) + .font_size(14) .font_id(self.font_opensans) .graphics_for(self.ids.button_help) .color(TEXT_COLOR) @@ -1148,14 +1144,14 @@ impl Hud { self.imgs.check_checked, ) .w_h(288.0 / 24.0, 288.0 / 24.0) - .top_left_with_margins_on(self.ids.rectangle, 40.0, 15.0) + .down_from(self.ids.button_help, 7.0) .hover_images(self.imgs.check_checked_mo, self.imgs.check_mo) .press_images(self.imgs.check_press, self.imgs.check_press) .set(self.ids.inventorytest_button, ui_widgets); Text::new("Show Inventory Test Button") .right_from(self.ids.inventorytest_button, 10.0) - .font_size(12) + .font_size(14) .font_id(self.font_opensans) .graphics_for(self.ids.inventorytest_button) .color(TEXT_COLOR) @@ -1164,14 +1160,14 @@ impl Hud { self.show_debug = ToggleButton::new(self.show_debug, self.imgs.check, self.imgs.check_checked) .w_h(288.0 / 24.0, 288.0 / 24.0) - .top_left_with_margins_on(self.ids.rectangle, 65.0, 15.0) + .down_from(self.ids.inventorytest_button, 7.0) .hover_images(self.imgs.check_checked_mo, self.imgs.check_mo) .press_images(self.imgs.check_press, self.imgs.check_press) .set(self.ids.debug_button, ui_widgets); Text::new("Show Debug Window") .right_from(self.ids.debug_button, 10.0) - .font_size(12) + .font_size(14) .font_id(self.font_opensans) .graphics_for(self.ids.debug_button) .color(TEXT_COLOR)