Skip to content

Commit

Permalink
Update toFrameContext to toContext
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Jan 7, 2025
1 parent 525b3e6 commit 6cc1b70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object UIContext:
ctx: SceneContext[?],
reference: ReferenceData
): UIContext[ReferenceData] =
fromContext(ctx.toFrameContext, reference)
fromContext(ctx.toContext, reference)

def fromSubSystemContext[ReferenceData](
ctx: SubSystemContext[?],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object ComponentUIScene extends Scene[SandboxStartupData, SandboxGameModel, Sand

case e =>
val ctx =
UIContext(context.toFrameContext.forSubSystems.copy(reference = model.num), Size(1), 1)
UIContext(context.toContext.forSubSystems.copy(reference = model.num), Size(1), 1)
summon[Component[ComponentGroup[Int], Int]].updateModel(ctx, model.components)(e).map { cl =>
model.copy(components = cl)
}
Expand All @@ -56,7 +56,7 @@ object ComponentUIScene extends Scene[SandboxStartupData, SandboxGameModel, Sand
viewModel: SandboxViewModel
): Outcome[SceneUpdateFragment] =
model.components
.present(UIContext(context.toFrameContext.forSubSystems.copy(reference = 0), Size(1), 1))
.present(UIContext(context.toContext.forSubSystems.copy(reference = 0), Size(1), 1))
.map(l => SceneUpdateFragment(l))

final case class ChangeValue(value: Int) extends GlobalEvent

0 comments on commit 6cc1b70

Please sign in to comment.