-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
30aaaf5
commit 68c6981
Showing
9 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * from "./uiButton" | ||
export * from "./uiInteraction" | ||
export * from "./uiNode" | ||
export * from "./uiStyle" | ||
export * from "./uiText" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export class UiInteraction { | ||
private _pressed = false | ||
|
||
public get pressed(): boolean { | ||
return this._pressed | ||
} | ||
|
||
public triggerDown() { | ||
this._pressed = true | ||
} | ||
|
||
public triggerUp() { | ||
this._pressed = false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import type { Plugin } from "../../plugin" | ||
import { HtmlRoot } from "../resources" | ||
import { Schedule } from "../../schedule" | ||
import { renderHtmlRoot } from "../systems" | ||
import { htmlInteraction, renderHtmlRoot } from "../systems" | ||
|
||
export function HtmlPlugin(rootSelector: string): Plugin { | ||
return (world) => { | ||
world.insertResource(new HtmlRoot(rootSelector)) | ||
world.addSystem(Schedule.Update, renderHtmlRoot) | ||
world.addSystem(Schedule.Start, htmlInteraction) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters