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 EntryBlock class #25

Merged
merged 1 commit into from
Jun 13, 2024
Merged

Add EntryBlock class #25

merged 1 commit into from
Jun 13, 2024

Conversation

wnbaum
Copy link
Contributor

@wnbaum wnbaum commented Jun 13, 2024

This felt like a good addition to have, since before the script generator was looking for a block_name for entry blocks, and generating the code itself, but now it asks the EntryBlock for the code, and appends it to the script that way.

EntryBlock inherits from StatementBlock (both scene and script), utilizing the statement block to generate the parameters UI programatically. This way we can expose things like signals by automatically creating an EntryBlock for them.

Originally we had been using BasicBlock as a template for entry blocks, but it is much nicer to have an EntryBlock that can actually generate a method signature.

@wnbaum wnbaum requested a review from manuq June 13, 2024 19:32
Copy link
Contributor

@manuq manuq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Comment on lines +27 to +28
for entry_block in entry_blocks:
script += entry_block.get_entry_statement() + "\n"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

@manuq manuq merged commit 29fc87a into main Jun 13, 2024
1 check passed
@manuq manuq deleted the entry-block branch June 13, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants