diff --git a/assets/voxygen/element/buttons/grid.vox b/assets/voxygen/element/buttons/grid.vox new file mode 100644 index 0000000000..ed50eae910 --- /dev/null +++ b/assets/voxygen/element/buttons/grid.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8fbdc3f10eb9c1710259ea3e304a418fee8d176af850350016c1be256798462 +size 45134 diff --git a/assets/voxygen/element/frames/window_3.vox b/assets/voxygen/element/frames/window_3.vox index 22131d457c..c9ef3917af 100644 --- a/assets/voxygen/element/frames/window_3.vox +++ b/assets/voxygen/element/frames/window_3.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:822beaf396597b38da93542345f44dc949c92f3e96c389bd990dc5d532d43a79 -size 196492 +oid sha256:ee3d7c5a94372b9ec1f5544151112deadcbfc0bc2571c8cf2efba350e448b126 +size 239600 diff --git a/assets/voxygen/element/icons/back.vox b/assets/voxygen/element/icons/back.vox new file mode 100644 index 0000000000..dc2490b060 --- /dev/null +++ b/assets/voxygen/element/icons/back.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e967f46d131f6378700b29784483f5f8eb4573c55a3d792a69b3fe8536b39fb +size 19496 diff --git a/assets/voxygen/element/icons/belt.vox b/assets/voxygen/element/icons/belt.vox new file mode 100644 index 0000000000..93a83c77c5 --- /dev/null +++ b/assets/voxygen/element/icons/belt.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4c5fa3de317fc9d8ad32d1cae28488bf4b74687dad95bc7ae83333ba29570af +size 18160 diff --git a/assets/voxygen/element/icons/chest.vox b/assets/voxygen/element/icons/chest.vox new file mode 100644 index 0000000000..cc1bc574dc --- /dev/null +++ b/assets/voxygen/element/icons/chest.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5002a9da3b28f251c7b0b2f6982077c46c1b8418999ba191d3e1cfc86c7259b3 +size 18504 diff --git a/assets/voxygen/element/icons/gem.vox b/assets/voxygen/element/icons/gem.vox new file mode 100644 index 0000000000..95a6e1f84b --- /dev/null +++ b/assets/voxygen/element/icons/gem.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efa2acbc925f6223070b96a1d02fbeedf1898cac4445432ae1edeb7f04ae8e8f +size 19128 diff --git a/assets/voxygen/element/icons/hands.vox b/assets/voxygen/element/icons/hands.vox new file mode 100644 index 0000000000..823e28436d --- /dev/null +++ b/assets/voxygen/element/icons/hands.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfb8d609198a1ef53353248372e9d9a5e479793e13b9c486ba7a9763b7a3e189 +size 18536 diff --git a/assets/voxygen/element/icons/head.vox b/assets/voxygen/element/icons/head.vox new file mode 100644 index 0000000000..145491b44d --- /dev/null +++ b/assets/voxygen/element/icons/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6de57cc2446344b13a2f55571b7db49b363ac5ea909cc58723c7147f63821558 +size 20624 diff --git a/voxygen/src/hud/character_window.rs b/voxygen/src/hud/character_window.rs index 64417a3b55..c4a1a36e8d 100644 --- a/voxygen/src/hud/character_window.rs +++ b/voxygen/src/hud/character_window.rs @@ -13,6 +13,7 @@ widget_ids! { charwindow_exp_progress_rectangle, charwindow_exp_rectangle, charwindow_frame, + content_align, // charwindow_icon, charwindow_rectangle, charwindow_tab1, @@ -29,6 +30,33 @@ widget_ids! { tab_small_closed, xp_charwindow, divider_1, + head_bg, + shoulders_bg, + hands_bg, + belt_bg, + legs_bg, + feet_bg, + ring_r_bg, + ring_l_bg, + tabard_bg, + chest_bg, + back_bg, + gem_bg, + necklace_bg, + head_grid, + shoulders_grid, + hands_grid, + belt_grid, + legs_grid, + feet_grid, + ring_r_grid, + ring_l_grid, + tabard_grid, + chest_grid, + back_grid, + gem_grid, + necklace_grid, + } } @@ -84,9 +112,9 @@ impl<'a> Widget for CharacterWindow<'a> { // Icon //Image::new(self.imgs.charwindow_icon) - //.w_h(40.0, 40.0) - //.top_left_with_margins_on(state.charwindow_frame, 4.0, 4.0) - //.set(state.charwindow_icon, ui); + //.w_h(40.0, 40.0) + //.top_left_with_margins_on(state.charwindow_frame, 4.0, 4.0) + //.set(state.charwindow_icon, ui); // X-Button if Button::image(self.imgs.close_button) @@ -108,25 +136,41 @@ impl<'a> Widget for CharacterWindow<'a> { .color(TEXT_COLOR) .set(state.charwindow_title, ui); + // Content Alignment + Rectangle::fill_with([95.0 * 4.0, 108.0 * 4.0], color::TRANSPARENT) + .mid_top_with_margin_on(state.charwindow_frame, 40.0) + .set(state.content_align, ui); + + // Contents + + //Head BG and Grid + + Image::new(self.imgs.head_bg) + .w_h(28.0 * 4.0, 28.0 * 4.0) + .mid_top_with_margin_on(state.content_align, 5.0) + .set(state.head_bg, ui); + + // Stats Tab + // Tab BG Image::new(self.imgs.tab_bg) - .w_h(50.0*4.0, 115.0*4.0) - .top_left_with_margins_on(state.charwindow_frame,28.0, -200.0) + .w_h(50.0 * 4.0, 115.0 * 4.0) + .top_left_with_margins_on(state.charwindow_frame, 28.0, -200.0) .set(state.charwindow_tab_bg, ui); // Tab Rectangle - Rectangle::fill_with([45.0*4.0, 104.0*4.0], color::TRANSPARENT) - .top_left_with_margins_on(state.charwindow_tab_bg, 7.0*4.0, 4.0*4.0) + Rectangle::fill_with([45.0 * 4.0, 104.0 * 4.0], color::TRANSPARENT) + .top_left_with_margins_on(state.charwindow_tab_bg, 7.0 * 4.0, 4.0 * 4.0) .set(state.charwindow_rectangle, ui); - // Tab Button - Button::image(self.imgs.charwindow_tab) - .w_h(65.0, 23.0) - .top_left_with_margins_on(state.charwindow_tab_bg, -18.0, 2.0) - .label("Stats") - .label_color(TEXT_COLOR) - .label_font_size(14) - .set(state.charwindow_tab1, ui); + // Tab Button -> Add that back in when we have multiple tabs + // Button::image(self.imgs.charwindow_tab) + //.w_h(65.0, 23.0) + //.top_left_with_margins_on(state.charwindow_tab_bg, -18.0, 2.0) + //.label("Stats") + //.label_color(TEXT_COLOR) + //.label_font_size(14) + //.set(state.charwindow_tab1, ui); Text::new("1") //Add in actual Character Level .mid_top_with_margin_on(state.charwindow_rectangle, 10.0) @@ -159,6 +203,13 @@ impl<'a> Widget for CharacterWindow<'a> { .color(TEXT_COLOR) .set(state.charwindow_tab1_exp, ui); + // Divider + + Image::new(self.imgs.divider) + .w_h(38.0 * 4.0, 5.0 * 4.0) + .mid_top_with_margin_on(state.charwindow_tab1_exp, 30.0) + .set(state.divider_1, ui); + // Stats Text::new( "Stamina\n\ @@ -169,7 +220,7 @@ impl<'a> Widget for CharacterWindow<'a> { \n\ Intelligence", ) - .top_left_with_margins_on(state.charwindow_rectangle, 100.0, 20.0) + .top_left_with_margins_on(state.charwindow_rectangle, 140.0, 5.0) .font_id(self.fonts.opensans) .font_size(16) .color(TEXT_COLOR) @@ -184,7 +235,7 @@ impl<'a> Widget for CharacterWindow<'a> { \n\ 124124", ) - .right_from(state.charwindow_tab1_statnames, 10.0) + .top_right_with_margins_on(state.charwindow_rectangle, 140.0, 5.0) .font_id(self.fonts.opensans) .font_size(16) .color(TEXT_COLOR) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 13315dca0b..0456d1f28d 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -8,6 +8,27 @@ image_ids! { inv_grid: "/voxygen/element/frames/inv_grid.vox", inv_slot: "/voxygen/element/buttons/inv_slot.vox", + // Grid + grid: "/voxygen/element/buttons/grid.vox", + grid_hover: "/voxygen/element/buttons/grid.vox", + grid_press: "/voxygen/element/buttons/grid.vox", + + // Char Window BG + + head_bg: "/voxygen/element/icons/head.vox", + shoulders_bg: "/voxygen/element/icons/head.vox", + hands_bg: "/voxygen/element/icons/head.vox", + belt_bg: "/voxygen/element/icons/head.vox", + legs_bg: "/voxygen/element/icons/head.vox", + feet_bg: "/voxygen/element/icons/head.vox", + ring_r_bg: "/voxygen/element/icons/head.vox", + ring_l_bg: "/voxygen/element/icons/head.vox", + tabard_bg: "/voxygen/element/icons/head.vox", + chest_bg: "/voxygen/element/icons/head.vox", + back_bg: "/voxygen/element/icons/head.vox", + gem_bg: "/voxygen/element/icons/head.vox", + necklace_bg: "/voxygen/element/icons/head.vox", + // Buttons