Skip to content
This repository was archived by the owner on Nov 20, 2025. It is now read-only.

Commit 417f4e3

Browse files
Fixed terminal UI demo scene
1 parent b75f81a commit 417f4e3

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

demo/src/main/scala/demo/scenes/TerminalUI.scala

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,9 @@ object TerminalUI extends Scene[Size, Model, ViewModel]:
4040
Outcome(model)
4141

4242
case e =>
43-
val ctx = UIContext(context.toContext, 1)
43+
val ctx = UIContext(context.toContext, context.frame.globalMagnification)
4444
.withSnapGrid(TerminalUIComponents.charSheet.size)
4545
.moveParentBy(Coords(5, 5))
46-
.withPointerCoords(
47-
Coords(
48-
context.frame.input.pointers.position / TerminalUIComponents.charSheet.size.toPoint
49-
)
50-
)
5146

5247
model.button.update(ctx)(e).map { b =>
5348
model.copy(button = b)
@@ -65,12 +60,9 @@ object TerminalUI extends Scene[Size, Model, ViewModel]:
6560
model: Model,
6661
viewModel: ViewModel
6762
): Outcome[SceneUpdateFragment] =
68-
val ctx = UIContext(context.toContext, 1)
63+
val ctx = UIContext(context.toContext, context.frame.globalMagnification)
6964
.withSnapGrid(TerminalUIComponents.charSheet.size)
7065
.moveParentBy(Coords(5, 5))
71-
.withPointerCoords(
72-
Coords(context.frame.input.pointers.position / TerminalUIComponents.charSheet.size.toPoint)
73-
)
7466

7567
model.button
7668
.present(ctx)

0 commit comments

Comments
 (0)