From 2e7984ebc3c0a72dbda9ad3b4e94531f47659fb4 Mon Sep 17 00:00:00 2001 From: Forest Anderson Date: Sat, 18 May 2019 19:03:13 +0000 Subject: [PATCH] Char selection Former-commit-id: 8da211b00dcd9a550a8f46e79164ece8f5c193e5 --- assets/voxygen/background/bg_creation.png | 3 - assets/voxygen/background/bg_selection.png | 3 - assets/voxygen/element/frames/divider.vox | 3 + assets/voxygen/element/frames/mmap.png | 3 - assets/voxygen/element/frames/selection.png | 3 - assets/voxygen/element/frames/selection.vox | 3 + .../element/frames/selection_frame.vox | 3 + .../voxygen/element/frames/server_frame.vox | 3 + assets/voxygen/element/frames/settings.png | 3 - assets/voxygen/element/frames/window.png | 3 - assets/voxygen/element/frames/window_4.vox | 3 + assets/voxygen/element/frames/window_map.png | 3 - assets/voxygen/element/frames/window_old.png | 3 - .../{belt.vox => armor/belt/belt_dark.vox} | 0 .../voxygen/voxel/armor/chest/chest_blue.vox | 3 + .../voxygen/voxel/armor/chest/chest_brown.vox | 3 + .../{chest.vox => armor/chest/chest_dark.vox} | 0 .../voxygen/voxel/armor/chest/chest_green.vox | 3 + .../voxel/armor/chest/chest_orange.vox | 3 + .../{foot.vox => armor/foot/foot_dark.vox} | 0 .../voxygen/voxel/armor/pants/pants_blue.vox | 3 + .../voxygen/voxel/armor/pants/pants_brown.vox | 3 + .../{pants.vox => armor/pants/pants_dark.vox} | 0 .../voxygen/voxel/armor/pants/pants_green.vox | 3 + .../voxel/armor/pants/pants_orange.vox | 3 + .../voxel/armor/shoulder/shoulder_l_brown.vox | 3 + .../voxel/armor/shoulder/shoulder_r_brown.vox | 3 + assets/voxygen/voxel/body.vox | 3 - assets/voxygen/voxel/dragon_body.vox | 3 - assets/voxygen/voxel/dragon_lfoot.vox | 3 - assets/voxygen/voxel/dragon_rfoot.vox | 3 - assets/voxygen/voxel/dragon_tail.vox | 3 - assets/voxygen/voxel/dragon_wingL_in.vox | 3 - assets/voxygen/voxel/dragon_wingL_out.vox | 3 - assets/voxygen/voxel/dragon_wingR_in.vox | 3 - assets/voxygen/voxel/dragon_wingR_out.vox | 3 - assets/voxygen/voxel/dragonhead.vox | 3 - assets/voxygen/voxel/elf/belt.vox | 3 - assets/voxygen/voxel/elf/chest.vox | 3 - assets/voxygen/voxel/elf/foot.vox | 3 - assets/voxygen/voxel/elf/hand.vox | 3 - assets/voxygen/voxel/elf/head.vox | 3 - assets/voxygen/voxel/elf/pants.vox | 3 - assets/voxygen/voxel/elf/sword.vox | 3 - .../voxygen/voxel/figure/body/belt_female.vox | 3 + .../voxygen/voxel/figure/body/belt_male.vox | 3 + .../voxel/figure/body/chest_female.vox | 3 + .../voxygen/voxel/figure/body/chest_male.vox | 3 + assets/voxygen/voxel/figure/body/foot.vox | 3 + assets/voxygen/voxel/figure/body/hand.vox | 3 + .../voxel/figure/body/pants_female.vox | 3 + .../voxygen/voxel/figure/body/pants_male.vox | 3 + .../eyes/eyes_female_1.vox} | 0 .../voxygen/voxel/figure/eyes/eyes_male_1.vox | 3 + .../hair/human/hair_human_female_1.vox} | 0 assets/voxygen/voxel/figure/head.vox | 3 + .../{head2.vox => figure/head/Human/head.vox} | 0 .../voxel/{head.vox => figure/head_test1.vox} | 0 .../{head4.vox => figure/head_test2.vox} | 0 assets/voxygen/voxel/fixture/selection_bg.vox | 3 + assets/voxygen/voxel/foot_BL.vox | 3 - assets/voxygen/voxel/foot_BR.vox | 3 - assets/voxygen/voxel/foot_FL.vox | 3 - assets/voxygen/voxel/foot_FR.vox | 3 - assets/voxygen/voxel/hand.vox | 3 - assets/voxygen/voxel/lionhead.vox | 3 - .../voxel/{ => npc/pig_purple}/pigchest.vox | 0 .../voxel/{ => npc/pig_purple}/pighead.vox | 0 .../voxel/{ => npc/pig_purple}/pigleg_l.vox | 0 .../voxel/{ => npc/pig_purple}/pigleg_r.vox | 0 assets/voxygen/voxel/{ => object}/glider.vox | 0 assets/voxygen/voxel/sabremale.vox | 3 - assets/voxygen/voxel/shoulder_l.vox | 3 - assets/voxygen/voxel/shoulder_r.vox | 3 - assets/voxygen/voxel/shoulders.vox | 3 - assets/voxygen/voxel/sword.vox | 3 - assets/voxygen/voxel/{ => weapon/axe}/axe.vox | 0 .../voxel/weapon/sword/sword_rusty_2h.vox | 3 + .../sword/sword_wood_2h.vox} | 0 common/src/comp/actor.rs | 53 +- common/src/lib.rs | 1 + server/src/lib.rs | 1 - voxygen/src/anim/fixture/mod.rs | 40 + voxygen/src/anim/mod.rs | 2 + voxygen/src/hud/esc_menu.rs | 4 +- voxygen/src/hud/img_ids.rs | 11 - voxygen/src/hud/mod.rs | 4 +- voxygen/src/menu/char_selection/mod.rs | 12 +- voxygen/src/menu/char_selection/scene.rs | 22 +- voxygen/src/menu/char_selection/ui.rs | 2256 ++++++----------- voxygen/src/menu/main/ui.rs | 1 + voxygen/src/scene/camera.rs | 2 +- voxygen/src/scene/figure.rs | 57 +- voxygen/src/scene/figure/figure.rs | 2 +- voxygen/src/scene/figure/figurequad.rs | 14 +- 95 files changed, 1008 insertions(+), 1663 deletions(-) delete mode 100644 assets/voxygen/background/bg_creation.png delete mode 100644 assets/voxygen/background/bg_selection.png create mode 100644 assets/voxygen/element/frames/divider.vox delete mode 100644 assets/voxygen/element/frames/mmap.png delete mode 100644 assets/voxygen/element/frames/selection.png create mode 100644 assets/voxygen/element/frames/selection.vox create mode 100644 assets/voxygen/element/frames/selection_frame.vox create mode 100644 assets/voxygen/element/frames/server_frame.vox delete mode 100644 assets/voxygen/element/frames/settings.png delete mode 100644 assets/voxygen/element/frames/window.png create mode 100644 assets/voxygen/element/frames/window_4.vox delete mode 100644 assets/voxygen/element/frames/window_map.png delete mode 100644 assets/voxygen/element/frames/window_old.png rename assets/voxygen/voxel/{belt.vox => armor/belt/belt_dark.vox} (100%) create mode 100644 assets/voxygen/voxel/armor/chest/chest_blue.vox create mode 100644 assets/voxygen/voxel/armor/chest/chest_brown.vox rename assets/voxygen/voxel/{chest.vox => armor/chest/chest_dark.vox} (100%) create mode 100644 assets/voxygen/voxel/armor/chest/chest_green.vox create mode 100644 assets/voxygen/voxel/armor/chest/chest_orange.vox rename assets/voxygen/voxel/{foot.vox => armor/foot/foot_dark.vox} (100%) create mode 100644 assets/voxygen/voxel/armor/pants/pants_blue.vox create mode 100644 assets/voxygen/voxel/armor/pants/pants_brown.vox rename assets/voxygen/voxel/{pants.vox => armor/pants/pants_dark.vox} (100%) create mode 100644 assets/voxygen/voxel/armor/pants/pants_green.vox create mode 100644 assets/voxygen/voxel/armor/pants/pants_orange.vox create mode 100644 assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox create mode 100644 assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox delete mode 100644 assets/voxygen/voxel/body.vox delete mode 100644 assets/voxygen/voxel/dragon_body.vox delete mode 100644 assets/voxygen/voxel/dragon_lfoot.vox delete mode 100644 assets/voxygen/voxel/dragon_rfoot.vox delete mode 100644 assets/voxygen/voxel/dragon_tail.vox delete mode 100644 assets/voxygen/voxel/dragon_wingL_in.vox delete mode 100644 assets/voxygen/voxel/dragon_wingL_out.vox delete mode 100644 assets/voxygen/voxel/dragon_wingR_in.vox delete mode 100644 assets/voxygen/voxel/dragon_wingR_out.vox delete mode 100644 assets/voxygen/voxel/dragonhead.vox delete mode 100644 assets/voxygen/voxel/elf/belt.vox delete mode 100644 assets/voxygen/voxel/elf/chest.vox delete mode 100644 assets/voxygen/voxel/elf/foot.vox delete mode 100644 assets/voxygen/voxel/elf/hand.vox delete mode 100644 assets/voxygen/voxel/elf/head.vox delete mode 100644 assets/voxygen/voxel/elf/pants.vox delete mode 100644 assets/voxygen/voxel/elf/sword.vox create mode 100644 assets/voxygen/voxel/figure/body/belt_female.vox create mode 100644 assets/voxygen/voxel/figure/body/belt_male.vox create mode 100644 assets/voxygen/voxel/figure/body/chest_female.vox create mode 100644 assets/voxygen/voxel/figure/body/chest_male.vox create mode 100644 assets/voxygen/voxel/figure/body/foot.vox create mode 100644 assets/voxygen/voxel/figure/body/hand.vox create mode 100644 assets/voxygen/voxel/figure/body/pants_female.vox create mode 100644 assets/voxygen/voxel/figure/body/pants_male.vox rename assets/voxygen/voxel/{eyes.vox => figure/eyes/eyes_female_1.vox} (100%) create mode 100644 assets/voxygen/voxel/figure/eyes/eyes_male_1.vox rename assets/voxygen/voxel/{hair.vox => figure/hair/human/hair_human_female_1.vox} (100%) create mode 100644 assets/voxygen/voxel/figure/head.vox rename assets/voxygen/voxel/{head2.vox => figure/head/Human/head.vox} (100%) rename assets/voxygen/voxel/{head.vox => figure/head_test1.vox} (100%) rename assets/voxygen/voxel/{head4.vox => figure/head_test2.vox} (100%) create mode 100644 assets/voxygen/voxel/fixture/selection_bg.vox delete mode 100644 assets/voxygen/voxel/foot_BL.vox delete mode 100644 assets/voxygen/voxel/foot_BR.vox delete mode 100644 assets/voxygen/voxel/foot_FL.vox delete mode 100644 assets/voxygen/voxel/foot_FR.vox delete mode 100644 assets/voxygen/voxel/hand.vox delete mode 100644 assets/voxygen/voxel/lionhead.vox rename assets/voxygen/voxel/{ => npc/pig_purple}/pigchest.vox (100%) rename assets/voxygen/voxel/{ => npc/pig_purple}/pighead.vox (100%) rename assets/voxygen/voxel/{ => npc/pig_purple}/pigleg_l.vox (100%) rename assets/voxygen/voxel/{ => npc/pig_purple}/pigleg_r.vox (100%) rename assets/voxygen/voxel/{ => object}/glider.vox (100%) delete mode 100644 assets/voxygen/voxel/sabremale.vox delete mode 100644 assets/voxygen/voxel/shoulder_l.vox delete mode 100644 assets/voxygen/voxel/shoulder_r.vox delete mode 100644 assets/voxygen/voxel/shoulders.vox delete mode 100644 assets/voxygen/voxel/sword.vox rename assets/voxygen/voxel/{ => weapon/axe}/axe.vox (100%) create mode 100644 assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox rename assets/voxygen/voxel/{Wood Training 2h.vox => weapon/sword/sword_wood_2h.vox} (100%) create mode 100644 voxygen/src/anim/fixture/mod.rs diff --git a/assets/voxygen/background/bg_creation.png b/assets/voxygen/background/bg_creation.png deleted file mode 100644 index a1a4a73585..0000000000 --- a/assets/voxygen/background/bg_creation.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:89da6c2f598b230f9b6baeaf550dc2fd9eaf640bcc5d7d7f2f54bf3d0f779b94 -size 1549610 diff --git a/assets/voxygen/background/bg_selection.png b/assets/voxygen/background/bg_selection.png deleted file mode 100644 index 5be614987b..0000000000 --- a/assets/voxygen/background/bg_selection.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1d5c7e92c8cc47f4d68e848c0ee52b56cca78a8f4c502ae016d3e9f8afd2f1df -size 2197669 diff --git a/assets/voxygen/element/frames/divider.vox b/assets/voxygen/element/frames/divider.vox new file mode 100644 index 0000000000..e16d02ee05 --- /dev/null +++ b/assets/voxygen/element/frames/divider.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d6ffb2e8357d6365a35c33715861b7922baa9eebb32f5285f78c72b9c42706d5 +size 1384 diff --git a/assets/voxygen/element/frames/mmap.png b/assets/voxygen/element/frames/mmap.png deleted file mode 100644 index 3286b739f8..0000000000 --- a/assets/voxygen/element/frames/mmap.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cd00503350dca9695df14035ce6ea81406114603de39edba61006d2f4300467 -size 14814 diff --git a/assets/voxygen/element/frames/selection.png b/assets/voxygen/element/frames/selection.png deleted file mode 100644 index 31781a00df..0000000000 --- a/assets/voxygen/element/frames/selection.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ccc91f9ce4cc2dc44132ed9d7b1eacd763c8817a97bd771dd46af960b961a93 -size 5734 diff --git a/assets/voxygen/element/frames/selection.vox b/assets/voxygen/element/frames/selection.vox new file mode 100644 index 0000000000..dece7feb54 --- /dev/null +++ b/assets/voxygen/element/frames/selection.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e800abd210e23b0ba3125929dfbaa191de75ee1f6c54e2d9634c56192023ba2 +size 55156 diff --git a/assets/voxygen/element/frames/selection_frame.vox b/assets/voxygen/element/frames/selection_frame.vox new file mode 100644 index 0000000000..b8c6bc32ae --- /dev/null +++ b/assets/voxygen/element/frames/selection_frame.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43867e582d418ed695eed2802729b6038e96484473c4b01840256119313c4a36 +size 2288 diff --git a/assets/voxygen/element/frames/server_frame.vox b/assets/voxygen/element/frames/server_frame.vox new file mode 100644 index 0000000000..a7b0744a2d --- /dev/null +++ b/assets/voxygen/element/frames/server_frame.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:602bbe3f01982feda6c79da82b5000ed151da1e5e59be0f75f19c9bc7b86af66 +size 1624 diff --git a/assets/voxygen/element/frames/settings.png b/assets/voxygen/element/frames/settings.png deleted file mode 100644 index f684bb4162..0000000000 --- a/assets/voxygen/element/frames/settings.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5da0c7e192cd126ef1f1d8a868cee31395000ef9a242cebe924e4fb91cd23af0 -size 19829 diff --git a/assets/voxygen/element/frames/window.png b/assets/voxygen/element/frames/window.png deleted file mode 100644 index 3bd6b4fa1d..0000000000 --- a/assets/voxygen/element/frames/window.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6de998c58d28a6659a31732d4a853d829d96111520d258b540a812b521d9312 -size 20431 diff --git a/assets/voxygen/element/frames/window_4.vox b/assets/voxygen/element/frames/window_4.vox new file mode 100644 index 0000000000..6f69e5b24b --- /dev/null +++ b/assets/voxygen/element/frames/window_4.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e679e7e2147fb31fc03f3fcc26bd174e2334d6f8f10bdbba143e0d2b3114e2c +size 2440 diff --git a/assets/voxygen/element/frames/window_map.png b/assets/voxygen/element/frames/window_map.png deleted file mode 100644 index b076f4a22f..0000000000 --- a/assets/voxygen/element/frames/window_map.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1f95efbb3159303ae832e63c4ad9d688112246dff74d5f6de6be81d281dfdce7 -size 19693 diff --git a/assets/voxygen/element/frames/window_old.png b/assets/voxygen/element/frames/window_old.png deleted file mode 100644 index 02bf90b2ff..0000000000 --- a/assets/voxygen/element/frames/window_old.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4ac89d87409afb1f805b232b87409b7c2d80f459a822e59a4b51e8b128826cfd -size 20803 diff --git a/assets/voxygen/voxel/belt.vox b/assets/voxygen/voxel/armor/belt/belt_dark.vox similarity index 100% rename from assets/voxygen/voxel/belt.vox rename to assets/voxygen/voxel/armor/belt/belt_dark.vox diff --git a/assets/voxygen/voxel/armor/chest/chest_blue.vox b/assets/voxygen/voxel/armor/chest/chest_blue.vox new file mode 100644 index 0000000000..8778ecaf86 --- /dev/null +++ b/assets/voxygen/voxel/armor/chest/chest_blue.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e1b3453b365b7ff0334056ae96ef608a40eca80c496b308e700b7e414b0d188b +size 45499 diff --git a/assets/voxygen/voxel/armor/chest/chest_brown.vox b/assets/voxygen/voxel/armor/chest/chest_brown.vox new file mode 100644 index 0000000000..5137985725 --- /dev/null +++ b/assets/voxygen/voxel/armor/chest/chest_brown.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c28ff938e48ef8f8bdb0a0dcac9293892e85e86771d9b3550288bc0b66bcfd4 +size 45499 diff --git a/assets/voxygen/voxel/chest.vox b/assets/voxygen/voxel/armor/chest/chest_dark.vox similarity index 100% rename from assets/voxygen/voxel/chest.vox rename to assets/voxygen/voxel/armor/chest/chest_dark.vox diff --git a/assets/voxygen/voxel/armor/chest/chest_green.vox b/assets/voxygen/voxel/armor/chest/chest_green.vox new file mode 100644 index 0000000000..3dc026bbda --- /dev/null +++ b/assets/voxygen/voxel/armor/chest/chest_green.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d46bec66b90a600f59958645380e3bdf38e907804027976831cddd121a48025 +size 45499 diff --git a/assets/voxygen/voxel/armor/chest/chest_orange.vox b/assets/voxygen/voxel/armor/chest/chest_orange.vox new file mode 100644 index 0000000000..79c82ae8e3 --- /dev/null +++ b/assets/voxygen/voxel/armor/chest/chest_orange.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eac9179aba843ac142ac2c1b77f2ce610dff958d02a401e95e0e152e1bc76a80 +size 2392 diff --git a/assets/voxygen/voxel/foot.vox b/assets/voxygen/voxel/armor/foot/foot_dark.vox similarity index 100% rename from assets/voxygen/voxel/foot.vox rename to assets/voxygen/voxel/armor/foot/foot_dark.vox diff --git a/assets/voxygen/voxel/armor/pants/pants_blue.vox b/assets/voxygen/voxel/armor/pants/pants_blue.vox new file mode 100644 index 0000000000..e71be2467f --- /dev/null +++ b/assets/voxygen/voxel/armor/pants/pants_blue.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38f8b00617bf5bb8c1e38cffe86193b9c5fd7d6b6e94ba08edf4b05cda0cd490 +size 1784 diff --git a/assets/voxygen/voxel/armor/pants/pants_brown.vox b/assets/voxygen/voxel/armor/pants/pants_brown.vox new file mode 100644 index 0000000000..0831094d07 --- /dev/null +++ b/assets/voxygen/voxel/armor/pants/pants_brown.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c967eece29977f89333f99ed4a9932dbc324a85ec319fad9d92c830c3ea8e6c5 +size 1784 diff --git a/assets/voxygen/voxel/pants.vox b/assets/voxygen/voxel/armor/pants/pants_dark.vox similarity index 100% rename from assets/voxygen/voxel/pants.vox rename to assets/voxygen/voxel/armor/pants/pants_dark.vox diff --git a/assets/voxygen/voxel/armor/pants/pants_green.vox b/assets/voxygen/voxel/armor/pants/pants_green.vox new file mode 100644 index 0000000000..9ad3704b8d --- /dev/null +++ b/assets/voxygen/voxel/armor/pants/pants_green.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:272b7a939e71d1d329b3ddb0d3cf48ca6c863e0c6ac888474b0d527fa40c2a72 +size 1784 diff --git a/assets/voxygen/voxel/armor/pants/pants_orange.vox b/assets/voxygen/voxel/armor/pants/pants_orange.vox new file mode 100644 index 0000000000..42db6ff10f --- /dev/null +++ b/assets/voxygen/voxel/armor/pants/pants_orange.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c80314b4cb4e8521ad382bc701500c3d3fdd2e85af414e74e827fe3abbb397fa +size 1784 diff --git a/assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox b/assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox new file mode 100644 index 0000000000..b1fe002c73 --- /dev/null +++ b/assets/voxygen/voxel/armor/shoulder/shoulder_l_brown.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90cfd08022ab22326585c7cd2b900bc75cc38c11b4166d67c058c40a747e0646 +size 44523 diff --git a/assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox b/assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox new file mode 100644 index 0000000000..77417c301a --- /dev/null +++ b/assets/voxygen/voxel/armor/shoulder/shoulder_r_brown.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a93c404d74aa798248789a2cb211a264117a7a50892ffabe5f002b736231e16 +size 44523 diff --git a/assets/voxygen/voxel/body.vox b/assets/voxygen/voxel/body.vox deleted file mode 100644 index 61f7cecae8..0000000000 --- a/assets/voxygen/voxel/body.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3348014fe86e550969f3cd3a51f4a16214807e217376dc7587512a359cf85bc4 -size 6984 diff --git a/assets/voxygen/voxel/dragon_body.vox b/assets/voxygen/voxel/dragon_body.vox deleted file mode 100644 index a2ea1ce0e3..0000000000 --- a/assets/voxygen/voxel/dragon_body.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:78bdf906376754410820b452d0f633da12afe6c72006a3d2374c333b97f2f24e -size 9540 diff --git a/assets/voxygen/voxel/dragon_lfoot.vox b/assets/voxygen/voxel/dragon_lfoot.vox deleted file mode 100644 index 3cac69eee8..0000000000 --- a/assets/voxygen/voxel/dragon_lfoot.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5539ccf18d75c218069e727d60d5472533913f9f737681af0ee158bc1cd810cd -size 1408 diff --git a/assets/voxygen/voxel/dragon_rfoot.vox b/assets/voxygen/voxel/dragon_rfoot.vox deleted file mode 100644 index b75aa53cc2..0000000000 --- a/assets/voxygen/voxel/dragon_rfoot.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7fd2369a9d9b871f2aa98bfc1013efd93b7ede91c0644b9025a27c34e92e03e1 -size 1408 diff --git a/assets/voxygen/voxel/dragon_tail.vox b/assets/voxygen/voxel/dragon_tail.vox deleted file mode 100644 index 768cd43cd7..0000000000 --- a/assets/voxygen/voxel/dragon_tail.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3ddb7ddd724f96bcdabbcf34d0222e211c344f04e67819b7e0c1ce9652b22d93 -size 2080 diff --git a/assets/voxygen/voxel/dragon_wingL_in.vox b/assets/voxygen/voxel/dragon_wingL_in.vox deleted file mode 100644 index 11f600c23b..0000000000 --- a/assets/voxygen/voxel/dragon_wingL_in.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a6d1c391a1dee288714ee8e62f35e15cf2deeec3684de4ad7370b79700356e9d -size 2884 diff --git a/assets/voxygen/voxel/dragon_wingL_out.vox b/assets/voxygen/voxel/dragon_wingL_out.vox deleted file mode 100644 index bf09963662..0000000000 --- a/assets/voxygen/voxel/dragon_wingL_out.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d8a81670a27c4546f9d391d3418309e3c80da04948346ffec77ff04d4f043d6 -size 3544 diff --git a/assets/voxygen/voxel/dragon_wingR_in.vox b/assets/voxygen/voxel/dragon_wingR_in.vox deleted file mode 100644 index c1f0d6078d..0000000000 --- a/assets/voxygen/voxel/dragon_wingR_in.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c8387a79b7143ec06063148e169d0d50496cf11e784b42c4a711146ac8559511 -size 2884 diff --git a/assets/voxygen/voxel/dragon_wingR_out.vox b/assets/voxygen/voxel/dragon_wingR_out.vox deleted file mode 100644 index a8229caa23..0000000000 --- a/assets/voxygen/voxel/dragon_wingR_out.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00c4f15a86fe39e0d1c038b03f7153f101b35528f407ca3d8c6c10722431ac6c -size 3544 diff --git a/assets/voxygen/voxel/dragonhead.vox b/assets/voxygen/voxel/dragonhead.vox deleted file mode 100644 index d27c554eac..0000000000 --- a/assets/voxygen/voxel/dragonhead.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d3c6dcc28719e148e572786722426103d4e4e7af05b815e8328ee71515db813a -size 3040 diff --git a/assets/voxygen/voxel/elf/belt.vox b/assets/voxygen/voxel/elf/belt.vox deleted file mode 100644 index 2fb621d14e..0000000000 --- a/assets/voxygen/voxel/elf/belt.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2c2c72e4980f0e27d72f45945fd4e2d63a57c289569b00c429eff84e82ddc947 -size 1272 diff --git a/assets/voxygen/voxel/elf/chest.vox b/assets/voxygen/voxel/elf/chest.vox deleted file mode 100644 index 85e2dbf97d..0000000000 --- a/assets/voxygen/voxel/elf/chest.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e5011eed1217172ea10f79f44cd60a8919cd8e341bc61f42f01a8caa1336b659 -size 45228 diff --git a/assets/voxygen/voxel/elf/foot.vox b/assets/voxygen/voxel/elf/foot.vox deleted file mode 100644 index 7112309722..0000000000 --- a/assets/voxygen/voxel/elf/foot.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bfb90a3004d08f3127dce04d7dd440067da79bf10d05f34f183b8919ebf24bf7 -size 1436 diff --git a/assets/voxygen/voxel/elf/hand.vox b/assets/voxygen/voxel/elf/hand.vox deleted file mode 100644 index 8e2103956a..0000000000 --- a/assets/voxygen/voxel/elf/hand.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:11adfd18c28f2319350e8db48649ec2a570dc03bb75359554cc5d47747313f59 -size 1352 diff --git a/assets/voxygen/voxel/elf/head.vox b/assets/voxygen/voxel/elf/head.vox deleted file mode 100644 index 69e7fb8b95..0000000000 --- a/assets/voxygen/voxel/elf/head.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c9643fdfc8bce248868ebb37627a246dfdf040b824bfc82ab8d5747c7386de2 -size 4128 diff --git a/assets/voxygen/voxel/elf/pants.vox b/assets/voxygen/voxel/elf/pants.vox deleted file mode 100644 index 2aba252655..0000000000 --- a/assets/voxygen/voxel/elf/pants.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d25c8d8b5d852494a577be0d41f85118eb34fe680dbb1382ce3ffeefdb32f496 -size 1936 diff --git a/assets/voxygen/voxel/elf/sword.vox b/assets/voxygen/voxel/elf/sword.vox deleted file mode 100644 index 9b1d5e8bc3..0000000000 --- a/assets/voxygen/voxel/elf/sword.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b4c50f6848aa81922de265053874df20105664f662bd3e4fdd7857259b31273 -size 1412 diff --git a/assets/voxygen/voxel/figure/body/belt_female.vox b/assets/voxygen/voxel/figure/body/belt_female.vox new file mode 100644 index 0000000000..2319f6a3da --- /dev/null +++ b/assets/voxygen/voxel/figure/body/belt_female.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e986749c9a3d3147c8048722ec61d81d20c00403baad7d8c9501614809d9b692 +size 1440 diff --git a/assets/voxygen/voxel/figure/body/belt_male.vox b/assets/voxygen/voxel/figure/body/belt_male.vox new file mode 100644 index 0000000000..d27bc5a8fa --- /dev/null +++ b/assets/voxygen/voxel/figure/body/belt_male.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2ef1d7e950958851068c465f57737327bc9bf33352a30ef70f42c6c9b1ca746 +size 1480 diff --git a/assets/voxygen/voxel/figure/body/chest_female.vox b/assets/voxygen/voxel/figure/body/chest_female.vox new file mode 100644 index 0000000000..490178fecb --- /dev/null +++ b/assets/voxygen/voxel/figure/body/chest_female.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7af2a4d3051af77893da03a1f6495c49647b5b0dbfe73f09c81c8d50dd7c7b3 +size 2208 diff --git a/assets/voxygen/voxel/figure/body/chest_male.vox b/assets/voxygen/voxel/figure/body/chest_male.vox new file mode 100644 index 0000000000..f31a9f85a1 --- /dev/null +++ b/assets/voxygen/voxel/figure/body/chest_male.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7970e86cee65bcc690f0341f595a1f860005db31f7d443c4ba380f67cf60128c +size 45323 diff --git a/assets/voxygen/voxel/figure/body/foot.vox b/assets/voxygen/voxel/figure/body/foot.vox new file mode 100644 index 0000000000..cad7b5a208 --- /dev/null +++ b/assets/voxygen/voxel/figure/body/foot.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:82e2c1985661446af6ac7ac7b3e47a5c851d86f294bcdb078d828a4997f654fa +size 1416 diff --git a/assets/voxygen/voxel/figure/body/hand.vox b/assets/voxygen/voxel/figure/body/hand.vox new file mode 100644 index 0000000000..aaffa6e9a4 --- /dev/null +++ b/assets/voxygen/voxel/figure/body/hand.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b7d3bb891d9996d320135f6ca9a85bfdd014afbb497f24d621cd39793eac8648 +size 44379 diff --git a/assets/voxygen/voxel/figure/body/pants_female.vox b/assets/voxygen/voxel/figure/body/pants_female.vox new file mode 100644 index 0000000000..20cf0093db --- /dev/null +++ b/assets/voxygen/voxel/figure/body/pants_female.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:854e56b73e949d2da48111039c3ba7d13ae32855385ae69ea5861987b0552ab2 +size 1536 diff --git a/assets/voxygen/voxel/figure/body/pants_male.vox b/assets/voxygen/voxel/figure/body/pants_male.vox new file mode 100644 index 0000000000..6b9cc921a4 --- /dev/null +++ b/assets/voxygen/voxel/figure/body/pants_male.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:774c12f48276f92b14262f6bb2720986a2d409bf9b51d5e4146b413ee4ca6caf +size 44719 diff --git a/assets/voxygen/voxel/eyes.vox b/assets/voxygen/voxel/figure/eyes/eyes_female_1.vox similarity index 100% rename from assets/voxygen/voxel/eyes.vox rename to assets/voxygen/voxel/figure/eyes/eyes_female_1.vox diff --git a/assets/voxygen/voxel/figure/eyes/eyes_male_1.vox b/assets/voxygen/voxel/figure/eyes/eyes_male_1.vox new file mode 100644 index 0000000000..a35a272327 --- /dev/null +++ b/assets/voxygen/voxel/figure/eyes/eyes_male_1.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac75cc5d731d08c0e799bebcf6060e09a446eb205ef0703e6dfd61077efc98f3 +size 44251 diff --git a/assets/voxygen/voxel/hair.vox b/assets/voxygen/voxel/figure/hair/human/hair_human_female_1.vox similarity index 100% rename from assets/voxygen/voxel/hair.vox rename to assets/voxygen/voxel/figure/hair/human/hair_human_female_1.vox diff --git a/assets/voxygen/voxel/figure/head.vox b/assets/voxygen/voxel/figure/head.vox new file mode 100644 index 0000000000..bc3e4f3949 --- /dev/null +++ b/assets/voxygen/voxel/figure/head.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adb056231cc8f1cda9e9f2047acdff88182a50e724b5c56733963d0544641ba6 +size 47807 diff --git a/assets/voxygen/voxel/head2.vox b/assets/voxygen/voxel/figure/head/Human/head.vox similarity index 100% rename from assets/voxygen/voxel/head2.vox rename to assets/voxygen/voxel/figure/head/Human/head.vox diff --git a/assets/voxygen/voxel/head.vox b/assets/voxygen/voxel/figure/head_test1.vox similarity index 100% rename from assets/voxygen/voxel/head.vox rename to assets/voxygen/voxel/figure/head_test1.vox diff --git a/assets/voxygen/voxel/head4.vox b/assets/voxygen/voxel/figure/head_test2.vox similarity index 100% rename from assets/voxygen/voxel/head4.vox rename to assets/voxygen/voxel/figure/head_test2.vox diff --git a/assets/voxygen/voxel/fixture/selection_bg.vox b/assets/voxygen/voxel/fixture/selection_bg.vox new file mode 100644 index 0000000000..66dc4a639e --- /dev/null +++ b/assets/voxygen/voxel/fixture/selection_bg.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4d0c91d3e411f26f9fb0675ddbd00f02120d9396cc40c6f6e39cbf2be962d640 +size 594518 diff --git a/assets/voxygen/voxel/foot_BL.vox b/assets/voxygen/voxel/foot_BL.vox deleted file mode 100644 index 6ed05ef7fe..0000000000 --- a/assets/voxygen/voxel/foot_BL.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2ea8fad8c48dd364aa6ff50e4a0db45bf6c0a28f6a765dfba76ee53f01ff16a2 -size 1236 diff --git a/assets/voxygen/voxel/foot_BR.vox b/assets/voxygen/voxel/foot_BR.vox deleted file mode 100644 index d156be3350..0000000000 --- a/assets/voxygen/voxel/foot_BR.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d8851f248da4a2047e99f24d05f4799e6a2d6e3fd269ef76708dd52107ef605 -size 1236 diff --git a/assets/voxygen/voxel/foot_FL.vox b/assets/voxygen/voxel/foot_FL.vox deleted file mode 100644 index 07dd522eab..0000000000 --- a/assets/voxygen/voxel/foot_FL.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a133a362c8970dff4ad80f42c8081f2146465c300db2f0bf5aa39874addcbf44 -size 1192 diff --git a/assets/voxygen/voxel/foot_FR.vox b/assets/voxygen/voxel/foot_FR.vox deleted file mode 100644 index 9ab90d3e62..0000000000 --- a/assets/voxygen/voxel/foot_FR.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a5233f991f866998e1840964d2f18de30e07f44d86f894140306bf330af83611 -size 1192 diff --git a/assets/voxygen/voxel/hand.vox b/assets/voxygen/voxel/hand.vox deleted file mode 100644 index 6e70edea1f..0000000000 --- a/assets/voxygen/voxel/hand.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b95056f14ca3b7cd02a6ea781e04c124a79702d664705fb01e5709de1f614564 -size 1272 diff --git a/assets/voxygen/voxel/lionhead.vox b/assets/voxygen/voxel/lionhead.vox deleted file mode 100644 index ab1aa94acf..0000000000 --- a/assets/voxygen/voxel/lionhead.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ac3fb3f6ac378daa7159c1cbfc227a337b384642ddd21478fce0f3ab54778e5e -size 5164 diff --git a/assets/voxygen/voxel/pigchest.vox b/assets/voxygen/voxel/npc/pig_purple/pigchest.vox similarity index 100% rename from assets/voxygen/voxel/pigchest.vox rename to assets/voxygen/voxel/npc/pig_purple/pigchest.vox diff --git a/assets/voxygen/voxel/pighead.vox b/assets/voxygen/voxel/npc/pig_purple/pighead.vox similarity index 100% rename from assets/voxygen/voxel/pighead.vox rename to assets/voxygen/voxel/npc/pig_purple/pighead.vox diff --git a/assets/voxygen/voxel/pigleg_l.vox b/assets/voxygen/voxel/npc/pig_purple/pigleg_l.vox similarity index 100% rename from assets/voxygen/voxel/pigleg_l.vox rename to assets/voxygen/voxel/npc/pig_purple/pigleg_l.vox diff --git a/assets/voxygen/voxel/pigleg_r.vox b/assets/voxygen/voxel/npc/pig_purple/pigleg_r.vox similarity index 100% rename from assets/voxygen/voxel/pigleg_r.vox rename to assets/voxygen/voxel/npc/pig_purple/pigleg_r.vox diff --git a/assets/voxygen/voxel/glider.vox b/assets/voxygen/voxel/object/glider.vox similarity index 100% rename from assets/voxygen/voxel/glider.vox rename to assets/voxygen/voxel/object/glider.vox diff --git a/assets/voxygen/voxel/sabremale.vox b/assets/voxygen/voxel/sabremale.vox deleted file mode 100644 index 4bdebd91d2..0000000000 --- a/assets/voxygen/voxel/sabremale.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d03902b9945afcc127b67fcbfafa001abb1f491acfb2e582b5bc06959f6d7041 -size 7436 diff --git a/assets/voxygen/voxel/shoulder_l.vox b/assets/voxygen/voxel/shoulder_l.vox deleted file mode 100644 index 60968c9220..0000000000 --- a/assets/voxygen/voxel/shoulder_l.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd10e204c13d7dcaf07b5fbc9f36f32e8e8a7ae9b591586316240a4c16a04d63 -size 1368 diff --git a/assets/voxygen/voxel/shoulder_r.vox b/assets/voxygen/voxel/shoulder_r.vox deleted file mode 100644 index 007b678060..0000000000 --- a/assets/voxygen/voxel/shoulder_r.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d5eb89bce7b57178f3486fbd9546289bfbebea6edccf69742a2d5c8932ec9461 -size 1368 diff --git a/assets/voxygen/voxel/shoulders.vox b/assets/voxygen/voxel/shoulders.vox deleted file mode 100644 index a4d07f0eb2..0000000000 --- a/assets/voxygen/voxel/shoulders.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8390e0d36e6771b3456ee57f04ab64877ceeef3a11cfa95b11b72efb76e34676 -size 1640 diff --git a/assets/voxygen/voxel/sword.vox b/assets/voxygen/voxel/sword.vox deleted file mode 100644 index be6c69ae07..0000000000 --- a/assets/voxygen/voxel/sword.vox +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f76c933f8a40237cbca3db5dea9baf11f2a23282f981fdada49318a62b3da3c9 -size 1520 diff --git a/assets/voxygen/voxel/axe.vox b/assets/voxygen/voxel/weapon/axe/axe.vox similarity index 100% rename from assets/voxygen/voxel/axe.vox rename to assets/voxygen/voxel/weapon/axe/axe.vox diff --git a/assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox b/assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox new file mode 100644 index 0000000000..f6559eb6f8 --- /dev/null +++ b/assets/voxygen/voxel/weapon/sword/sword_rusty_2h.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31ce16c25462dbcbf94ddebb5ff3c1c12f897c41366a6d638ea3aa36549f252c +size 44704 diff --git a/assets/voxygen/voxel/Wood Training 2h.vox b/assets/voxygen/voxel/weapon/sword/sword_wood_2h.vox similarity index 100% rename from assets/voxygen/voxel/Wood Training 2h.vox rename to assets/voxygen/voxel/weapon/sword/sword_wood_2h.vox diff --git a/common/src/comp/actor.rs b/common/src/comp/actor.rs index c951adc1e4..109c90ceb8 100644 --- a/common/src/comp/actor.rs +++ b/common/src/comp/actor.rs @@ -28,16 +28,27 @@ pub enum Head { #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Chest { Default, + Blue, + Brown, + Dark, + Green, + Orange, } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Belt { - Default, + //Default, + Dark, } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Pants { Default, + Blue, + Brown, + Dark, + Green, + Orange, } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -48,6 +59,7 @@ pub enum Hand { #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub enum Foot { Default, + Dark, } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] @@ -90,7 +102,7 @@ pub enum PigLegR { Default, } -const ALL_RACES: [Race; 6] = [ +pub const ALL_RACES: [Race; 6] = [ Race::Danari, Race::Dwarf, Race::Elf, @@ -98,14 +110,31 @@ const ALL_RACES: [Race; 6] = [ Race::Orc, Race::Undead, ]; -const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified]; -const ALL_HEADS: [Head; 1] = [Head::Default]; -const ALL_CHESTS: [Chest; 1] = [Chest::Default]; -const ALL_BELTS: [Belt; 1] = [Belt::Default]; -const ALL_PANTS: [Pants; 1] = [Pants::Default]; -const ALL_HANDS: [Hand; 1] = [Hand::Default]; -const ALL_FEET: [Foot; 1] = [Foot::Default]; -const ALL_WEAPONS: [Weapon; 7] = [ +pub const ALL_BODY_TYPES: [BodyType; 3] = [BodyType::Female, BodyType::Male, BodyType::Unspecified]; +pub const ALL_HEADS: [Head; 1] = [Head::Default]; +pub const ALL_CHESTS: [Chest; 6] = [ + Chest::Default, + Chest::Blue, + Chest::Brown, + Chest::Dark, + Chest::Green, + Chest::Orange, +]; +pub const ALL_BELTS: [Belt; 1] = [ + //Belt::Default, + Belt::Dark, +]; +pub const ALL_PANTS: [Pants; 6] = [ + Pants::Default, + Pants::Blue, + Pants::Brown, + Pants::Dark, + Pants::Green, + Pants::Orange, +]; +pub const ALL_HANDS: [Hand; 1] = [Hand::Default]; +pub const ALL_FEET: [Foot; 2] = [Foot::Default, Foot::Dark]; +pub const ALL_WEAPONS: [Weapon; 7] = [ Weapon::Daggers, Weapon::SwordShield, Weapon::Sword, @@ -114,8 +143,8 @@ const ALL_WEAPONS: [Weapon; 7] = [ Weapon::Bow, Weapon::Staff, ]; -const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default]; -const ALL_DRAW: [Draw; 1] = [Draw::Default]; +pub const ALL_SHOULDERS: [Shoulder; 1] = [Shoulder::Default]; +pub const ALL_DRAW: [Draw; 1] = [Draw::Default]; #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)] pub struct HumanoidBody { diff --git a/common/src/lib.rs b/common/src/lib.rs index a0fa932242..20b92c44b4 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -4,6 +4,7 @@ trait_alias, bind_by_move_pattern_guards, option_flattening, // Converts Option> into Option TODO: Remove this once this feature becomes stable + copysign, )] #[macro_use] diff --git a/server/src/lib.rs b/server/src/lib.rs index 71e15f991f..8a818e6b2f 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -136,7 +136,6 @@ impl Server { body: comp::Body, ) { state.write_component(entity, comp::Actor::Character { name, body }); - state.write_component(entity, comp::Stats::default()); state.write_component(entity, comp::phys::Pos(Vec3::new(0.0, 0.0, 64.0))); state.write_component(entity, comp::phys::Vel(Vec3::zero())); state.write_component(entity, comp::phys::Dir(Vec3::unit_y())); diff --git a/voxygen/src/anim/fixture/mod.rs b/voxygen/src/anim/fixture/mod.rs new file mode 100644 index 0000000000..bd5579eaed --- /dev/null +++ b/voxygen/src/anim/fixture/mod.rs @@ -0,0 +1,40 @@ +// Crate +use crate::render::FigureBoneData; + +// Local +use super::{Bone, Skeleton}; + +const SCALE: f32 = 44.0; + +pub struct FixtureSkeleton; + +impl FixtureSkeleton { + pub fn new() -> Self { + Self {} + } +} + +impl Skeleton for FixtureSkeleton { + fn compute_matrices(&self) -> [FigureBoneData; 16] { + [ + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + FigureBoneData::new(vek::Mat4::identity()), + ] + } + + fn interpolate(&mut self, target: &Self) {} +} diff --git a/voxygen/src/anim/mod.rs b/voxygen/src/anim/mod.rs index ed3e0a13e7..7bbee6358b 100644 --- a/voxygen/src/anim/mod.rs +++ b/voxygen/src/anim/mod.rs @@ -1,5 +1,7 @@ pub mod character; +pub mod fixture; pub mod quadruped; + // Library use vek::*; diff --git a/voxygen/src/hud/esc_menu.rs b/voxygen/src/hud/esc_menu.rs index 55670942de..1b7db480df 100644 --- a/voxygen/src/hud/esc_menu.rs +++ b/voxygen/src/hud/esc_menu.rs @@ -111,14 +111,14 @@ impl<'a> Widget for EscMenu<'a> { .w_h(170.0, 50.0) .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) - .label("Servers") + .label("Characters") .label_y(conrod_core::position::Relative::Scalar(2.0)) .label_color(TEXT_COLOR) .label_font_size(17) .set(state.ids.menu_button_3, ui) .was_clicked() { - // TODO: Show servers window (needed in-game?). + return Some(Event::Logout); // TODO: Open Character Selection }; // Logout if Button::image(self.imgs.button) diff --git a/voxygen/src/hud/img_ids.rs b/voxygen/src/hud/img_ids.rs index f32b405ad5..4ccd1c8d12 100644 --- a/voxygen/src/hud/img_ids.rs +++ b/voxygen/src/hud/img_ids.rs @@ -127,7 +127,6 @@ image_ids! { charwindow_gradient:"/voxygen/element/misc_bg/charwindow.png", // Spell Book Window - spellbook_bg: "/voxygen/element/misc_bg/small_bg.png", spellbook_icon: "/voxygen/element/icons/spellbook.png", // Bag @@ -138,7 +137,6 @@ image_ids! { bag_open_hover: "/voxygen/element/buttons/bag/open_hover.png", bag_open_press: "/voxygen/element/buttons/bag/open_press.png", - map_bg: "/voxygen/element/misc_bg/small_bg.png", map_icon: "/voxygen/element/icons/map.png", grid_button: "/voxygen/element/buttons/border.png", @@ -159,10 +157,6 @@ image_ids! { window_frame_2: "/voxygen/element/frames/window_2.png", - settings_bg: "/voxygen/element/frames/settings.png", - settings_icon: "/voxygen/element/icons/settings.png", - settings_button_mo: "/voxygen/element/buttons/blue_mo.png", - // Char Window charwindow: "/voxygen/element/misc_bg/charwindow.png", charwindow_icon: "/voxygen/element/icons/charwindow.png", @@ -173,17 +167,12 @@ image_ids! { progress: "/voxygen/element/misc_bg/progress.png", // Quest-Log Window - questlog_bg: "/voxygen/element/misc_bg/small_bg.png", questlog_icon: "/voxygen/element/icons/questlog.png", - button_blue_mo: "/voxygen/element/buttons/blue_mo.png", - button_blue_press: "/voxygen/element/buttons/blue_press.png", - // Window BG window_bg: "/voxygen/element/misc_bg/window_bg.png", // Social Window - social_bg: "/voxygen/element/misc_bg/small_bg.png", social_icon: "/voxygen/element/icons/social.png", diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index e01331055c..25f9c65664 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -229,8 +229,8 @@ impl Hud { new_messages: VecDeque::new(), inventory_space: 0, show: Show { - help: true, - debug: false, + help: false, + debug: true, bag: false, esc_menu: false, open_windows: Windows::None, diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index dc2331a916..fa9c51b853 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -2,6 +2,7 @@ mod scene; mod ui; use crate::{ + render::Renderer, session::SessionState, window::{Event, Window}, Direction, GlobalState, PlayState, PlayStateResult, @@ -78,7 +79,7 @@ impl PlayState for CharSelectionState { .postbox .send_message(ClientMsg::Character { name: self.char_selection_ui.character_name.clone(), - body: comp::Body::Humanoid(self.char_selection_ui.character_body), //body: comp::Body::Quadruped(comp::QuadrupedBody::random()), + body: comp::Body::Humanoid(self.char_selection_ui.character_body), }); return PlayStateResult::Switch(Box::new(SessionState::new( &mut global_state.window, @@ -93,9 +94,12 @@ impl PlayState for CharSelectionState { self.scene .maintain(global_state.window.renderer_mut(), &self.client.borrow()); - // Render the scene. - self.scene - .render(global_state.window.renderer_mut(), &self.client.borrow()); + // Render the scene + self.scene.render( + global_state.window.renderer_mut(), + &self.client.borrow(), + self.char_selection_ui.character_body, + ); // Draw the UI to the screen. self.char_selection_ui diff --git a/voxygen/src/menu/char_selection/scene.rs b/voxygen/src/menu/char_selection/scene.rs index d29a50d127..7c9af72ac6 100644 --- a/voxygen/src/menu/char_selection/scene.rs +++ b/voxygen/src/menu/char_selection/scene.rs @@ -1,6 +1,7 @@ use crate::{ anim::{ character::{CharacterSkeleton, IdleAnimation}, + fixture::FixtureSkeleton, Animation, Skeleton, }, render::{ @@ -13,6 +14,7 @@ use crate::{ }, }; use client::Client; +use common::comp::HumanoidBody; use common::{comp, figure::Segment}; use vek::*; @@ -33,7 +35,7 @@ pub struct Scene { skybox: Skybox, postprocess: PostProcess, backdrop_model: Model, - backdrop_state: FigureState, + backdrop_state: FigureState, figure_model_cache: FigureModelCache, figure_state: FigureState, @@ -61,18 +63,21 @@ impl Scene { figure_state: FigureState::new(renderer, CharacterSkeleton::new()), backdrop_model: renderer - .create_model(&FigureModelCache::load_mesh("knight.vox", Vec3::zero())) + .create_model(&FigureModelCache::load_mesh( + "fixture/selection_bg.vox", + Vec3::new(-55.0, -50.0, -1.0), + )) .unwrap(), - backdrop_state: FigureState::new(renderer, CharacterSkeleton::new()), + backdrop_state: FigureState::new(renderer, FixtureSkeleton::new()), } } pub fn maintain(&mut self, renderer: &mut Renderer, client: &Client) { - self.camera.set_focus_pos(Vec3::unit_z() * 1.75); + self.camera.set_focus_pos(Vec3::unit_z() * 2.0); self.camera.update(client.state().get_time()); - self.camera.set_distance(4.0); + self.camera.set_distance(4.2); self.camera - .set_orientation(Vec3::new(client.state().get_time() as f32 * 0.2, 0.3, 0.0)); + .set_orientation(Vec3::new(client.state().get_time() as f32 * 0.0, 0.0, 0.0)); let (view_mat, proj_mat, cam_pos) = self.camera.compute_dependents(client); @@ -107,14 +112,15 @@ impl Scene { ); } - pub fn render(&mut self, renderer: &mut Renderer, client: &Client) { + pub fn render(&mut self, renderer: &mut Renderer, client: &Client, body: HumanoidBody) { renderer.render_skybox(&self.skybox.model, &self.globals, &self.skybox.locals); let model = self.figure_model_cache.get_or_create_model( renderer, - comp::Body::Humanoid(comp::HumanoidBody::random()), + comp::Body::Humanoid(body), client.get_tick(), ); + renderer.render_figure( model, &self.globals, diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index cfa3efbf7b..35422ce171 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -3,29 +3,63 @@ use crate::{ ui::{ self, img_ids::{ImageGraphic, VoxelGraphic}, - ScaleMode, Ui, + ImageSlider, ScaleMode, Ui, }, window::Window, }; use common::comp::{ - actor::{Belt, BodyType, Chest, Foot, Hand, Head, Pants, Race, Weapon}, + actor::{Belt, BodyType, Chest, Foot, Hand, Head, Pants, Race, Weapon, ALL_CHESTS}, HumanoidBody, }; use conrod_core::{ color, color::TRANSPARENT, - widget::{text_box::Event as TextBoxEvent, Button, Image, Rectangle, Text, TextBox}, + graph, + widget::{text_box::Event as TextBoxEvent, Button, Image, Rectangle, Scrollbar, Text, TextBox}, widget_ids, Borderable, Color, Colorable, Labelable, Positionable, Sizeable, Widget, + WidgetCommon, }; use std::sync::Arc; widget_ids! { struct Ids { // Background and logo - bg_selection, - bg_creation, + charlist_bg, + charlist_frame, + charlist_alignment, + selection_scrollbar, + creation_bg, + creation_frame, + creation_alignment, + server_name_text, + change_server, + server_frame_bg, + server_frame, v_logo, version, + divider, + bodyrace_text, + facialfeatures_text, + + // REMOVE THIS AFTER IMPLEMENTATION + daggers_grey, + axe_grey, + hammer_grey, + bow_grey, + staff_grey, + + + // Characters + character_box_1, + character_name_1, + character_location_1, + character_level_1, + + character_box_2, + character_name_2, + character_location_2, + character_level_2, + // Windows selection_window, @@ -33,21 +67,10 @@ widget_ids! { char_level, creation_window, select_window_title, - race_heading, - race_description, + creation_buttons_alignment_1, + creation_buttons_alignment_2, weapon_heading, weapon_description, - races_bg, - body_type_bg, - desc_bg, - skin_eyes_window, - hair_window, - accessories_window, - skin_eyes_button, - hair_button, - accessories_button, - skin_rect, - eyes_rect, human_skin_bg, orc_skin_bg, dwarf_skin_bg, @@ -56,6 +79,22 @@ widget_ids! { danari_skin_bg, name_input_bg, + // Sliders + hairstyle_slider, + hairstyle_text, + haircolor_slider, + haircolor_text, + skin_slider, + skin_text, + eyecolor_slider, + eyecolor_text, + eyebrows_slider, + eyebrows_text, + beard_slider, + beard_slider_2, + beard_text, + accessories_slider, + accessories_text, // Buttons enter_world_button, @@ -74,20 +113,20 @@ widget_ids! { race_6, body_type_1, body_type_2, - weapon_1, - weapon_2, - weapon_3, - weapon_4, - weapon_5, - weapon_6, - weapon_7, - - //test_chars - test_char_l_button, - test_char_l_big, - help_text_bg, - help_text, + // Weapons + sword, + sword_button, + daggers, + daggers_button, + axe, + axe_button, + hammer, + hammer_button, + bow, + bow_button, + staff, + staff_button, // Char Creation // Race Icons male, @@ -98,64 +137,8 @@ widget_ids! { undead, elf, danari, - // Weapon Icons - weapon_bg, - daggers, - sword_shield, - sword, - axe, - hammer, - bow, - staff, - // Arrows - arrow_left, - arrow_right, // Body Features - window_skin_eyes, - window_skin_eyes_mid, - window_skin_eyes_bot, - window_hair, - window_hair_mid, - window_hair_bot, - window_acessories, - window_acessories_mid, - window_acessories_bot, - skin_color_picker, - skin_color_slider, - skin_color_text, - skin_color_slider_text, - eye_color_picker, - eye_color_slider, - eye_color_text, - eye_color_slider_text, - skin_color_slider_range, - skin_color_slider_indicator, - eye_color_slider_range, - eye_color_slider_indicator, - hair_color_slider_text, - // Creation Hair Contents - hair_style_text, - hair_style_arrow_l, - hair_style_arrow_r, - hair_color_picker_bg, - hair_color_text, - hair_color_slider_range, - hair_color_slider_indicator, - eyebrow_style_text, - eyebrow_arrow_l, - eyebrow_arrow_r, - beard_style_text, - beard_arrow_l, - beard_arrow_r, - // Creation Accessories Contents - warpaint_text, - warpaint_arrow_l, - warpaint_arrow_r, - warpaint_color_picker_bg, - warpaint_color_text, - warpaint_slider_indicator, - warpaint_slider_range, - warpaint_slider_text, + chest_slider, } } @@ -170,15 +153,18 @@ image_ids! { button_red_hover: "/voxygen/element/buttons/button_red_hover.vox", button_red_press: "/voxygen/element/buttons/button_red_press.vox", name_input: "/voxygen/element/misc_bg/textbox.vox", + charlist_frame: "/voxygen/element/frames/window_4.vox", + selection_frame: "/voxygen/element/frames/selection_frame.vox", + server_frame: "/voxygen/element/frames/server_frame.vox", + selection: "/voxygen/element/frames/selection.vox", + + arrow_left:"/voxygen/element/buttons/button_red_press.vox", + arrow_left_mo:"/voxygen/element/buttons/button_red_press.vox", + arrow_left_press:"/voxygen/element/buttons/button_red_press.vox", + + divider: "/voxygen/element/frames/divider.vox", - bg_selection: "/voxygen/background/bg_selection.png", - bg_creation: "/voxygen/background/bg_creation.png", - selection_window: "/voxygen/element/frames/selection.png", - test_char_l_button: "/voxygen/element/misc_bg/test_char_l.png", - test_char_l_big: "/voxygen/element/misc_bg/test_char_l_big.png", - creation_window: "/voxygen/element/frames/char_creation.png", - creation_window_body: "/voxygen/element/frames/body_creation.png", frame_closed: "/voxygen/element/buttons/frame/closed.png", frame_closed_mo: "/voxygen/element/buttons/frame/closed_mo.png", frame_closed_press: "/voxygen/element/buttons/frame/closed_press.png", @@ -193,6 +179,7 @@ image_ids! { slider_indicator: "/voxygen/element/slider/indicator.png", window_frame_2: "/voxygen/element/frames/window_2.png", + // Weapon Icons daggers: "/voxygen/element/icons/daggers.png", sword_shield: "/voxygen/element/icons/swordshield.png", @@ -216,20 +203,12 @@ image_ids! { elf_f: "/voxygen/element/icons/elf_f.png", danari_m: "/voxygen/element/icons/danari_m.png", danari_f: "/voxygen/element/icons/danari_f.png", - // Arrows - arrow_left: "/voxygen/element/buttons/arrow/left.png", - arrow_left_mo: "/voxygen/element/buttons/arrow/left_mo.png", - arrow_left_press: "/voxygen/element/buttons/arrow/left_press.png", - arrow_left_grey: "/voxygen/element/buttons/arrow/left_inactive.png", - arrow_right: "/voxygen/element/buttons/arrow/right.png", - arrow_right_mo: "/voxygen/element/buttons/arrow/right_mo.png", - arrow_right_press: "/voxygen/element/buttons/arrow/right_press.png", - arrow_right_grey: "/voxygen/element/buttons/arrow/right_inactive.png", // Icon Borders icon_border: "/voxygen/element/buttons/border.png", icon_border_mo: "/voxygen/element/buttons/border_mo.png", icon_border_press: "/voxygen/element/buttons/border_press.png", icon_border_pressed: "/voxygen/element/buttons/border_pressed.png", + nothing: "/voxygen/element/nothing.png", } } @@ -240,26 +219,13 @@ font_ids! { } } -enum CreationState { - Race, - Weapon, - Body(BodyPart), -} - -#[derive(Clone, Copy)] -enum BodyPart { - SkinEyes, - Hair, - Accessories, -} - pub enum Event { Logout, Play, } const TEXT_COLOR: Color = Color::Rgba(1.0, 1.0, 1.0, 1.0); -const TEXT_BG: Color = Color::Rgba(0.0, 0.0, 0.0, 1.0); +const TEXT_COLOR_2: Color = Color::Rgba(1.0, 1.0, 1.0, 0.2); pub struct CharSelectionUi { ui: Ui, @@ -267,10 +233,10 @@ pub struct CharSelectionUi { imgs: Imgs, fonts: Fonts, character_creation: bool, - selected_char_no: Option, pub character_name: String, pub character_body: HumanoidBody, - creation_state: CreationState, + pub character_weapon: Weapon, + pub body_type: BodyType, } impl CharSelectionUi { @@ -292,10 +258,10 @@ impl CharSelectionUi { imgs, fonts, character_creation: false, - selected_char_no: None, character_name: "Character Name".to_string(), character_body: HumanoidBody::random(), - creation_state: CreationState::Race, + character_weapon: Weapon::Sword, + body_type: BodyType::Male, } } @@ -305,20 +271,74 @@ impl CharSelectionUi { let ref mut ui_widgets = self.ui.set_widgets(); let version = env!("CARGO_PKG_VERSION"); - // Character Selection - // Supposed functionality: - // 3d rendered characters have to be clicked for selection. - // Selected characters will appear in the selection window. - // The selection window is only active when there are >0 characters on the server. - // After logging into the server the character that was played last will be selected automatically. - // If >1 characters are on the server but none of them was logged in last the one that was created last will be selected. - // If the no. of characters = character_limit the "Create Character" button won't be clickable anymore. - - // Background Image + // Character Selection ///////////////// if !self.character_creation { - //Image::new(self.imgs.bg_selection) - // .middle_of(ui_widgets.window) - // .set(self.ids.bg_selection, ui_widgets); + // Background for Server Frame + Rectangle::fill_with([386.0, 95.0], color::rgba(0.0, 0.0, 0.0, 0.8)) + .top_left_with_margins_on(ui_widgets.window, 30.0, 30.0) + .set(self.ids.server_frame_bg, ui_widgets); + Image::new(self.imgs.server_frame) + .w_h(400.0, 100.0) + .middle_of(self.ids.server_frame_bg) + .set(self.ids.server_frame, ui_widgets); + + // Background for Char List + Rectangle::fill_with([386.0, 788.0], color::rgba(0.0, 0.0, 0.0, 0.8)) + .down_from(self.ids.server_frame_bg, 20.0) + .set(self.ids.charlist_bg, ui_widgets); + Image::new(self.imgs.charlist_frame) + .w_h(400.0, 800.0) + .middle_of(self.ids.charlist_bg) + .set(self.ids.charlist_frame, ui_widgets); + Rectangle::fill_with([386.0, 783.0], color::TRANSPARENT) + .middle_of(self.ids.charlist_bg) + .scroll_kids() + .scroll_kids_vertically() + .set(self.ids.charlist_alignment, ui_widgets); + Scrollbar::y_axis(self.ids.charlist_alignment) + .thickness(5.0) + .auto_hide(true) + .rgba(0.0, 0.0, 0., 0.0) + .set(self.ids.selection_scrollbar, ui_widgets); + // Server Name + Text::new("Server Name") //TODO: Add in Server Name + .mid_top_with_margin_on(self.ids.server_frame_bg, 5.0) + .font_size(24) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.server_name_text, ui_widgets); + //Change Server + if Button::image(self.imgs.button) + .mid_top_with_margin_on(self.ids.server_frame_bg, 45.0) + .w_h(200.0, 40.0) + .parent(self.ids.charlist_bg) + .hover_image(self.imgs.button_hover) + .press_image(self.imgs.button_press) + .label("Change Server") + .label_color(TEXT_COLOR) + .label_font_size(18) + .label_y(conrod_core::position::Relative::Scalar(3.0)) + .set(self.ids.change_server, ui_widgets) + .was_clicked() + { + events.push(Event::Logout); + } + + // Enter World Button + if Button::image(self.imgs.button) + .mid_bottom_with_margin_on(ui_widgets.window, 10.0) + .w_h(250.0, 60.0) + .hover_image(self.imgs.button_hover) + .press_image(self.imgs.button_press) + .label("Enter World") + .label_color(TEXT_COLOR) + .label_font_size(22) + .label_y(conrod_core::position::Relative::Scalar(3.0)) + .set(self.ids.enter_world_button, ui_widgets) + .was_clicked() + { + events.push(Event::Play); + } // Logout_Button if Button::image(self.imgs.button) @@ -338,7 +358,7 @@ impl CharSelectionUi { // Create Character Button. if Button::image(self.imgs.button) - .mid_bottom_with_margin_on(ui_widgets.window, 10.0) + .mid_bottom_with_margin_on(self.ids.charlist_bg, -60.0) .w_h(270.0, 50.0) .hover_image(self.imgs.button_hover) .press_image(self.imgs.button_press) @@ -350,106 +370,83 @@ impl CharSelectionUi { .was_clicked() { self.character_creation = true; - self.selected_char_no = None; - } - // Test Characters - if Button::image(self.imgs.test_char_l_button) - .bottom_left_with_margins_on(ui_widgets.window, 395.0, 716.0) - .w_h(95.0, 130.0) - .hover_image(self.imgs.test_char_l_button) - .press_image(self.imgs.test_char_l_button) - .set(self.ids.test_char_l_button, ui_widgets) - .was_clicked() - { - self.selected_char_no = Some(1); + self.character_body.weapon = Weapon::Sword; } - // Veloren Logo and Alpha Version - Image::new(self.imgs.v_logo) - .w_h(123.0 * 3.0, 35.0 * 3.0) - .top_left_with_margins(30.0, 30.0) - .set(self.ids.v_logo, ui_widgets); + // Alpha Version Text::new(version) - .top_left_with_margins_on(ui_widgets.window, 5.0, 5.0) + .top_right_with_margins_on(ui_widgets.window, 5.0, 5.0) .font_size(14) + .font_id(self.fonts.opensans) .color(TEXT_COLOR) .set(self.ids.version, ui_widgets); - // Click Character to Login TODO: <-- Temporary! - Image::new(self.imgs.window_frame_2) - .mid_top_with_margin_on(ui_widgets.window, 60.0) - .w_h(700.0, 70.0) - .set(self.ids.help_text_bg, ui_widgets); - Text::new("Click character to select it") - .middle_of(self.ids.help_text_bg) - .font_size(40) + + // 1st Character in Selection List + if Button::image(self.imgs.selection) + .top_left_with_margins_on(self.ids.charlist_alignment, 0.0, 2.0) + .w_h(386.0, 80.0) + .image_color(Color::Rgba(1.0, 1.0, 1.0, 0.8)) + .hover_image(self.imgs.selection) + .press_image(self.imgs.selection) + .label_y(conrod_core::position::Relative::Scalar(20.0)) + .set(self.ids.character_box_1, ui_widgets) + .was_clicked() + {} + Text::new("Human Default") + .top_left_with_margins_on(self.ids.character_box_1, 6.0, 9.0) + .font_size(19) + .font_id(self.fonts.metamorph) .color(TEXT_COLOR) - .set(self.ids.help_text, ui_widgets); + .set(self.ids.character_name_1, ui_widgets); - if let Some(no) = self.selected_char_no { - // Selection_Window - Image::new(self.imgs.selection_window) - .w_h(522.0, 722.0) - .mid_right_with_margin_on(ui_widgets.window, 10.0) - .set(self.ids.selection_window, ui_widgets); - // Character Name & Level - Text::new("Character Name") - .mid_top_with_margin_on(self.ids.selection_window, 80.0) - .font_size(30) - .color(TEXT_COLOR) - .set(self.ids.char_name, ui_widgets); - Text::new("1") - .mid_top_with_margin_on(self.ids.char_name, 40.0) - .font_size(30) - .color(TEXT_COLOR) - .set(self.ids.char_level, ui_widgets); + Text::new("Level 1") + .down_from(self.ids.character_name_1, 4.0) + .font_size(17) + .font_id(self.fonts.opensans) + .color(TEXT_COLOR) + .set(self.ids.character_level_1, ui_widgets); - // Selected Character - if no == 1 { - Image::new(self.imgs.test_char_l_big) - .w_h(522.0, 722.0) - .middle_of(self.ids.selection_window) - .set(self.ids.test_char_l_big, ui_widgets); - } + Text::new("Uncanny Valley") + .down_from(self.ids.character_level_1, 4.0) + .font_size(17) + .font_id(self.fonts.opensans) + .color(TEXT_COLOR) + .set(self.ids.character_location_1, ui_widgets); - // Enter World Button - if Button::image(self.imgs.button) - .mid_bottom_with_margin_on(self.ids.selection_window, 65.0) - .w_h(210.0, 55.0) - .hover_image(self.imgs.button_hover) - .press_image(self.imgs.button_press) - .label("Enter World") - .label_color(TEXT_COLOR) - .label_font_size(22) - .label_y(conrod_core::position::Relative::Scalar(3.0)) - .set(self.ids.enter_world_button, ui_widgets) - .was_clicked() - { - // Enter World - events.push(Event::Play); - } + // 2nd Character in List + if Button::image(self.imgs.nothing) + .down_from(self.ids.character_box_1, 5.0) + .w_h(386.0, 80.0) + .hover_image(self.imgs.selection) + .press_image(self.imgs.selection) + .image_color(Color::Rgba(1.0, 1.0, 1.0, 0.8)) + .label_y(conrod_core::position::Relative::Scalar(20.0)) + .set(self.ids.character_box_2, ui_widgets) + .was_clicked() + {} + Text::new("Example 2nd Char") + .top_left_with_margins_on(self.ids.character_box_2, 6.0, 9.0) + .font_size(19) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.character_name_2, ui_widgets); - // Delete Button - if Button::image(self.imgs.button_red) - .bottom_right_with_margins_on(self.ids.selection_window, -25.0, 0.0) - .w_h(100.0, 20.0) - .hover_image(self.imgs.button_red_hover) - .press_image(self.imgs.button_red_press) - .label("Delete") - .label_color(TEXT_COLOR) - .label_font_size(12) - .label_y(conrod_core::position::Relative::Scalar(3.0)) - .set(self.ids.delete_button, ui_widgets) - .was_clicked() - {} - } + Text::new("Level ??") + .down_from(self.ids.character_name_2, 4.0) + .font_size(17) + .font_id(self.fonts.opensans) + .color(TEXT_COLOR) + .set(self.ids.character_level_2, ui_widgets); + + Text::new("Plains of Uncertainty") + .down_from(self.ids.character_level_2, 4.0) + .font_size(17) + .font_id(self.fonts.opensans) + .color(TEXT_COLOR) + .set(self.ids.character_location_2, ui_widgets); } - // Character_Creation + // Character_Creation ////////////////////////////////////////////////////////////////////// else { - // Background - //Image::new(self.imgs.bg_creation) - // .middle_of(ui_widgets.window) - // .set(self.ids.bg_creation, ui_widgets); - // Back Button if Button::image(self.imgs.button) .bottom_left_with_margins_on(ui_widgets.window, 10.0, 10.0) @@ -482,10 +479,11 @@ impl CharSelectionUi { self.character_creation = false; } // Character Name Input - Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.99)) + Rectangle::fill_with([320.0, 50.0], color::rgba(0.0, 0.0, 0.0, 0.97)) .mid_bottom_with_margin_on(ui_widgets.window, 20.0) .set(self.ids.name_input_bg, ui_widgets); Button::image(self.imgs.name_input) + .image_color(Color::Rgba(1.0, 1.0, 1.0, 0.9)) .w_h(337.0, 67.0) .middle_of(self.ids.name_input_bg) .set(self.ids.name_input, ui_widgets); @@ -508,1281 +506,571 @@ impl CharSelectionUi { } } - // Window(s) - Image::new(if let CreationState::Body(_) = self.creation_state { - self.imgs.creation_window_body + // Window + + Rectangle::fill_with([386.0, 988.0], color::rgba(0.0, 0.0, 0.0, 0.8)) + .top_left_with_margins_on(ui_widgets.window, 30.0, 30.0) + .set(self.ids.creation_bg, ui_widgets); + Image::new(self.imgs.charlist_frame) + .w_h(400.0, 1000.0) + .middle_of(self.ids.creation_bg) + .set(self.ids.charlist_frame, ui_widgets); + Rectangle::fill_with([386.0, 983.0], color::TRANSPARENT) + .middle_of(self.ids.creation_bg) + .scroll_kids() + .scroll_kids_vertically() + .set(self.ids.creation_alignment, ui_widgets); + Scrollbar::y_axis(self.ids.creation_alignment) + .thickness(5.0) + .auto_hide(true) + .rgba(0.33, 0.33, 0.33, 1.0) + .set(self.ids.selection_scrollbar, ui_widgets); + + // Male/Female/Race Icons + + Text::new("Character Creation") + .mid_top_with_margin_on(self.ids.creation_alignment, 10.0) + .font_size(24) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.bodyrace_text, ui_widgets); + // Alignment + Rectangle::fill_with([140.0, 72.0], color::TRANSPARENT) + .mid_top_with_margin_on(self.ids.creation_alignment, 60.0) + .set(self.ids.creation_buttons_alignment_1, ui_widgets); + // Male + Image::new(self.imgs.male) + .w_h(70.0, 70.0) + .top_left_with_margins_on(self.ids.creation_buttons_alignment_1, 0.0, 0.0) + .set(self.ids.male, ui_widgets); + if Button::image(if let BodyType::Male = self.character_body.body_type { + self.imgs.icon_border_pressed } else { - self.imgs.creation_window + self.imgs.icon_border }) - .w_h(628.0, 814.0) - .top_left_with_margins_on(ui_widgets.window, 60.0, 30.0) - .set(self.ids.creation_window, ui_widgets); - - // Arrows - // TODO: Lower the resolution of the arrow images & use non decimal sizes below. - const ARROW_WH: [f64; 2] = [986.0 * 0.03, 1024.0 * 0.03]; - match self.creation_state { - CreationState::Race => { - Button::image(self.imgs.arrow_left_grey) - .wh(ARROW_WH) - .top_left_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_left, ui_widgets); - - if Button::image(self.imgs.arrow_right) - .wh(ARROW_WH) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .top_right_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_right, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Weapon; - } - } - CreationState::Weapon => { - if Button::image(self.imgs.arrow_left) - .wh(ARROW_WH) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .top_left_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_left, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Race; - } - - if Button::image(self.imgs.arrow_right) - .wh(ARROW_WH) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .top_right_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_right, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::SkinEyes); - } - } - CreationState::Body(_) => { - if Button::image(self.imgs.arrow_left) - .wh(ARROW_WH) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .top_left_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_left, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Weapon; - } - Button::image(self.imgs.arrow_right_grey) - .wh(ARROW_WH) - .top_right_with_margins_on(self.ids.creation_window, 74.0, 55.0) - .set(self.ids.arrow_right, ui_widgets); - } + .middle_of(self.ids.male) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.body_type_1, ui_widgets) + .was_clicked() + { + self.character_body.body_type = BodyType::Male; + } + // Female + Image::new(self.imgs.female) + .w_h(70.0, 70.0) + .top_right_with_margins_on(self.ids.creation_buttons_alignment_1, 0.0, 0.0) + .set(self.ids.female, ui_widgets); + if Button::image(if let BodyType::Female = self.character_body.body_type { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.female) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.body_type_2, ui_widgets) + .was_clicked() + { + self.character_body.body_type = BodyType::Female; } - // Races + // Alignment for Races and Weapons + Rectangle::fill_with([214.0, 304.0], color::TRANSPARENT) + .mid_bottom_with_margin_on(self.ids.creation_buttons_alignment_1, -324.0) + .set(self.ids.creation_buttons_alignment_2, ui_widgets); - // Weapon - - // Body - - // Race Selection - if let CreationState::Race = self.creation_state { - Text::new("Choose your Race") - .mid_top_with_margin_on(self.ids.creation_window, 74.0) - .font_size(28) - .color(TEXT_COLOR) - .set(self.ids.select_window_title, ui_widgets); - - // Male/Female/Race Icons - // Alignment - Rectangle::fill_with([151.0, 68.0], color::TRANSPARENT) - .mid_top_with_margin_on(self.ids.creation_window, 210.0) - .set(self.ids.body_type_bg, ui_widgets); - - // Male - Image::new(self.imgs.male) - .w_h(68.0, 68.0) - .mid_left_of(self.ids.body_type_bg) - .set(self.ids.male, ui_widgets); - if Button::image(if let BodyType::Male = self.character_body.body_type { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.male) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.body_type_1, ui_widgets) - .was_clicked() - { - self.character_body.body_type = BodyType::Male; - } - // Female - Image::new(self.imgs.female) - .w_h(68.0, 68.0) - .right_from(self.ids.male, 16.0) - .set(self.ids.female, ui_widgets); - if Button::image(if let BodyType::Female = self.character_body.body_type { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.female) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.body_type_2, ui_widgets) - .was_clicked() - { - self.character_body.body_type = BodyType::Female; - } - // Alignment - Rectangle::fill_with([458.0, 68.0], color::TRANSPARENT) - .mid_top_with_margin_on(self.ids.creation_window, 120.0) - .set(self.ids.races_bg, ui_widgets); - // TODO: If races were in some sort of array format, we could do this in a loop. - // Human - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.human_m - } else { - self.imgs.human_f - }) - .w_h(68.0, 68.0) - .mid_left_of(self.ids.races_bg) - .set(self.ids.human, ui_widgets); - if Button::image(if let Race::Human = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.human) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_1, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Human; - } - - // Orc - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.orc_m - } else { - self.imgs.orc_f - }) - .w_h(68.0, 68.0) - .right_from(self.ids.human, 10.0) - .set(self.ids.orc, ui_widgets); - if Button::image(if let Race::Orc = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.orc) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_2, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Orc; - } - // Dwarf - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.dwarf_m - } else { - self.imgs.dwarf_f - }) - .w_h(68.0, 68.0) - .right_from(self.ids.human, 10.0 * 2.0 + 68.0) - .set(self.ids.dwarf, ui_widgets); - if Button::image(if let Race::Dwarf = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.dwarf) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_3, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Dwarf; - } - // Elf - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.elf_m - } else { - self.imgs.elf_f - }) - .w_h(68.0, 68.0) - .right_from(self.ids.human, 10.0 * 3.0 + 68.0 * 2.0) - .set(self.ids.elf, ui_widgets); - if Button::image(if let Race::Elf = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.elf) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_4, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Elf; - } - // Undead - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.undead_m - } else { - self.imgs.undead_f - }) - .w_h(68.0, 68.0) - .right_from(self.ids.human, 10.0 * 4.0 + 68.0 * 3.0) - .set(self.ids.undead, ui_widgets); - if Button::image(if let Race::Undead = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.undead) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_5, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Undead; - } - // Danari - Image::new(if let BodyType::Male = self.character_body.body_type { - self.imgs.danari_m - } else { - self.imgs.danari_f - }) - .right_from(self.ids.human, 10.0 * 5.0 + 68.0 * 4.0) - .set(self.ids.danari, ui_widgets); - if Button::image(if let Race::Danari = self.character_body.race { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .w_h(68.0, 68.0) - .middle_of(self.ids.danari) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.race_6, ui_widgets) - .was_clicked() - { - self.character_body.race = Race::Danari; - } - - // Description Headline and Text - - // TODO: Load these from files (or from the server???). - const HUMAN_DESC: &str = - "The former nomads were only recently able to gain a foothold in the world of Veloren. \n\ - \n\ - Their greatest strengths are their adaptability and intelligence, which makes them allrounders in many fields.\n\ - \n\ - Humans are extremely diverse. \n\ - Some become wicked witches, slimy scoundrels, and members of the underworld, while others become witch-hunters, sages, and noble knights. \n\ - This diversity however creates constant conflict and antagonism between humans themselves, rather than with the other races of Veloren."; - const ORC_DESC: &str = - "They are considered brutal, rude and combative. \n\ - But once you gained their trust they will be loyal friends \n\ - that follow a strict code of honor in all of their actions. \n\ - \n\ - Their warriors are masters of melee combat, but their true power \ - comes from the magical rituals of their powerful shamans. \n\ - \n\ - They are divided into three clans. \n\ - Two of them are led by the conflicting descendants of the recently deceased High-Warlord. \n\ - The third clan was formed by a group of Shamans to prevent the bloodshed caused by the rivaling groups and to secure their source of magic: \n\ - A powerful nature crystal, stolen from the Brushwood Elves..."; - const DWARF_DESC: &str = - "Smoking chimneys, the sound of countless hammers and hoes. \ - Infinite tunnel systems to track down even the last chunk of metal in the ground. \n\ - \n\ - This race of master craftsmen and grim fighters exist almost \ - as long as the world itself.\n\ - And they don't plan to finish their reign over the undergrounds soon."; - const UNDEAD_DESC: &str = - "No one really knows the origin of these gruesome looking creatures. \n\ - Some may have been reawakened soldiers from a battleground others are said to be the result of experiments with dark magic.\n\ - \n\ - After being chased and slaughtered for years the more civilised Undead decided to form a community and negotiate a piece treaty with the other inhabitants of Veloren.\n\ - \n\ - They are known for being nefarious and silent assassins."; - const ELF_DESC: &str = - "No matter which shade of elves you encounter, they all have something in common: Magic. \n\ - They can be found in many Forms: \n\ - \n\ - Pale Elves, living in dark fortresses, executing atrocious rituals. \n\ - \n\ - Nature connected Brushwood Elves, that guard ancient powers inside the forests.\n\ - \n\ - Gold Elves that hunger for political power in their massive city states. \n\ - \n\ - Dark Elves, seeking war to brutalize their enemies, with ‘honor.’\n\ - \n\ - And many more!"; - const DANARI_DESC: &str = - "The white domes and towers of their underwater kingdom are often mistaken for coral reefs from above the water. \n\ - As a punishment those demonic creatures were banished to live detached from the rest of the world in ancient times. \n\ - \n\ - Once in a while one of them is born unaffected by this curse. Sadly this means that after reaching a certain age they won’t be able to live underwater anymore. \n\ - \n\ - Outcast communities consisting of these Blessed Danari have formed all over the land."; - - let (race_str, race_desc) = match self.character_body.race { - Race::Human => ("Humans", HUMAN_DESC), - Race::Orc => ("Orcs", ORC_DESC), - Race::Dwarf => ("Dwarves", DWARF_DESC), - Race::Undead => ("Undead", UNDEAD_DESC), - Race::Elf => ("Elves", ELF_DESC), - Race::Danari => ("Danari", DANARI_DESC), - }; - Text::new(race_str) - .mid_top_with_margin_on(self.ids.creation_window, 370.0) - .font_size(30) - .color(TEXT_COLOR) - .set(self.ids.race_heading, ui_widgets); - Text::new(race_desc) - .mid_top_with_margin_on(self.ids.creation_window, 410.0) - .w(500.0) - .font_size(20) - .font_id(self.fonts.opensans) - .color(TEXT_COLOR) - .wrap_by_word() - .set(self.ids.race_description, ui_widgets); + // Human + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.human_m + } else { + self.imgs.human_f + }) + .w_h(70.0, 70.0) + .top_left_with_margins_on(self.ids.creation_buttons_alignment_2, 0.0, 0.0) + .set(self.ids.human, ui_widgets); + if Button::image(if let Race::Human = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.human) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_1, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Human; } - if let CreationState::Weapon = self.creation_state { - Text::new("Choose your Weapon") - .mid_top_with_margin_on(self.ids.creation_window, 74.0) - .font_size(28) - .color(TEXT_COLOR) - .set(self.ids.select_window_title, ui_widgets); - // Alignment - Rectangle::fill_with([470.0, 60.0], color::TRANSPARENT) - .mid_top_with_margin_on(self.ids.creation_window, 180.0) - .set(self.ids.weapon_bg, ui_widgets); - // Weapons Icons - // Sword and Shield - Image::new(self.imgs.sword_shield) - .w_h(60.0, 60.0) - .mid_left_of(self.ids.weapon_bg) - .set(self.ids.sword_shield, ui_widgets); - if Button::image(if let Weapon::SwordShield = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.sword_shield) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_1, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::SwordShield; - } + // Orc + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.orc_m + } else { + self.imgs.orc_f + }) + .w_h(70.0, 70.0) + .right_from(self.ids.human, 2.0) + .set(self.ids.orc, ui_widgets); + if Button::image(if let Race::Orc = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.orc) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_2, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Orc; + } + // Dwarf + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.dwarf_m + } else { + self.imgs.dwarf_f + }) + .w_h(70.0, 70.0) + .right_from(self.ids.orc, 2.0) + .set(self.ids.dwarf, ui_widgets); + if Button::image(if let Race::Dwarf = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.dwarf) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_3, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Dwarf; + } + // Elf + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.elf_m + } else { + self.imgs.elf_f + }) + .w_h(70.0, 70.0) + .down_from(self.ids.human, 2.0) + .set(self.ids.elf, ui_widgets); + if Button::image(if let Race::Elf = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.elf) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_4, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Elf; + } + // Undead + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.undead_m + } else { + self.imgs.undead_f + }) + .w_h(70.0, 70.0) + .right_from(self.ids.elf, 2.0) + .set(self.ids.undead, ui_widgets); + if Button::image(if let Race::Undead = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.undead) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_5, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Undead; + } + // Danari + Image::new(if let BodyType::Male = self.character_body.body_type { + self.imgs.danari_m + } else { + self.imgs.danari_f + }) + .right_from(self.ids.undead, 2.0) + .set(self.ids.danari, ui_widgets); + if Button::image(if let Race::Danari = self.character_body.race { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .w_h(70.0, 70.0) + .middle_of(self.ids.danari) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.race_6, ui_widgets) + .was_clicked() + { + self.character_body.race = Race::Danari; + } - // Daggers - Image::new(self.imgs.daggers) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0) - .set(self.ids.daggers, ui_widgets); - if Button::image(if let Weapon::Daggers = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.daggers) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_2, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::Daggers; - } + // Hammer - // Sword - Image::new(self.imgs.sword) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0 * 2.0 + 60.0 * 1.0) - .set(self.ids.sword, ui_widgets); - if Button::image(if let Weapon::Sword = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.sword) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_3, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::Sword; - } - // Axe - Image::new(self.imgs.axe) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0 * 3.0 + 60.0 * 2.0) - .set(self.ids.axe, ui_widgets); - if Button::image(if let Weapon::Axe = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) - .middle_of(self.ids.axe) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_4, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::Axe; - } - // Hammer - Image::new(self.imgs.hammer) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0 * 4.0 + 60.0 * 3.0) - .set(self.ids.hammer, ui_widgets); - if Button::image(if let Weapon::Hammer = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) + Image::new(self.imgs.hammer) + .w_h(70.0, 70.0) + .bottom_left_with_margins_on(self.ids.creation_buttons_alignment_2, 0.0, 0.0) + .set(self.ids.hammer, ui_widgets); + if Button::image(if let Weapon::Hammer = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.hammer) + //.hover_image(self.imgs.icon_border_mo) + //.press_image(self.imgs.icon_border_press) + .set(self.ids.hammer_button, ui_widgets) + .was_clicked() + { + //self.character_body.weapon = Weapon::Hammer; + } + // REMOVE THIS AFTER IMPLEMENTATION + Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8)) .middle_of(self.ids.hammer) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_5, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::Hammer; - } - // Bow - Image::new(self.imgs.bow) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0 * 5.0 + 60.0 * 4.0) - .set(self.ids.bow, ui_widgets); - if Button::image(if let Weapon::Bow = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) + .set(self.ids.hammer_grey, ui_widgets); + + // Bow + + Image::new(self.imgs.bow) + .w_h(70.0, 70.0) + .right_from(self.ids.hammer, 2.0) + .set(self.ids.bow, ui_widgets); + if Button::image(if let Weapon::Bow = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.bow) + //.hover_image(self.imgs.icon_border_mo) + //.press_image(self.imgs.icon_border_press) + .set(self.ids.bow_button, ui_widgets) + .was_clicked() + { + //self.character_body.weapon = Weapon::Bow; + } + // REMOVE THIS AFTER IMPLEMENTATION + Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8)) .middle_of(self.ids.bow) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_6, ui_widgets) - .was_clicked() - { - self.character_body.weapon = Weapon::Bow; - } - // Staff - Image::new(self.imgs.staff) - .w_h(60.0, 60.0) - .right_from(self.ids.sword_shield, 8.0 * 6.0 + 60.0 * 5.0) - .set(self.ids.staff, ui_widgets); - if Button::image(if let Weapon::Staff = self.character_body.weapon { - self.imgs.icon_border_pressed - } else { - self.imgs.icon_border - }) + .set(self.ids.bow_grey, ui_widgets); + // Staff + Image::new(self.imgs.staff) + .w_h(70.0, 70.0) + .right_from(self.ids.bow, 2.0) + .set(self.ids.staff, ui_widgets); + if Button::image(if let Weapon::Staff = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.staff) + //.hover_image(self.imgs.icon_border_mo) + //.press_image(self.imgs.icon_border_press) + .set(self.ids.staff_button, ui_widgets) + .was_clicked() + { + //self.character_body.weapon = Weapon::Staff; + } + // REMOVE THIS AFTER IMPLEMENTATION + Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8)) .middle_of(self.ids.staff) - .hover_image(self.imgs.icon_border_mo) - .press_image(self.imgs.icon_border_press) - .set(self.ids.weapon_7, ui_widgets) - .was_clicked() + .set(self.ids.staff_grey, ui_widgets); + // Sword + Image::new(self.imgs.sword) + .w_h(70.0, 70.0) + .up_from(self.ids.hammer, 2.0) + .set(self.ids.sword, ui_widgets); + if Button::image(if let Weapon::Sword = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.sword) + .hover_image(self.imgs.icon_border_mo) + .press_image(self.imgs.icon_border_press) + .set(self.ids.sword_button, ui_widgets) + .was_clicked() + { + self.character_body.weapon = Weapon::Sword; + } + + // Daggers + Image::new(self.imgs.daggers) + .w_h(70.0, 70.0) + .right_from(self.ids.sword, 2.0) + .set(self.ids.daggers, ui_widgets); + if Button::image(if let Weapon::Daggers = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.daggers) + //.hover_image(self.imgs.icon_border_mo) + //.press_image(self.imgs.icon_border_press) + .set(self.ids.daggers_button, ui_widgets) + .was_clicked() + { + // self.character_body.weapon = Weapon::Daggers; + } // REMOVE THIS AFTER IMPLEMENTATION + Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8)) + .middle_of(self.ids.daggers) + .set(self.ids.daggers_grey, ui_widgets); + + // Axe + Image::new(self.imgs.axe) + .w_h(70.0, 70.0) + .right_from(self.ids.daggers, 2.0) + .set(self.ids.axe, ui_widgets); + if Button::image(if let Weapon::Axe = self.character_body.weapon { + self.imgs.icon_border_pressed + } else { + self.imgs.icon_border + }) + .middle_of(self.ids.axe) + //.hover_image(self.imgs.icon_border_mo) + //.press_image(self.imgs.icon_border_press) + .set(self.ids.axe_button, ui_widgets) + .was_clicked() + { + //self.character_body.weapon = Weapon::Axe; + } + // REMOVE THIS AFTER IMPLEMENTATION + Rectangle::fill_with([67.0, 67.0], color::rgba(0.0, 0.0, 0.0, 0.8)) + .middle_of(self.ids.axe) + .set(self.ids.axe_grey, ui_widgets); + + // Sliders + + // Hair Style + Text::new("Hair Style") + .mid_bottom_with_margin_on(self.ids.creation_buttons_alignment_2, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.hairstyle_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.hairstyle_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.hairstyle_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + + // Hair Color + + Text::new("Hair Color") + .mid_bottom_with_margin_on(self.ids.hairstyle_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.haircolor_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.haircolor_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.haircolor_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + + // Skin + + Text::new("Skin") + .mid_bottom_with_margin_on(self.ids.haircolor_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.skin_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.skin_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.skin_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + + // EyeBrows + Text::new("Eyebrows") + .mid_bottom_with_margin_on(self.ids.skin_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.eyebrows_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.eyebrows_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.eyebrows_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + + // EyeColor + Text::new("Eye Color") + .mid_bottom_with_margin_on(self.ids.eyebrows_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.eyecolor_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.eyecolor_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.eyecolor_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + // Accessories + Text::new("Accessories") + .mid_bottom_with_margin_on(self.ids.eyecolor_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.accessories_text, ui_widgets); + let current_chest = self.character_body.chest; + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.accessories_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.accessories_slider, ui_widgets) + { + self.character_body.chest = ALL_CHESTS[new_val]; + } + + // Beard + if let BodyType::Male = self.character_body.body_type { + Text::new("Beard") + .mid_bottom_with_margin_on(self.ids.accessories_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR) + .set(self.ids.beard_text, ui_widgets); + + if let Some(new_val) = ImageSlider::discrete( + ALL_CHESTS + .iter() + .position(|&c| c == current_chest) + .unwrap_or(0), + 0, + ALL_CHESTS.len() - 1, + self.imgs.slider_indicator, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.beard_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .pad_track((5.0, 5.0)) + .set(self.ids.beard_slider, ui_widgets) { - self.character_body.weapon = Weapon::Staff; + self.character_body.chest = ALL_CHESTS[new_val]; } - - // TODO: Load these from files (or from the server???). - const SWORDSHIELD_DESC: &str = " MISSING "; - const DAGGERS_DESC: &str = " MISSING "; - const SWORD_DESC: &str = " MISSING "; - const AXE_DESC: &str = " MISSING "; - const HAMMER_DESC: &str = " MISSING "; - const BOW_DESC: &str = " MISSING "; - const STAFF_DESC: &str = " MISSING "; - - let (weapon_str, weapon_desc) = match self.character_body.weapon { - Weapon::SwordShield => ("Sword and Shield", SWORDSHIELD_DESC), - Weapon::Daggers => ("Daggers", DAGGERS_DESC), - Weapon::Sword => ("Sword", SWORD_DESC), - Weapon::Axe => ("Axe", AXE_DESC), - Weapon::Hammer => ("Hammer", HAMMER_DESC), - Weapon::Bow => ("Bow", BOW_DESC), - Weapon::Staff => ("Staff", STAFF_DESC), - }; - Text::new(weapon_str) - .mid_top_with_margin_on(self.ids.creation_window, 370.0) - .font_size(30) - .color(TEXT_COLOR) - .set(self.ids.race_heading, ui_widgets); - Text::new(weapon_desc) - .mid_top_with_margin_on(self.ids.creation_window, 410.0) - .w(500.0) - .font_size(20) - .font_id(self.fonts.opensans) - .color(TEXT_COLOR) - .wrap_by_word() - .set(self.ids.race_description, ui_widgets); + } else { + Text::new("Beard") + .mid_bottom_with_margin_on(self.ids.accessories_slider, -40.0) + .font_size(18) + .font_id(self.fonts.metamorph) + .color(TEXT_COLOR_2) + .set(self.ids.beard_text, ui_widgets); + if let Some(val) = ImageSlider::continuous( + 5.0, + 0.0, + 10.0, + self.imgs.nothing, + self.imgs.slider_range, + ) + .w_h(208.0, 22.0) + .mid_bottom_with_margin_on(self.ids.beard_text, -30.0) + .track_breadth(12.0) + .slider_length(10.0) + .track_color(Color::Rgba(1.0, 1.0, 1.0, 0.2)) + .slider_color(Color::Rgba(1.0, 1.0, 1.0, 0.2)) + .pad_track((5.0, 5.0)) + .set(self.ids.beard_slider_2, ui_widgets) + {} } - // 3 states/windows: 1: Skin & Eyes 2: Hair 3: Accessories - // If one state is activated, the other ones collapse. - // The title bar is the button to unfold/collapse the windows. - // The BG Frame can be stretched to the needed size. - - // Window BG - if let CreationState::Body(state) = self.creation_state { - Text::new("Body Customization") - .mid_top_with_margin_on(self.ids.creation_window, 74.0) - .font_size(28) - .color(TEXT_COLOR) - .set(self.ids.select_window_title, ui_widgets); - - match state { - // Skin Eyes Open - BodyPart::SkinEyes => { - Image::new(self.imgs.skin_eyes_window) - .w_h(511.0, 333.0) - .mid_top_with_margin_on(self.ids.select_window_title, 60.0) - .set(self.ids.skin_eyes_window, ui_widgets); - // Open Window: Skin & Eyes - if Button::image(self.imgs.frame_open_mo) - .mid_top_with_margin_on(self.ids.skin_eyes_window, 0.0) - .w_h(511.0, 37.0) - //.hover_image(self.imgs.frame_open_mo) - //.press_image(self.imgs.frame_open_press) - .label("Skin & Eyes") - .label_color(TEXT_COLOR) - .label_y(conrod_core::position::Relative::Scalar(4.0)) - .label_font_size(16) - .set(self.ids.skin_eyes_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::SkinEyes); - } - // Closed: Hair - if Button::image(self.imgs.frame_closed) - .down_from(self.ids.skin_eyes_window, 5.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Hair") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.hair_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Hair); - } - // Closed: Accessories - if Button::image(self.imgs.frame_closed) - .down_from(self.ids.hair_button, 5.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Accessories") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.accessories_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Accessories); - } - } - - // Hair Open - BodyPart::Hair => { - Image::new(self.imgs.hair_window) - .w_h(511.0, 400.0) //333.0 - .down_from(self.ids.skin_eyes_button, 5.0) - .set(self.ids.hair_window, ui_widgets); - // Closed Window: Skin & Eyes - if Button::image(self.imgs.frame_closed) - .mid_top_with_margin_on(self.ids.select_window_title, 60.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Skin & Eyes") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.skin_eyes_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::SkinEyes); - } - // Open Window: Hair - if Button::image(self.imgs.frame_open_mo) - .mid_top_with_margin_on(self.ids.hair_window, 0.0) - .w_h(511.0, 37.0) - //.hover_image(self.imgs.frame_closed_mo) - //.press_image(self.imgs.frame_closed_press) - .label("Hair") - .label_color(TEXT_COLOR) - .label_y(conrod_core::position::Relative::Scalar(4.0)) - .label_font_size(16) - .set(self.ids.hair_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Hair); - } - // Closed: Accessories - if Button::image(self.imgs.frame_closed) - .down_from(self.ids.hair_window, 5.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Accessories") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.accessories_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Accessories); - } - } - - // Open: Accessories - BodyPart::Accessories => { - Image::new(self.imgs.hair_window) - .w_h(511.0, 333.0) - .down_from(self.ids.hair_button, 5.0) - .set(self.ids.accessories_window, ui_widgets); - // Closed Window: Skin & Eyes - if Button::image(self.imgs.frame_closed) - .mid_top_with_margin_on(self.ids.select_window_title, 60.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Skin & Eyes") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.skin_eyes_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::SkinEyes); - } - // Closed: Hair - if Button::image(self.imgs.frame_closed) - .down_from(self.ids.skin_eyes_button, 5.0) - .w_h(511.0, 31.0) - .hover_image(self.imgs.frame_closed_mo) - .press_image(self.imgs.frame_closed_press) - .label("Hair") - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.hair_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Hair); - } - // Open: Accessories - if Button::image(self.imgs.frame_open_mo) - .down_from(self.ids.hair_button, 5.0) - .w_h(511.0, 37.0) - //.hover_image(self.imgs.frame_closed_mo) - //.press_image(self.imgs.frame_closed_press) - .label("Accessories") - .label_y(conrod_core::position::Relative::Scalar(4.0)) - .label_color(TEXT_COLOR) - .label_font_size(16) - .set(self.ids.accessories_button, ui_widgets) - .was_clicked() - { - self.creation_state = CreationState::Body(BodyPart::Accessories); - } - } - } - - // Body Customization Window Contents - match state { - BodyPart::SkinEyes => { - // Skin Color: Text, Brightness Slider, Picker - Text::new("Skin Color") - .top_left_with_margins_on(self.ids.skin_rect, 0.0, -250.0) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.skin_color_text, ui_widgets); - // TODO: Align Buttons here. - // Users set a variable to a value from 0-14. - // Depending on the race another color will be chosen. - // Only the BG image (190x114 -> 2px border!) changes depending on the race. - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on(self.ids.skin_eyes_window, 60.0, 30.0) - .color(TEXT_COLOR) - .set(self.ids.skin_rect, ui_widgets); - - // TODO: Slider - // Sliders actually change the Alpha-Level of the main colour chosen above. - // -> They will appear "brighter", therefore the sliders are labeled "Brightness". - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on(self.ids.skin_rect, 10.0, -255.0) - .set(self.ids.skin_color_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.skin_color_slider_range) - .set(self.ids.skin_color_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on(self.ids.skin_color_slider_range, -27.0, 0.0) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.skin_color_slider_text, ui_widgets); - - // Eye Color: Text, Brightness Slider, Picker - Text::new("Eye Color") - .top_left_with_margins_on(self.ids.eyes_rect, 0.0, -250.0) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.eye_color_text, ui_widgets); - // TODO: Align 16 Buttons here. - // Users set a variable to a value from 0-14. - // Depending on the race another color will be chosen. - // Only the BG image (190x114 -> 2px border!) changes depending on the race. - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on(self.ids.skin_eyes_window, 186.0, 30.0) - .color(TEXT_COLOR) - .set(self.ids.eyes_rect, ui_widgets); - - // TODO: Slider - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on(self.ids.eyes_rect, 10.0, -255.0) - .set(self.ids.eye_color_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.eye_color_slider_range) - .set(self.ids.eye_color_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on(self.ids.eye_color_slider_range, -27.0, 0.0) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.eye_color_slider_text, ui_widgets); - } - - // Hair - - // Hair Styles -> Arrows - // Hair Color -> Picker - // Eye Brow Style -> Arrow - // Facial Hair -> Picker (Only active for males!) - BodyPart::Hair => { - // Hair - Text::new("Hair Style") - .mid_top_with_margin_on(self.ids.hair_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.hair_style_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.hair_style_text, 15.0) - .set(self.ids.hair_style_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.hair_style_text, 15.0) - .set(self.ids.hair_style_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Hair Color") - .top_left_with_margins_on(self.ids.hair_color_picker_bg, 0.0, -250.0) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.hair_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on(self.ids.hair_window, 114.0, 30.0) - .color(TEXT_COLOR) - .set(self.ids.hair_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.hair_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.hair_color_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.hair_color_slider_range) - .set(self.ids.hair_color_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on(self.ids.hair_color_slider_range, -27.0, 0.0) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.hair_color_slider_text, ui_widgets); - // Eyebrows - Text::new("Eyebrow Style") - .mid_top_with_margin_on(self.ids.hair_window, 280.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.eyebrow_style_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.eyebrow_style_text, 15.0) - .set(self.ids.eyebrow_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.eyebrow_style_text, 15.0) - .set(self.ids.eyebrow_arrow_l, ui_widgets) - .was_clicked() - {}; - // Beard -> Only active if "male" was chosen. - if let BodyType::Male = self.character_body.body_type { - Text::new("Beard Style") - .mid_top_with_margin_on(self.ids.hair_window, 340.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.beard_style_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.beard_style_text, 15.0) - .set(self.ids.beard_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.beard_style_text, 15.0) - .set(self.ids.beard_arrow_l, ui_widgets) - .was_clicked() - {}; - } - } - - // Accessories - - // Accessory Picker -> Arrows (Name changes with race!) - // Color -> Picker - // Brightness -> Slider - BodyPart::Accessories => { - match self.character_body.race { - Race::Human => { - Text::new("Head Band") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - Race::Orc => { - Text::new("Head Band") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - Race::Elf => { - Text::new("Tribe Markings") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - Race::Dwarf => { - Text::new("War Paint") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - Race::Undead => { - Text::new("Teeth") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - Race::Danari => { - Text::new("Horns") - .mid_top_with_margin_on(self.ids.accessories_window, 60.0) - .color(TEXT_COLOR) - .font_size(24) - .set(self.ids.warpaint_text, ui_widgets); - if Button::image(self.imgs.arrow_right) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_right_mo) - .press_image(self.imgs.arrow_right_press) - .right_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_r, ui_widgets) - .was_clicked() - {}; - if Button::image(self.imgs.arrow_left) - .w_h(986.0 * 0.02, 1024.0 * 0.02) - .hover_image(self.imgs.arrow_left_mo) - .press_image(self.imgs.arrow_left_press) - .left_from(self.ids.warpaint_text, 15.0) - .set(self.ids.warpaint_arrow_l, ui_widgets) - .was_clicked() - {}; - - Text::new("Color") - .top_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 0.0, - -250.0, - ) - .font_size(25) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_text, ui_widgets); - - Rectangle::fill_with([192.0, 116.0], color::WHITE) - .top_right_with_margins_on( - self.ids.accessories_window, - 114.0, - 30.0, - ) - .color(TEXT_COLOR) - .set(self.ids.warpaint_color_picker_bg, ui_widgets); - - Image::new(self.imgs.slider_range) - .w_h(208.0, 12.0) - .bottom_left_with_margins_on( - self.ids.warpaint_color_picker_bg, - 10.0, - -255.0, - ) - .set(self.ids.warpaint_slider_range, ui_widgets); - - Image::new(self.imgs.slider_indicator) - .w_h(10.0, 22.0) - .middle_of(self.ids.warpaint_slider_range) - .set(self.ids.warpaint_slider_indicator, ui_widgets); - - Text::new("Brightness") - .top_left_with_margins_on( - self.ids.warpaint_slider_range, - -27.0, - 0.0, - ) - .color(TEXT_COLOR) - .font_size(14) - .set(self.ids.warpaint_slider_text, ui_widgets); - } - } // match Race fin - } - } - } - } + } // Char Creation fin events } diff --git a/voxygen/src/menu/main/ui.rs b/voxygen/src/menu/main/ui.rs index ea57344543..76d9800b63 100644 --- a/voxygen/src/menu/main/ui.rs +++ b/voxygen/src/menu/main/ui.rs @@ -137,6 +137,7 @@ impl MainMenuUi { Text::new(version) .top_left_with_margins_on(ui_widgets.window, 5.0, 5.0) .font_size(14) + .font_id(self.fonts.opensans) .color(TEXT_COLOR) .set(self.ids.version, ui_widgets); diff --git a/voxygen/src/scene/camera.rs b/voxygen/src/scene/camera.rs index 5cf82313e8..d23638fdff 100644 --- a/voxygen/src/scene/camera.rs +++ b/voxygen/src/scene/camera.rs @@ -34,7 +34,7 @@ impl Camera { ori: Vec3::zero(), tgt_dist: 10.0, dist: 10.0, - fov: 1.3, + fov: 1.1, aspect, last_time: None, } diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 341b4822ad..1eb8cd58fa 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -132,7 +132,7 @@ impl FigureModelCache { fn load_head(head: Head) -> Mesh { Self::load_mesh( match head { - Head::Default => "head.vox", + Head::Default => "figure/head.vox", }, Vec3::new(-7.0, -5.5, -6.0), ) @@ -141,7 +141,12 @@ impl FigureModelCache { fn load_chest(chest: Chest) -> Mesh { Self::load_mesh( match chest { - Chest::Default => "chest.vox", + Chest::Default => "figure/body/chest_male.vox", + Chest::Blue => "armor/chest/chest_blue.vox", + Chest::Brown => "armor/chest/chest_brown.vox", + Chest::Dark => "armor/chest/chest_dark.vox", + Chest::Green => "armor/chest/chest_green.vox", + Chest::Orange => "armor/chest/chest_orange.vox", }, Vec3::new(-6.0, -3.5, 0.0), ) @@ -150,7 +155,8 @@ impl FigureModelCache { fn load_belt(belt: Belt) -> Mesh { Self::load_mesh( match belt { - Belt::Default => "belt.vox", + //Belt::Default => "figure/body/belt_male.vox", + Belt::Dark => "armor/belt/belt_dark.vox", }, Vec3::new(-5.0, -3.5, 0.0), ) @@ -159,7 +165,12 @@ impl FigureModelCache { fn load_pants(pants: Pants) -> Mesh { Self::load_mesh( match pants { - Pants::Default => "pants.vox", + Pants::Default => "figure/body/pants_male.vox", + Pants::Blue => "armor/pants/pants_blue.vox", + Pants::Brown => "armor/pants/pants_brown.vox", + Pants::Dark => "armor/pants/pants_dark.vox", + Pants::Green => "armor/pants/pants_green.vox", + Pants::Orange => "armor/pants/pants_orange.vox", }, Vec3::new(-5.0, -3.5, 0.0), ) @@ -168,7 +179,7 @@ impl FigureModelCache { fn load_left_hand(hand: Hand) -> Mesh { Self::load_mesh( match hand { - Hand::Default => "hand.vox", + Hand::Default => "figure/body/hand.vox", }, Vec3::new(2.0, 0.0, -7.0), ) @@ -177,7 +188,7 @@ impl FigureModelCache { fn load_right_hand(hand: Hand) -> Mesh { Self::load_mesh( match hand { - Hand::Default => "hand.vox", + Hand::Default => "figure/body/hand.vox", }, Vec3::new(2.0, 0.0, -7.0), ) @@ -186,7 +197,8 @@ impl FigureModelCache { fn load_left_foot(foot: Foot) -> Mesh { Self::load_mesh( match foot { - Foot::Default => "foot.vox", + Foot::Default => "figure/body/foot.vox", + Foot::Dark => "armor/foot/foot_dark.vox", }, Vec3::new(2.5, -3.5, -9.0), ) @@ -195,7 +207,8 @@ impl FigureModelCache { fn load_right_foot(foot: Foot) -> Mesh { Self::load_mesh( match foot { - Foot::Default => "foot.vox", + Foot::Default => "figure/body/foot.vox", + Foot::Dark => "armor/foot/foot_dark.vox", }, Vec3::new(2.5, -3.5, -9.0), ) @@ -204,9 +217,9 @@ impl FigureModelCache { fn load_weapon(weapon: Weapon) -> Mesh { Self::load_mesh( match weapon { - Weapon::Sword => "sword.vox", - // TODO actually match against other weapons and set the right model. - _ => "sword.vox", + Weapon::Sword => "weapon/sword/sword_wood_2h.vox", + // TODO actually match against other weapons and set the right model + _ => "weapon/sword/sword_wood_2h.vox", }, Vec3::new(0.0, 0.0, -4.0), ) @@ -215,24 +228,24 @@ impl FigureModelCache { fn load_left_shoulder(shoulder: Shoulder) -> Mesh { Self::load_mesh( match shoulder { - Shoulder::Default => "shoulder_l.vox", + Shoulder::Default => "armor/shoulder/shoulder_l_brown.vox", }, - Vec3::new(2.5, 0.0, 0.0), + Vec3::new(2.5, -0.5, 0.0), ) } fn load_right_shoulder(shoulder: Shoulder) -> Mesh { Self::load_mesh( match shoulder { - Shoulder::Default => "shoulder_r.vox", + Shoulder::Default => "armor/shoulder/shoulder_r_brown.vox", }, - Vec3::new(2.5, 0.0, 0.0), + Vec3::new(2.5, -0.5, 0.0), ) } fn load_draw(draw: Draw) -> Mesh { Self::load_mesh( match draw { - Draw::Default => "glider.vox", + Draw::Default => "object/glider.vox", }, Vec3::new(-26.0, -26.0, -5.0), ) @@ -241,7 +254,7 @@ impl FigureModelCache { fn load_pig_head(pig_head: PigHead) -> Mesh { Self::load_mesh( match pig_head { - PigHead::Default => "pighead.vox", + PigHead::Default => "npc/pig_purple/pighead.vox", }, Vec3::new(-6.0, 4.5, 3.0), ) @@ -250,7 +263,7 @@ impl FigureModelCache { fn load_pig_chest(pig_chest: PigChest) -> Mesh { Self::load_mesh( match pig_chest { - PigChest::Default => "pigchest.vox", + PigChest::Default => "npc/pig_purple/pigchest.vox", }, Vec3::new(-5.0, 4.5, 0.0), ) @@ -259,7 +272,7 @@ impl FigureModelCache { fn load_pig_leg_lf(pig_leg_l: PigLegL) -> Mesh { Self::load_mesh( match pig_leg_l { - PigLegL::Default => "pigleg_l.vox", + PigLegL::Default => "npc/pig_purple/pigleg_l.vox", }, Vec3::new(0.0, -1.0, -1.5), ) @@ -268,7 +281,7 @@ impl FigureModelCache { fn load_pig_leg_rf(pig_leg_r: PigLegR) -> Mesh { Self::load_mesh( match pig_leg_r { - PigLegR::Default => "pigleg_r.vox", + PigLegR::Default => "npc/pig_purple/pigleg_r.vox", }, Vec3::new(0.0, -1.0, -1.5), ) @@ -277,7 +290,7 @@ impl FigureModelCache { fn load_pig_leg_lb(pigleg_l: PigLegL) -> Mesh { Self::load_mesh( match pigleg_l { - PigLegL::Default => "pigleg_l.vox", + PigLegL::Default => "npc/pig_purple/pigleg_l.vox", }, Vec3::new(0.0, -1.0, -1.5), ) @@ -286,7 +299,7 @@ impl FigureModelCache { fn load_pig_leg_rb(pig_leg_r: PigLegR) -> Mesh { Self::load_mesh( match pig_leg_r { - PigLegR::Default => "pigleg_r.vox", + PigLegR::Default => "npc/pig_purple/pigleg_r.vox", }, Vec3::new(0.0, -1.0, -1.5), ) diff --git a/voxygen/src/scene/figure/figure.rs b/voxygen/src/scene/figure/figure.rs index 7743a75dad..34fd22c9ac 100644 --- a/voxygen/src/scene/figure/figure.rs +++ b/voxygen/src/scene/figure/figure.rs @@ -108,7 +108,7 @@ impl FigureModelCache { fn load_head(head: Head) -> Mesh { Self::load_mesh( match head { - Head::Default => "head.vox", + Head::Default => "figure/head.vox", }, Vec3::new(-7.0, -5.5, -6.0), ) diff --git a/voxygen/src/scene/figure/figurequad.rs b/voxygen/src/scene/figure/figurequad.rs index 1d6244b789..e6d5b92f31 100644 --- a/voxygen/src/scene/figure/figurequad.rs +++ b/voxygen/src/scene/figure/figurequad.rs @@ -100,7 +100,7 @@ impl FigureModelCache { // TODO: Don't make this public. pub fn load_mesh(filename: &str, position: Vec3) -> Mesh { - let full_path: String = ["/voxygen/voxel/", filename].concat(); + let full_path: String = ["/voxygen/voxel/npc/", filename].concat(); Segment::from(assets::load_expect::(full_path.as_str()).as_ref()) .generate_mesh(position) } @@ -108,7 +108,7 @@ impl FigureModelCache { fn load_head(head: Head) -> Mesh { Self::load_mesh( match head { - Head::Default => "pighead.vox", + Head::Default => "pig_purple/pighead.vox", }, Vec3::new(0.0, 0.0, 0.0), ) @@ -117,7 +117,7 @@ impl FigureModelCache { fn load_chest(chest: Chest) -> Mesh { Self::load_mesh( match chest { - Chest::Default => "pigchest.vox", + Chest::Default => "pig_purple/pigchest.vox", }, Vec3::new(0.0, 0.0, 0.0), ) @@ -126,7 +126,7 @@ impl FigureModelCache { fn load_leg_lf(leg_l: Leg_l) -> Mesh { Self::load_mesh( match belt { - Belt::Default => "pigleg_l.vox", + Belt::Default => "pig_purple/pigleg_l.vox", }, Vec3::new(0.0, 0.0, 0.0), ) @@ -135,7 +135,7 @@ impl FigureModelCache { fn load_leg_rf(leg_r: Leg_r) -> Mesh { Self::load_mesh( match pants { - Pants::Default => "pigleg_r.vox", + Pants::Default => "pig_purple/pigleg_r.vox", }, Vec3::new(0.0, 0.0, 0.0), ) @@ -144,7 +144,7 @@ impl FigureModelCache { fn load_leg_lb(leg_l: Leg_l) -> Mesh { Self::load_mesh( match hand { - Hand::Default => "pigleg_l.vox", + Hand::Default => "pig_purple/pigleg_l.vox", }, Vec3::new(0.0, 0.0, 0.0), ) @@ -153,7 +153,7 @@ impl FigureModelCache { fn load_leg_rb(leg_r: Leg_r) -> Mesh { Self::load_mesh( match hand { - Hand::Default => "pigleg_r.vox", + Hand::Default => "pig_purple/pigleg_r.vox", }, Vec3::new(0.0, 0.0, 0.0), )