Enhance Password Minigame: Implement on-screen keyboard toggle functionality and update password visibility button to use icons. Add new CSS styles for keyboard and control buttons to improve user interaction. Adjust display logic for the on-screen keyboard based on user preferences.

This commit is contained in:
Z. Cliffe Schreuders
2025-10-21 11:12:23 +01:00
parent 441aeae8d3
commit f787bd7683
6 changed files with 1085 additions and 520 deletions

BIN
assets/icons/hidden.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 123 B

BIN
assets/icons/visible.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 B

View File

@@ -1,318 +1,571 @@
{ "compressionlevel":-1,
"height":9,
"infinite":false,
"layers":[
{
"data":[1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 0, 0, 0, 0, 0, 0, 0, 0, 30,
31, 32, 33, 0, 0, 0, 0, 38, 39, 40,
41, 42, 43, 0, 0, 0, 0, 48, 49, 50,
51, 52, 53, 0, 0, 0, 0, 58, 59, 60,
61, 0, 0, 0, 0, 0, 0, 0, 0, 70,
71, 0, 0, 0, 0, 0, 0, 0, 0, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90],
"height":9,
"id":1,
"name":"walls",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
81, 82, 83, 84, 85, 86, 87, 88, 89, 90],
"height":9,
"id":13,
"name":"props",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"data":[0, 101, 0, 0, 0, 0, 0, 0, 101, 0,
0, 102, 0, 0, 0, 0, 0, 0, 102, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"height":9,
"id":9,
"name":"doors",
"opacity":1,
"type":"tilelayer",
"visible":true,
"width":10,
"x":0,
"y":0
},
{
"draworder":"topdown",
"id":7,
"name":"Object Layer 1",
"objects":[
{
"height":48,
"id":1,
"name":"pc",
"properties":[
{
"name":"this is a test",
"type":"string",
"value":"test"
}],
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":389.6719453501,
"y":138.213476168298
},
{
"height":48,
"id":3,
"name":"pc",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":388.487657196088,
"y":227.346374786523
},
{
"height":48,
"id":4,
"name":"pc",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":49.3170315168452,
"y":228.817730166123
},
{
"height":48,
"id":5,
"name":"notes",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":317.792889302903,
"y":137.602856699271
},
{
"height":48,
"id":6,
"name":"notes",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":79.528644620401,
"y":140.339854059928
},
{
"height":48,
"id":7,
"name":"phone",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":49.3437354448067,
"y":139.094395280236
},
{
"height":48,
"id":10,
"name":"photo",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":352.440149045179,
"y":140.326812606738
},
{
"height":48,
"id":11,
"name":"suitcase",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":326.793044558298,
"y":56.1217202297777
},
{
"height":48,
"id":12,
"name":"key",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":351.592800926755,
"y":276.858654464617
},
{
"height":48,
"id":13,
"name":"safe",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":113.75128085701,
"y":36.7545412203075
},
{
"height":48,
"id":18,
"name":"safe",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":265.75128085701,
"y":36.7545412203075
},
{
"height":48,
"id":14,
"name":"book",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":256.307303316152,
"y":38.0159793629749
},
{
"height":48,
"id":15,
"name":"fingerprint_kit",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":269.273404750815,
"y":173.063809967396
},
{
"height":48,
"id":16,
"name":"spoofing_kit",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":163.475857786058,
"y":235.729855612483
},
{
"height":48,
"id":17,
"name":"lockpick",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":268.518863530508,
"y":251.312529110387
},
{
"height":48,
"id":14,
"name":"pc2",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":170,
"y":193
},
{
"height":48,
"id":11,
"name":"tablet",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":280,
"y":130
},
{
"height":48,
"id":12,
"name":"bluetooth_scanner",
"rotation":0,
"type":"",
"visible":true,
"width":48,
"x":380,
"y":166
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}],
"nextlayerid":12,
"nextobjectid":17,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.0",
"tileheight":32,
"tilesets":[
{
"columns":10,
"firstgid":1,
"image":"room_office.png",
"imageheight":320,
"imagewidth":320,
"margin":0,
"name":"room_office_l",
"spacing":0,
"tilecount":100,
"tileheight":32,
"tilewidth":32
},
{
"columns":1,
"firstgid":101,
"image":"..\/tiles\/door.png",
"imageheight":96,
"imagewidth":48,
"margin":0,
"name":"door",
"spacing":0,
"tilecount":2,
"tileheight":48,
"tilewidth":48
}],
"tilewidth":32,
"type":"map",
"version":"1.10",
"width":10
{
"compressionlevel": -1,
"height": 5,
"infinite": false,
"layers": [
{
"data": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
0,
0,
0,
0,
0,
0,
0,
0,
30,
31,
32,
33,
0,
0,
0,
0,
38,
39,
40,
41,
42,
43,
0,
0,
0,
0,
48,
49,
50,
51,
52,
53,
0,
0,
0,
0,
58,
59,
60,
61,
0,
0,
0,
0,
0,
0,
0,
0,
70,
71,
0,
0,
0,
0,
0,
0,
0,
0,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90
],
"height": 5,
"id": 1,
"name": "walls",
"opacity": 1,
"type": "tilelayer",
"visible": true,
"width": 5,
"x": 0,
"y": 0
},
{
"data": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90
],
"height": 5,
"id": 13,
"name": "props",
"opacity": 1,
"type": "tilelayer",
"visible": true,
"width": 5,
"x": 0,
"y": 0
},
{
"data": [
0,
101,
0,
0,
0,
0,
0,
0,
101,
0,
0,
102,
0,
0,
0,
0,
0,
0,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"height": 5,
"id": 9,
"name": "doors",
"opacity": 1,
"type": "tilelayer",
"visible": true,
"width": 5,
"x": 0,
"y": 0
},
{
"draworder": "topdown",
"id": 7,
"name": "Object Layer 1",
"objects": [
{
"height": 18,
"id": 1,
"name": "pc",
"properties": [
{
"name": "this is a test",
"type": "string",
"value": "test"
}
],
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 152,
"y": 53
},
{
"height": 18,
"id": 3,
"name": "pc",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 152,
"y": 88
},
{
"height": 18,
"id": 4,
"name": "pc",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 18,
"y": 89
},
{
"height": 18,
"id": 5,
"name": "notes",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 124,
"y": 53
},
{
"height": 18,
"id": 6,
"name": "notes",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 30,
"y": 54
},
{
"height": 18,
"id": 7,
"name": "phone",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 18,
"y": 53
},
{
"height": 18,
"id": 10,
"name": "photo",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 138,
"y": 54
},
{
"height": 18,
"id": 11,
"name": "suitcase",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 128,
"y": 21
},
{
"height": 18,
"id": 12,
"name": "key",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 138,
"y": 108
},
{
"height": 18,
"id": 13,
"name": "safe",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 44,
"y": 13
},
{
"height": 18,
"id": 18,
"name": "safe",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 104,
"y": 13
},
{
"height": 18,
"id": 14,
"name": "book",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 100,
"y": 13
},
{
"height": 18,
"id": 15,
"name": "fingerprint_kit",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 105,
"y": 66
},
{
"height": 18,
"id": 16,
"name": "spoofing_kit",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 64,
"y": 92
},
{
"height": 18,
"id": 17,
"name": "lockpick",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 105,
"y": 98
},
{
"height": 18,
"id": 14,
"name": "pc2",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 66,
"y": 74
},
{
"height": 18,
"id": 11,
"name": "tablet",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 109,
"y": 50
},
{
"height": 18,
"id": 12,
"name": "bluetooth_scanner",
"rotation": 0,
"type": "",
"visible": true,
"width": 18,
"x": 149,
"y": 64
}
],
"opacity": 1,
"type": "objectgroup",
"visible": true,
"x": 0,
"y": 0
}
],
"nextlayerid": 12,
"nextobjectid": 17,
"orientation": "orthogonal",
"renderorder": "right-down",
"tiledversion": "1.11.0",
"tileheight": 32,
"tilesets": [
{
"columns": 10,
"firstgid": 1,
"image": "room_office.png",
"imageheight": 426,
"imagewidth": 426,
"margin": 0,
"name": "room_office",
"spacing": 0,
"tilecount": 100,
"tileheight": 32,
"tilewidth": 32
},
{
"columns": 1,
"firstgid": 101,
"image": "../tiles/door.png",
"imageheight": 85,
"imagewidth": 42,
"margin": 0,
"name": "door",
"spacing": 0,
"tilecount": 2,
"tileheight": 32,
"tilewidth": 32
}
],
"tilewidth": 32,
"type": "map",
"version": "1.10",
"width": 5
}

View File

@@ -68,7 +68,7 @@
"name":"Object Layer 1",
"objects":[
{
"height":32,
"height":48,
"id":1,
"name":"pc",
"properties":[
@@ -80,111 +80,111 @@
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":82,
"y":31
"width":48,
"x":120.211047827175,
"y":49.4391763561042
},
{
"height":32,
"height":48,
"id":3,
"name":"phone",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":209,
"y":53
"width":48,
"x":320.848944866127,
"y":48.8525036839323
},
{
"height":32,
"height":48,
"id":8,
"name":"key",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":129,
"y":33
"width":48,
"x":194.022520643924,
"y":49.9784802735841
},
{
"height":32,
"height":48,
"id":10,
"name":"notes",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":169,
"y":57
"width":48,
"x":244.67400672839,
"y":62.9697778519203
},
{
"height":32,
"height":48,
"id":11,
"name":"tablet",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":254,
"y":142
"width":48,
"x":381.155225623488,
"y":188.624572524814
},
{
"height":32,
"height":48,
"id":12,
"name":"bluetooth_scanner",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":191,
"y":129
"width":48,
"x":287.11485528401,
"y":194.025690216031
},
{
"height":32,
"height":48,
"id":13,
"name":"bluetooth_spoofer",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":95,
"y":127
"width":48,
"x":143.838518642089,
"y":191.623488197514
},
{
"gid":12327,
"height":32,
"height":48,
"id":13,
"name":"safe",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":126,
"y":58
"width":48,
"x":192,
"y":96
},
{
"gid":12327,
"height":32,
"height":48,
"id":14,
"name":"safe2",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":93,
"y":200
"width":48,
"x":140,
"y":300
},
{
"gid":12327,
"height":32,
"height":48,
"id":15,
"name":"safe3",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":219,
"y":256
"width":48,
"x":350,
"y":250
}],
"opacity":1,
"type":"objectgroup",
@@ -196,63 +196,39 @@
"nextobjectid":13,
"orientation":"orthogonal",
"renderorder":"right-down",
"tiledversion":"1.11.0",
"tileheight":32,
"tiledversion":"1.11.2",
"tileheight":48,
"tilesets":[
{
"columns":10,
"firstgid":1,
"image":"room_reception.png",
"imageheight":320,
"imagewidth":320,
"image":"room_reception_l.png",
"imageheight":480,
"imagewidth":480,
"margin":0,
"name":"room_reception",
"name":"room_reception_l",
"spacing":0,
"tilecount":100,
"tileheight":32,
"tileheight":48,
"tiles":[
{
"id":10,
"objectgroup":
{
"draworder":"index",
"name":"",
"objects":[
{
"height":1,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":31,
"x":0,
"y":29
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":11,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":1,
"height":2.75,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":31,
"x":0,
"y":26
"width":47.625,
"x":0.25,
"y":45.25
}],
"opacity":1,
"type":"objectgroup",
@@ -266,18 +242,19 @@
"objectgroup":
{
"draworder":"index",
"id":3,
"name":"",
"objects":[
{
"height":1,
"id":1,
"height":2.875,
"id":5,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":31,
"x":0,
"y":30
"width":47.75,
"x":0.25,
"y":45.125
}],
"opacity":1,
"type":"objectgroup",
@@ -291,18 +268,97 @@
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":1,
"height":2.875,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":47.75,
"x":0.125,
"y":45.0625
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":14,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":1.5,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":47.625,
"x":0.25,
"y":46.5
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":15,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":2.875,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":31,
"x":0,
"y":30
"width":47.75,
"x":0.125,
"y":44.8125
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":16,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":2.875,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":47.75,
"x":0.125,
"y":39.0625
}],
"opacity":1,
"type":"objectgroup",
@@ -316,95 +372,19 @@
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":0,
"id":3,
"height":2.875,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":19,
"y":6
},
{
"height":0,
"id":6,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":19,
"y":12
},
{
"height":0,
"id":7,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":20,
"y":13
},
{
"height":0,
"id":8,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":22,
"y":14
},
{
"height":0,
"id":9,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":23,
"y":16
},
{
"height":0,
"id":10,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":25,
"y":17
},
{
"height":0,
"id":11,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":28,
"y":17
},
{
"height":0,
"id":12,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":31,
"y":19
"width":47.875,
"x":0.25,
"y":45.25
}],
"opacity":1,
"type":"objectgroup",
@@ -418,6 +398,136 @@
"objectgroup":
{
"draworder":"index",
"id":3,
"name":"",
"objects":[
{
"height":2.875,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":47.75,
"x":0.25,
"y":45.25
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":22,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":0,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":28.6021787636173,
"y":9.70206063787899
},
{
"height":0,
"id":6,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":28.7281795511222,
"y":18.0181126132038
},
{
"height":0,
"id":7,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":30.7441921512009,
"y":20.0341252132826
},
{
"height":0,
"id":8,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":33.2642079012994,
"y":21.6721354508466
},
{
"height":0,
"id":9,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":34.7762173513584,
"y":24.0661504134401
},
{
"height":0,
"id":10,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":38.0522378264864,
"y":26.0821630135188
},
{
"height":0,
"id":11,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":42.8402677516735,
"y":26.8381677385484
},
{
"height":0,
"id":12,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":46.9982937393359,
"y":28.8541803386271
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":23,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
@@ -428,8 +538,8 @@
"type":"",
"visible":true,
"width":0,
"x":0,
"y":19
"x":0.882005512534453,
"y":28.8541803386271
},
{
"height":0,
@@ -439,8 +549,8 @@
"type":"",
"visible":true,
"width":0,
"x":13,
"y":17
"x":20.6641291508072,
"y":26.2081638010238
},
{
"height":0,
@@ -450,8 +560,35 @@
"type":"",
"visible":true,
"width":0,
"x":26,
"y":17
"x":40.320252001575,
"y":26.0821630135188
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":24,
"objectgroup":
{
"draworder":"index",
"id":3,
"name":"",
"objects":[
{
"height":17.3881086756792,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":48.7623047644048,
"x":0.252001575009844,
"y":18.3961149757186
}],
"opacity":1,
"type":"objectgroup",
@@ -461,22 +598,130 @@
}
},
{
"id":19,
"id":25,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":11,
"height":17.2621078881743,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":49.6443102769392,
"x":0.126000787504922,
"y":18.5221157632235
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":26,
"objectgroup":
{
"draworder":"index",
"id":3,
"name":"",
"objects":[
{
"height":21.4201338758367,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":32,
"x":0,
"y":12
"width":17.2621078881743,
"x":30.618191363696,
"y":17.8921118256989
},
{
"height":17.8921118256989,
"id":4,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":40.4462527890799,
"x":-9.82806142538391,
"y":18.2701141882137
}],
"opacity":1,
"type":"objectgroup",
"visible":true,
"x":0,
"y":0
}
},
{
"id":27,
"objectgroup":
{
"draworder":"index",
"id":2,
"name":"",
"objects":[
{
"height":20.916130725817,
"id":1,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":8.56805355033469,
"x":0.126000787504922,
"y":18.2701141882137
},
{
"height":0,
"id":2,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":6.3000393752461,
"y":26.4601653760336
},
{
"height":0,
"id":3,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":10.7100669379184,
"y":23.6881480509253
},
{
"height":0,
"id":4,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":14.7420921380759,
"y":20.7901299383121
},
{
"height":0,
"id":5,
"name":"",
"rotation":0,
"type":"",
"visible":true,
"width":0,
"x":14.7420921380759,
"y":6.55204095025594
}],
"opacity":1,
"type":"objectgroup",
@@ -485,22 +730,22 @@
"y":0
}
}],
"tilewidth":32
"tilewidth":48
},
{
"columns":6,
"columns":2,
"firstgid":101,
"image":"..\/tiles\/door_sheet_32.png",
"imageheight":64,
"imagewidth":192,
"image":"..\/tiles\/door_tiles.png",
"imageheight":96,
"imagewidth":96,
"margin":0,
"name":"door_tiles",
"spacing":0,
"tilecount":12,
"tileheight":32,
"tilewidth":32
"tilecount":4,
"tileheight":48,
"tilewidth":48
}],
"tilewidth":32,
"tilewidth":48,
"type":"map",
"version":"1.10",
"width":10

View File

@@ -171,12 +171,61 @@
padding: 5px;
/* border-radius: 3px; */
transition: background-color 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
}
.toggle-password-btn:hover {
background: rgba(0, 255, 0, 0.1);
}
.icon-small {
width: 20px;
height: 20px;
object-fit: contain;
}
.icon-keyboard {
width: 40px;
height: 40px;
object-fit: contain;
image-rendering: pixelated;
image-rendering: -moz-crisp-edges;
image-rendering: crisp-edges;
}
.password-controls {
display: flex;
justify-content: center;
gap: 15px;
align-items: center;
margin-top: 10px;
position: relative;
z-index: 10;
}
.keyboard-toggle-btn {
background: #444;
border: 2px solid #666;
padding: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all 0.3s ease;
}
.keyboard-toggle-btn:hover {
background: #555;
border-color: #00ff00;
}
.keyboard-toggle-btn:active {
background: #00ff00;
transform: scale(0.95);
}
.password-hint-container {
display: flex;
flex-direction: column;
@@ -288,7 +337,7 @@
}
.onscreen-keyboard {
display: flex;
display: none;
flex-direction: column;
gap: 5px;
background: #2a2a2a;

View File

@@ -15,7 +15,8 @@ export class PasswordMinigame extends MinigameScene {
showPassword: false,
postitNote: params.postitNote || '',
showPostit: params.showPostit || false,
capsLock: false
capsLock: false,
keyboardVisible: false
};
// Store the correct password for validation
@@ -54,7 +55,7 @@ export class PasswordMinigame extends MinigameScene {
placeholder="Enter password..."
maxlength="50">
<button type="button" class="toggle-password-btn" id="toggle-password">
${this.gameData.showPassword ? '👁️' : '👁️‍🗨️'}
<img class="icon-small" src="${this.gameData.showPassword ? 'assets/icons/visible.png' : 'assets/icons/hidden.png'}" alt="Toggle password visibility">
</button>
</div>
</div>
@@ -76,8 +77,19 @@ export class PasswordMinigame extends MinigameScene {
</div>
` : ''}
<div class="password-controls">
${this.gameData.showHint ? `
<button type="button" class="submit-btn" id="submit-password">Submit</button>
` : ''}
${this.gameData.showKeyboard ? `
<button type="button" class="keyboard-toggle-btn" id="keyboard-toggle">
<img class="icon-keyboard" src="assets/objects/keyboard3.png" alt="Toggle keyboard">
</button>
` : ''}
</div>
${this.gameData.showKeyboard ? `
<div class="onscreen-keyboard" id="onscreen-keyboard">
<div class="onscreen-keyboard" id="onscreen-keyboard" style="display: ${this.gameData.keyboardVisible ? 'flex' : 'none'}">
<div class="keyboard-row">
<button class="key" data-key="1">1</button>
<button class="key" data-key="2">2</button>
@@ -132,11 +144,6 @@ export class PasswordMinigame extends MinigameScene {
</div>
` : ''}
<div class="password-actions">
<button type="button" class="submit-btn" id="submit-password">Submit</button>
<button type="button" class="cancel-btn" id="cancel-password">Cancel</button>
</div>
<div class="attempts-counter">
Attempts: <span id="attempts-display">${this.gameData.attempts}</span>/${this.gameData.maxAttempts}
</div>
@@ -147,7 +154,7 @@ export class PasswordMinigame extends MinigameScene {
this.passwordField = document.getElementById('password-field');
this.togglePasswordBtn = document.getElementById('toggle-password');
this.submitBtn = document.getElementById('submit-password');
this.cancelBtn = document.getElementById('cancel-password');
this.keyboardToggleBtn = document.getElementById('keyboard-toggle');
this.attemptsDisplay = document.getElementById('attempts-display');
// Focus the password field
@@ -182,10 +189,10 @@ export class PasswordMinigame extends MinigameScene {
});
}
// Cancel button
if (this.cancelBtn) {
this.addEventListener(this.cancelBtn, 'click', () => {
this.cancelPassword();
// Keyboard toggle button
if (this.keyboardToggleBtn) {
this.addEventListener(this.keyboardToggleBtn, 'click', () => {
this.toggleKeyboardVisibility();
});
}
@@ -239,8 +246,19 @@ export class PasswordMinigame extends MinigameScene {
// Update input type
this.passwordField.type = this.gameData.showPassword ? 'text' : 'password';
// Update button icon
this.togglePasswordBtn.textContent = this.gameData.showPassword ? '👁️' : '👁️‍🗨️';
// Update button image
const img = this.togglePasswordBtn.querySelector('img');
if (img) {
img.src = this.gameData.showPassword ? 'assets/icons/visible.png' : 'assets/icons/hidden.png';
}
}
toggleKeyboardVisibility() {
this.gameData.keyboardVisible = !this.gameData.keyboardVisible;
const keyboard = document.getElementById('onscreen-keyboard');
if (keyboard) {
keyboard.style.display = this.gameData.keyboardVisible ? 'flex' : 'none';
}
}
toggleHint() {