diff --git a/assets/voxygen/element/icons/back.png b/assets/voxygen/element/icons/back.png new file mode 100644 index 0000000000..46c6472b1f --- /dev/null +++ b/assets/voxygen/element/icons/back.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:de53aa3a5c0833ec1ee9b89872a25643742aef22b70b2cc2ba5af4435a6714bf +size 1080 diff --git a/assets/voxygen/element/icons/belt.png b/assets/voxygen/element/icons/belt.png new file mode 100644 index 0000000000..5588b7fe24 --- /dev/null +++ b/assets/voxygen/element/icons/belt.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e10d69242cbb54530ca4353663d57f1abea4b997568b9335fd19dfe158b1bafe +size 935 diff --git a/assets/voxygen/element/icons/chest.png b/assets/voxygen/element/icons/chest.png new file mode 100644 index 0000000000..dde643eaef --- /dev/null +++ b/assets/voxygen/element/icons/chest.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b1bab917b7854f944d2c5c145a905a5dd8a610b7027e37c16919ab91d655a68 +size 981 diff --git a/assets/voxygen/element/icons/feet.png b/assets/voxygen/element/icons/feet.png new file mode 100644 index 0000000000..6aa78499fb --- /dev/null +++ b/assets/voxygen/element/icons/feet.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:003eeb041dd5cd61945c3f6c6bb54fecebbfb3d13a301d8a7786cc88df08af95 +size 974 diff --git a/assets/voxygen/element/icons/hands.png b/assets/voxygen/element/icons/hands.png new file mode 100644 index 0000000000..54156f1703 --- /dev/null +++ b/assets/voxygen/element/icons/hands.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43eba8f1c26e8211db134c22a8fe706558f9e2ea75a05db2a231745850f5f79e +size 1121 diff --git a/assets/voxygen/element/icons/head.png b/assets/voxygen/element/icons/head.png new file mode 100644 index 0000000000..afaefaf325 --- /dev/null +++ b/assets/voxygen/element/icons/head.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b1620570303bfcd672339b5f5b6460b2304d6c81d22cc0bf29865973c1fdf515 +size 1057 diff --git a/assets/voxygen/element/icons/legs.png b/assets/voxygen/element/icons/legs.png new file mode 100644 index 0000000000..169804cc10 --- /dev/null +++ b/assets/voxygen/element/icons/legs.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:34a8297f2434c36e95dbb9f9dffda318a2add3e1e0bde9dabbf6d986930a583b +size 959 diff --git a/assets/voxygen/element/icons/mainhand.png b/assets/voxygen/element/icons/mainhand.png new file mode 100644 index 0000000000..acb2159e6f --- /dev/null +++ b/assets/voxygen/element/icons/mainhand.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e6a942f3fbfa15c06cf547e05ef46bedb191e9f1192f1dfdd0e2051096dbd17 +size 608 diff --git a/assets/voxygen/element/icons/necklace.png b/assets/voxygen/element/icons/necklace.png new file mode 100644 index 0000000000..b410d9f49a --- /dev/null +++ b/assets/voxygen/element/icons/necklace.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8224a574cf07306249973ca3d8e6c31a43c0f3265dacc209bd824d71505b36a8 +size 741 diff --git a/assets/voxygen/element/icons/offhand.png b/assets/voxygen/element/icons/offhand.png new file mode 100644 index 0000000000..a5ba86c30e --- /dev/null +++ b/assets/voxygen/element/icons/offhand.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0ea7336a0124db8df3b67c54b6db07373e141561589dcfc3d919b3b75a81efec +size 592 diff --git a/assets/voxygen/element/icons/ring.png b/assets/voxygen/element/icons/ring.png new file mode 100644 index 0000000000..d07b37cb5b --- /dev/null +++ b/assets/voxygen/element/icons/ring.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0574ad5eb1fec7b7984cf97cd584749943f2a3a65f707aee4ec10dbb630059f7 +size 2986 diff --git a/assets/voxygen/element/icons/shoulders.png b/assets/voxygen/element/icons/shoulders.png new file mode 100644 index 0000000000..eda0f24c51 --- /dev/null +++ b/assets/voxygen/element/icons/shoulders.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc6ce9769c94de6bea3533e8840c413e197472ae8e9ce57528fe2641a230eb26 +size 927 diff --git a/assets/voxygen/element/icons/tabard.png b/assets/voxygen/element/icons/tabard.png new file mode 100644 index 0000000000..783301dd6e --- /dev/null +++ b/assets/voxygen/element/icons/tabard.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d66d4191fa9166aebedafbc45723d0262cfab4fc5076f89f4ce775248d0a7bea +size 1056 diff --git a/voxygen/src/hud/bag.rs b/voxygen/src/hud/bag.rs index 5fa7f565d7..2f0021174e 100644 --- a/voxygen/src/hud/bag.rs +++ b/voxygen/src/hud/bag.rs @@ -56,7 +56,7 @@ widget_ids! { chest_bg, shoulder_bg, hands_bg, - pants_bg, + legs_bg, belt_bg, ring_r_bg, ring_l_bg, @@ -65,6 +65,20 @@ widget_ids! { tabard_bg, mainhand_bg, offhand_bg, + head_ico, + neck_ico, + chest_ico, + shoulder_ico, + hands_ico, + legs_ico, + belt_ico, + ring_r_ico, + ring_l_ico, + foot_ico, + back_ico, + tabard_ico, + mainhand_ico, + offhand_ico, } } @@ -278,91 +292,168 @@ impl<'a> Widget for Bag<'a> { .mid_top_with_margin_on(state.ids.bg_frame, 60.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.head_bg, ui); + Button::image(self.imgs.head_bg) + .w_h(32.0, 40.0) + .image_color(UI_MAIN) + .middle_of(state.ids.head_bg) + .with_tooltip(self.tooltip_manager, "Helmet", "", &item_tooltip) + .set(state.ids.head_ico, ui); //Necklace Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .mid_bottom_with_margin_on(state.ids.head_bg, -55.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.neck_bg, ui); + Button::image(self.imgs.necklace_bg) + .w_h(40.0, 31.0) + .image_color(UI_MAIN) + .middle_of(state.ids.neck_bg) + .with_tooltip(self.tooltip_manager, "Neck", "", &item_tooltip) + .set(state.ids.neck_ico, ui); //Chest Image::new(self.imgs.armor_slot) // different graphics for empty/non empty .w_h(85.0, 85.0) .mid_bottom_with_margin_on(state.ids.neck_bg, -95.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.chest_bg, ui); - Button::image(self.imgs.skull) - .w_h(80.0, 80.0) + Button::image(self.imgs.chest_bg) + .w_h(64.0, 42.0) + .image_color(UI_MAIN) .middle_of(state.ids.chest_bg) - .set(state.ids.test, ui); + .with_tooltip(self.tooltip_manager, "Chest", "", &item_tooltip) + .set(state.ids.chest_ico, ui); //Shoulder Image::new(self.imgs.armor_slot) .w_h(70.0, 70.0) .bottom_left_with_margins_on(state.ids.chest_bg, 0.0, -80.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.shoulder_bg, ui); + Button::image(self.imgs.shoulders_bg) + .w_h(60.0, 36.0) + .image_color(UI_MAIN) + .middle_of(state.ids.shoulder_bg) + .with_tooltip(self.tooltip_manager, "Shoulders", "", &item_tooltip) + .set(state.ids.shoulder_ico, ui); //Hands Image::new(self.imgs.armor_slot) .w_h(70.0, 70.0) .bottom_right_with_margins_on(state.ids.chest_bg, 0.0, -80.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.hands_bg, ui); + Button::image(self.imgs.hands_bg) + .w_h(55.0, 60.0) + .image_color(UI_MAIN) + .middle_of(state.ids.hands_bg) + .with_tooltip(self.tooltip_manager, "Hands", "", &item_tooltip) + .set(state.ids.hands_ico, ui); //Belt Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .mid_bottom_with_margin_on(state.ids.chest_bg, -55.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.belt_bg, ui); - //Pants + Button::image(self.imgs.belt_bg) + .w_h(40.0, 23.0) + .image_color(UI_MAIN) + .middle_of(state.ids.belt_bg) + .with_tooltip(self.tooltip_manager, "Belt", "", &item_tooltip) + .set(state.ids.belt_ico, ui); + //Legs Image::new(self.imgs.armor_slot) .w_h(85.0, 85.0) .mid_bottom_with_margin_on(state.ids.belt_bg, -95.0) .color(Some(UI_HIGHLIGHT_0)) - .set(state.ids.pants_bg, ui); + .set(state.ids.legs_bg, ui); + Button::image(self.imgs.legs_bg) + .w_h(48.0, 70.0) + .image_color(UI_MAIN) + .middle_of(state.ids.legs_bg) + .with_tooltip(self.tooltip_manager, "Legs", "", &item_tooltip) + .set(state.ids.legs_ico, ui); //Ring-L Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .bottom_right_with_margins_on(state.ids.shoulder_bg, -55.0, 0.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.ring_l_bg, ui); + Button::image(self.imgs.ring_l_bg) + .w_h(36.0, 40.0) + .image_color(UI_MAIN) + .middle_of(state.ids.ring_l_bg) + .with_tooltip(self.tooltip_manager, "Left Ring", "", &item_tooltip) + .set(state.ids.ring_l_ico, ui); //Ring-R Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .bottom_left_with_margins_on(state.ids.hands_bg, -55.0, 0.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.ring_r_bg, ui); + Button::image(self.imgs.ring_r_bg) + .w_h(36.0, 40.0) + .image_color(UI_MAIN) + .middle_of(state.ids.ring_r_bg) + .with_tooltip(self.tooltip_manager, "Right Ring", "", &item_tooltip) + .set(state.ids.ring_r_ico, ui); //Back Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .down_from(state.ids.ring_l_bg, 10.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.back_bg, ui); + Button::image(self.imgs.back_bg) + .w_h(33.0, 40.0) + .image_color(UI_MAIN) + .middle_of(state.ids.back_bg) + .with_tooltip(self.tooltip_manager, "Back", "", &item_tooltip) + .set(state.ids.back_ico, ui); //Foot Image::new(self.imgs.armor_slot) .w_h(45.0, 45.0) .down_from(state.ids.ring_r_bg, 10.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.foot_bg, ui); - + Button::image(self.imgs.feet_bg) + .w_h(32.0, 40.0) + .image_color(UI_MAIN) + .middle_of(state.ids.foot_bg) + .with_tooltip(self.tooltip_manager, "Feet", "", &item_tooltip) + .set(state.ids.foot_ico, ui); //Tabard - Image::new(self.imgs.armor_slot) .w_h(70.0, 70.0) .top_right_with_margins_on(state.ids.bg_frame, 80.5, 53.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.tabard_bg, ui); - + Button::image(self.imgs.tabard_bg) + .w_h(60.0, 60.0) + .image_color(UI_MAIN) + .middle_of(state.ids.tabard_bg) + .with_tooltip(self.tooltip_manager, "Tabard", "", &item_tooltip) + .set(state.ids.tabard_ico, ui); //Mainhand/Left-Slot Image::new(self.imgs.armor_slot) .w_h(85.0, 85.0) .bottom_right_with_margins_on(state.ids.back_bg, -95.0, 0.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.mainhand_bg, ui); + Button::image(self.imgs.mainhand_bg) + .w_h(75.0, 75.0) + .image_color(UI_MAIN) + .middle_of(state.ids.mainhand_bg) + .with_tooltip(self.tooltip_manager, "Mainhand", "", &item_tooltip) + .set(state.ids.mainhand_ico, ui); //Offhand/Right-Slot Image::new(self.imgs.armor_slot) .w_h(85.0, 85.0) .bottom_left_with_margins_on(state.ids.foot_bg, -95.0, 0.0) .color(Some(UI_HIGHLIGHT_0)) .set(state.ids.offhand_bg, ui); + Button::image(self.imgs.offhand_bg) + .w_h(75.0, 75.0) + .image_color(UI_MAIN) + .middle_of(state.ids.offhand_bg) + .with_tooltip(self.tooltip_manager, "Offhand", "", &item_tooltip) + .set(state.ids.offhand_ico, ui); } else { // Stats // Title diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index bcdae37b80..33f2697a8c 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -185,21 +185,6 @@ image_ids! { // Charwindow xp_charwindow: "voxygen.element.frames.xp_charwindow", divider: "voxygen.element.frames.divider_charwindow", - head_bg: "voxygen.element.icons.head", - shoulders_bg: "voxygen.element.icons.shoulders", - hands_bg: "voxygen.element.icons.hands", - belt_bg: "voxygen.element.icons.belt", - legs_bg: "voxygen.element.icons.legs", - feet_bg: "voxygen.element.icons.feet", - ring_r_bg: "voxygen.element.icons.ring", - ring_l_bg: "voxygen.element.icons.ring", - tabard_bg: "voxygen.element.icons.tabard", - chest_bg: "voxygen.element.icons.chest", - back_bg: "voxygen.element.icons.back", - gem_bg: "voxygen.element.icons.gem", - necklace_bg: "voxygen.element.icons.necklace", - mainhand_bg: "voxygen.element.icons.mainhand", - offhand_bg: "voxygen.element.icons.offhand", // Close button close_button: "voxygen.element.buttons.x", @@ -258,6 +243,20 @@ image_ids! { inv_slots: "voxygen.element.misc_bg.inv_slots", inv_runes: "voxygen.element.misc_bg.inv_runes", armor_slot: "voxygen.element.buttons.armor_slot", + head_bg: "voxygen.element.icons.head", + shoulders_bg: "voxygen.element.icons.shoulders", + hands_bg: "voxygen.element.icons.hands", + belt_bg: "voxygen.element.icons.belt", + legs_bg: "voxygen.element.icons.legs", + feet_bg: "voxygen.element.icons.feet", + ring_r_bg: "voxygen.element.icons.ring", + ring_l_bg: "voxygen.element.icons.ring", + tabard_bg: "voxygen.element.icons.tabard", + chest_bg: "voxygen.element.icons.chest", + back_bg: "voxygen.element.icons.back", + necklace_bg: "voxygen.element.icons.necklace", + mainhand_bg: "voxygen.element.icons.mainhand", + offhand_bg: "voxygen.element.icons.offhand",