Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add injectNode pragma #16

Open
2 tasks
panno8M opened this issue Jul 28, 2024 · 0 comments
Open
2 tasks

Add injectNode pragma #16

panno8M opened this issue Jul 28, 2024 · 0 comments

Comments

@panno8M
Copy link
Member

panno8M commented Jul 28, 2024

type MyClass* = ref object of Node
  score* {.injectNode: "hud/score".}: Label

method ready*(self: MyClass) =
  inject self
  # self.score = self.getNode("hud/score") as Label
  score.text = "0"
  • implement inject macro
  • support to scan parent class
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant