From 040e1a7535157feb7d185d22eba84e3fbc1a7c9f Mon Sep 17 00:00:00 2001 From: Monty Marz Date: Tue, 26 Nov 2019 22:39:07 +0000 Subject: [PATCH] Fix map being inverted and indicator positioning --- assets/voxygen/background/map.png | 4 +-- .../element/buttons/indicator_mmap.vox | 3 ++ .../voxel/figure/accessory/elf/headband-0.vox | 3 ++ .../voxel/figure/accessory/elf/warpaint-0.vox | 3 -- .../voxel/figure/accessory/human/earring.vox | 3 -- .../voxel/figure/hair/dwarf/female-2.vox | 3 ++ .../voxel/figure/hair/dwarf/female-3.vox | 3 ++ .../voxygen/voxel/humanoid_head_manifest.ron | 6 ++-- common/src/comp/body/humanoid.rs | 2 +- voxygen/src/hud/img_ids.rs | 2 +- voxygen/src/hud/map.rs | 2 +- voxygen/src/hud/minimap.rs | 29 ++++++++++++------- 12 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 assets/voxygen/element/buttons/indicator_mmap.vox create mode 100644 assets/voxygen/voxel/figure/accessory/elf/headband-0.vox delete mode 100644 assets/voxygen/voxel/figure/accessory/elf/warpaint-0.vox delete mode 100644 assets/voxygen/voxel/figure/accessory/human/earring.vox create mode 100644 assets/voxygen/voxel/figure/hair/dwarf/female-2.vox create mode 100644 assets/voxygen/voxel/figure/hair/dwarf/female-3.vox diff --git a/assets/voxygen/background/map.png b/assets/voxygen/background/map.png index d1241c2522..7e284d0568 100644 --- a/assets/voxygen/background/map.png +++ b/assets/voxygen/background/map.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2197d74e40e86713fbebb5a6492be113e41db938176a67be97dcbc67e88884dd -size 785322 +oid sha256:664f74c2b92f6319aa30cd0775af6976c629a8d9f521febac0748bacb432c3f3 +size 747328 diff --git a/assets/voxygen/element/buttons/indicator_mmap.vox b/assets/voxygen/element/buttons/indicator_mmap.vox new file mode 100644 index 0000000000..67607ba009 --- /dev/null +++ b/assets/voxygen/element/buttons/indicator_mmap.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a3cb706889fac602ad801a3e5d06c607db30b4519d04b2881016897e6af755b +size 56692 diff --git a/assets/voxygen/voxel/figure/accessory/elf/headband-0.vox b/assets/voxygen/voxel/figure/accessory/elf/headband-0.vox new file mode 100644 index 0000000000..923a803745 --- /dev/null +++ b/assets/voxygen/voxel/figure/accessory/elf/headband-0.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a6f1d5adf62ce3acce2907ccaa6814ee9609ab6c3f511898d8ca03a4ce43ba35 +size 55596 diff --git a/assets/voxygen/voxel/figure/accessory/elf/warpaint-0.vox b/assets/voxygen/voxel/figure/accessory/elf/warpaint-0.vox deleted file mode 100644 index 8ead89038e..0000000000 --- a/assets/voxygen/voxel/figure/accessory/elf/warpaint-0.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:722b4f8936664fcd2c612bd827583c46f91d4581bb51c310fd5b04fff34c421b -size 55604 diff --git a/assets/voxygen/voxel/figure/accessory/human/earring.vox b/assets/voxygen/voxel/figure/accessory/human/earring.vox deleted file mode 100644 index 5b735c5742..0000000000 --- a/assets/voxygen/voxel/figure/accessory/human/earring.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec7515017c5d74d74c48b17efa5367708ae7e3fbcab26fc7d5bc8550efc61ef5 -size 55596 diff --git a/assets/voxygen/voxel/figure/hair/dwarf/female-2.vox b/assets/voxygen/voxel/figure/hair/dwarf/female-2.vox new file mode 100644 index 0000000000..78b4830f99 --- /dev/null +++ b/assets/voxygen/voxel/figure/hair/dwarf/female-2.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8491baad5fdb761e2fe6bbe9f87de4d1c18c5d38be8a3518621cca928efa0265 +size 59131 diff --git a/assets/voxygen/voxel/figure/hair/dwarf/female-3.vox b/assets/voxygen/voxel/figure/hair/dwarf/female-3.vox new file mode 100644 index 0000000000..37e802802e --- /dev/null +++ b/assets/voxygen/voxel/figure/hair/dwarf/female-3.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:126fcd7f2a62d7629e33f63eb309ae27f92e712146b09e5ac3e1345a170958e6 +size 59559 diff --git a/assets/voxygen/voxel/humanoid_head_manifest.ron b/assets/voxygen/voxel/humanoid_head_manifest.ron index 4d9139d5d8..c599e1dfbc 100644 --- a/assets/voxygen/voxel/humanoid_head_manifest.ron +++ b/assets/voxygen/voxel/humanoid_head_manifest.ron @@ -151,7 +151,7 @@ beard: [None], accessory: [ None, - Some(("figure.accessory.elf.warpaint-0", (6, 9, 5))),] + Some(("figure.accessory.elf.headband-0", (6, 9, 4))),] ), (Dwarf, Male): ( offset: (-6.0, -4.5, -6.0), @@ -195,7 +195,9 @@ eyes: ("figure.eyes.dwarf.female-0", (1, 10, 2)), hair: [ Some(("figure.hair.dwarf.female-0", (-9, -9, -7))), - Some(("figure.hair.dwarf.female-1", (-9, -9, -7))), + Some(("figure.hair.dwarf.female-1", (-9, -9, -7))), + Some(("figure.hair.dwarf.female-2", (-9, -9, -7))), + Some(("figure.hair.dwarf.female-3", (-9, -9, -7))), ], beard: [None], accessory: [ diff --git a/common/src/comp/body/humanoid.rs b/common/src/comp/body/humanoid.rs index 53be221bf8..81cf41b23d 100644 --- a/common/src/comp/body/humanoid.rs +++ b/common/src/comp/body/humanoid.rs @@ -332,7 +332,7 @@ impl Race { match (self, body_type) { (Race::Danari, BodyType::Female) => 2, (Race::Danari, BodyType::Male) => 2, - (Race::Dwarf, BodyType::Female) => 2, + (Race::Dwarf, BodyType::Female) => 4, (Race::Dwarf, BodyType::Male) => 3, (Race::Elf, BodyType::Female) => 21, (Race::Elf, BodyType::Male) => 4, diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index 37c4200d31..eee2ff247c 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -59,7 +59,7 @@ image_ids! { // MiniMap mmap_frame: "voxygen.element.frames.mmap", mmap_frame_closed: "voxygen.element.frames.mmap_closed", - indicator_mmap: "voxygen.voxel.figure.accessory.human.earring", + indicator_mmap: "voxygen.element.buttons.indicator_mmap", // Missing: Buff Frame Animation .gif ?! we could do animation in ui.maintain, or in shader? window_frame: "voxygen.element.frames.window2", diff --git a/voxygen/src/hud/map.rs b/voxygen/src/hud/map.rs index 4178a0e84f..0af0330e8b 100644 --- a/voxygen/src/hud/map.rs +++ b/voxygen/src/hud/map.rs @@ -157,7 +157,7 @@ impl<'a> Widget for Map<'a> { let worldsize = 32768.0; // TODO This has to get the actual world size and not be hardcoded let x = player_pos.x as f64 / worldsize * 700.0; - let y = (1.0 - player_pos.y as f64 / worldsize) * 700.0; + let y = (/*1.0 -*/player_pos.y as f64 / worldsize) * 700.0; // Indicator Image::new(self.imgs.map_indicator) .bottom_left_with_margins_on(state.ids.grid, y, x - (12.0 * 1.4) / 2.0) diff --git a/voxygen/src/hud/minimap.rs b/voxygen/src/hud/minimap.rs index 43641f79ef..09893c2eba 100644 --- a/voxygen/src/hud/minimap.rs +++ b/voxygen/src/hud/minimap.rs @@ -89,17 +89,17 @@ impl<'a> Widget for MiniMap<'a> { if self.show.mini_map { Image::new(self.imgs.mmap_frame) - .w_h(100.0 * 2.0, 100.0 * 2.0) + .w_h(100.0 * 4.0, 100.0 * 4.0) .top_right_with_margins_on(ui.window, 5.0, 5.0) .set(state.ids.mmap_frame, ui); - Rectangle::fill_with([92.0 * 2.0, 82.0 * 2.0], color::TRANSPARENT) - .mid_top_with_margin_on(state.ids.mmap_frame, 13.0 * 2.0 + 2.0) + Rectangle::fill_with([92.0 * 4.0, 82.0 * 4.0], color::TRANSPARENT) + .mid_top_with_margin_on(state.ids.mmap_frame, 13.0 * 4.0 + 4.0) .set(state.ids.mmap_frame_bg, ui); // Map Image Image::new(/*self.world_map*/ self.imgs.map_placeholder) .middle_of(state.ids.mmap_frame_bg) - .w_h(92.0 * 2.0, 82.0 * 2.0) + .w_h(92.0 * 4.0, 82.0 * 4.0) .parent(state.ids.mmap_frame_bg) .set(state.ids.grid, ui); // Coordinates @@ -112,12 +112,12 @@ impl<'a> Widget for MiniMap<'a> { .map_or(Vec3::zero(), |pos| pos.0); let worldsize = 32768.0; // TODO This has to get the actual world size and not be hardcoded - let x = player_pos.x as f64 / worldsize * 92.0 * 2.0; - let y = (1.0 - player_pos.y as f64 / worldsize) * 82.0 * 2.0; + let x = player_pos.x as f64 / worldsize * 92.0 * 4.0; + let y = (/*1.0X-*/player_pos.y as f64 / worldsize) * 82.0 * 4.0; // Indicator Image::new(self.imgs.indicator_mmap) - .bottom_left_with_margins_on(state.ids.grid, y, x - 2.5) - .w_h(5.0, 5.0) + .bottom_left_with_margins_on(state.ids.grid, y, x - 5.0) + .w_h(10.0, 10.0) .floating(true) .parent(ui.window) .set(state.ids.indicator, ui); @@ -133,7 +133,11 @@ impl<'a> Widget for MiniMap<'a> { } else { self.imgs.mmap_closed }) - .w_h(100.0 * 0.2, 100.0 * 0.2) + .wh(if self.show.mini_map { + [100.0 * 0.4; 2] + } else { + [100.0 * 0.2; 2] + }) .hover_image(if self.show.mini_map { self.imgs.mmap_open_hover } else { @@ -207,8 +211,11 @@ impl<'a> Widget for MiniMap<'a> { // Title match self.client.current_chunk() { Some(chunk) => Text::new(chunk.meta().name()) - .mid_top_with_margin_on(state.ids.mmap_frame, 0.0) - .font_size(18) + .mid_top_with_margin_on( + state.ids.mmap_frame, + if self.show.mini_map { 6.0 } else { 0.0 }, + ) + .font_size(if self.show.mini_map { 30 } else { 18 }) .font_id(self.fonts.cyri) .color(TEXT_COLOR) .set(state.ids.mmap_location, ui),