From 1fd7f15a3bbf6146462e37d333c2733fa7b802a0 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 18:47:20 +1100 Subject: [PATCH 1/4] add more smiley components --- server/src/img.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/src/img.rs b/server/src/img.rs index 5e0603a2..10b38a0e 100644 --- a/server/src/img.rs +++ b/server/src/img.rs @@ -274,6 +274,9 @@ pub fn smile(id: Uuid) -> Result { ("M0,0 L50,25 M50,0 L0,25", 1), // x ("M0,0 L50,12.5 L0,25", 1), // > ("M50,0 L0,12.5 L50,25", 1), // < + ("M0,0 L0,25 L50,25", 1), // L + ("M50,0 L50,25 L0,25", 1), // J + ("M12.5,0 L37.5,0 L37.5,25 L12.5,25 L12.5,0", 1), // o ]; let eye_left_dist = WeightedIndex::new(eyes_left.iter().map(|v| v.1))?; @@ -283,10 +286,13 @@ pub fn smile(id: Uuid) -> Result { ("M150,0 L175,25 L200,0", 1), // v ("M150,25 L175,0 L200,25", 1), // ^ ("M150,0 L200,0", 1), // - - ("M150,25 L200,25", 1), // - + ("M150,25 L200,25", 1), // _ ("M150,0 L200,25 M200,0 L150,25", 1), // x ("M150,0 L200,12.5 L150,25", 1), // > ("M200,0 L150,12.5 L200,25", 1), // < + ("M150,0 L150,25 L200,25", 1), // L + ("M200,0 L200,25 L150,25", 1), // J + ("M162.5,0 L187.5,0 L187.5,25 L162.5,25 L162.5,0", 1), // o ]; let eye_right_dist= WeightedIndex::new(eyes_right.iter().map(|v| v.1))?; @@ -299,6 +305,11 @@ pub fn smile(id: Uuid) -> Result { ("M50,75 L75,75 L75,87.5 M75,75 L125,75 L125,87.5 M125,75 L150,75", 1), // vamp ("M75,75 L125,75 L125,100 L75,100 L75,75", 1), // o ("M50,75 L150,100 M150,75 L50,100", 1), // x + ("M50,75 L150,75 L150,100 L125,100 L125,75", 1), // p + ("M50,75 L50,100 L150,100 L150,75", 1), // u + ("M50,100 L50,75 L150,75 L150,100", 1), // n + ("M50,75 L50,100 L150,75 L150,100", 1), // Z + ("M50,87.5 L100,75 L150,87.5 L100,100 L50,87.5", 1), // Z ]; let mouth_dist = WeightedIndex::new(mouths.iter().map(|v| v.1))?; From d767db40e93fdac17bae59a116714c157c7a7aa8 Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 18:53:36 +1100 Subject: [PATCH 2/4] fix link border --- client/src/components/buttons.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/buttons.jsx b/client/src/components/buttons.jsx index 78232928..af6f0f72 100644 --- a/client/src/components/buttons.jsx +++ b/client/src/components/buttons.jsx @@ -8,7 +8,7 @@ module.exports = { Slay: () => 'red-green-border', Siphon: () => 'blue-green-border', // Stun - Link: () => 'blue-greenborder', + Link: () => 'blue-green-border', Bash: () => 'red-border', Sleep: () => 'green-border', Ruin: () => 'blue-border', From b82dee018a09fe7b5b942f3f7f462113bcefa5cd Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 21:42:44 +1100 Subject: [PATCH 3/4] more smiley stuff --- server/src/img.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/src/img.rs b/server/src/img.rs index 10b38a0e..3ac57908 100644 --- a/server/src/img.rs +++ b/server/src/img.rs @@ -276,6 +276,7 @@ pub fn smile(id: Uuid) -> Result { ("M50,0 L0,12.5 L50,25", 1), // < ("M0,0 L0,25 L50,25", 1), // L ("M50,0 L50,25 L0,25", 1), // J + ("M0,0 L50,0 M50,6.25 L50,12.5 M50,18.75 L50,25", 1), // ; ("M12.5,0 L37.5,0 L37.5,25 L12.5,25 L12.5,0", 1), // o ]; let eye_left_dist = WeightedIndex::new(eyes_left.iter().map(|v| v.1))?; @@ -292,6 +293,7 @@ pub fn smile(id: Uuid) -> Result { ("M200,0 L150,12.5 L200,25", 1), // < ("M150,0 L150,25 L200,25", 1), // L ("M200,0 L200,25 L150,25", 1), // J + ("M150,0 L200,0 M150,6.25 L150,12.5 M150,18.75 L150,25", 1), // ; ("M162.5,0 L187.5,0 L187.5,25 L162.5,25 L162.5,0", 1), // o ]; let eye_right_dist= WeightedIndex::new(eyes_right.iter().map(|v| v.1))?; @@ -303,10 +305,12 @@ pub fn smile(id: Uuid) -> Result { ("M50,75 L150,75 L150,100 L50,100 L50,75", 1), // box ("M50,75 L75,100 L100,75 L125,100 L150,75", 1), // w ("M50,75 L75,75 L75,87.5 M75,75 L125,75 L125,87.5 M125,75 L150,75", 1), // vamp + ("M50,75 L150,75 M50,75 L50,87.5 M75,75 L75,87.5 M100,75 L100,87.5 M125,75 L125,87.5 M150,75 L150,87.5", 1), // mm ("M75,75 L125,75 L125,100 L75,100 L75,75", 1), // o ("M50,75 L150,100 M150,75 L50,100", 1), // x ("M50,75 L150,75 L150,100 L125,100 L125,75", 1), // p - ("M50,75 L50,100 L150,100 L150,75", 1), // u + ("M50,75 L150,75 M50,75 L50,100 L75,100 L75,75", 1), // d + // ("M50,75 L50,100 L150,100 L150,75", 1), // u ("M50,100 L50,75 L150,75 L150,100", 1), // n ("M50,75 L50,100 L150,75 L150,100", 1), // Z ("M50,87.5 L100,75 L150,87.5 L100,100 L50,87.5", 1), // Z From 707b3c62179378db11c4f91746d2111be5f9ad5b Mon Sep 17 00:00:00 2001 From: ntr Date: Mon, 4 Nov 2019 22:08:54 +1100 Subject: [PATCH 4/4] change wheel --- client/src/components/vbox.component.jsx | 5 +++-- server/src/account.rs | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index 35afcd39..436eb9d1 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -29,6 +29,7 @@ const addState = connect( } function sendVboxAccept(group, index) { + document.activeElement.blur(); return ws.sendVboxAccept(instance.id, group, index); } @@ -217,7 +218,7 @@ class Vbox extends preact.Component { const vboxObject = shapes[v] ? shapes[v]() : v; return ( -