summaryrefslogtreecommitdiff
path: root/test-client/main.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test-client/main.ts')
-rw-r--r--test-client/main.ts11
1 files changed, 10 insertions, 1 deletions
diff --git a/test-client/main.ts b/test-client/main.ts
index f208eb34..b189f08b 100644
--- a/test-client/main.ts
+++ b/test-client/main.ts
@@ -70,7 +70,7 @@ let data: Gamedata = { item_names: [], tile_names: [], spawn: [0, 0] }
let my_id: PlayerID = -1
const camera: V2 = { x: 0, y: 0 }
-const camera_zoom = 0.05
+let camera_zoom = 0.1
const interact_target_anim: V2 = { x: 0, y: 0 }
let interacting: V2 | undefined;
let scale = 0
@@ -327,6 +327,15 @@ function draw_ingame() {
draw_interact_target()
ctx.restore()
+
+ if (keys_down.has("KeyP")) {
+ camera_zoom = 0.05
+ ctx.fillStyle = "white"
+ ctx.textAlign = "left"
+ ctx.textBaseline = "bottom"
+ ctx.font = "20px sans-serif"
+ ctx.fillText(`interact = ${JSON.stringify(get_interact_target())}`, 10, 30)
+ } else { camera_zoom = 0.1 }
}
function draw_item(item: ItemData) {