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

ControlTextbox multiline overhaul, use in script editor #3036

Draft
wants to merge 21 commits into
base: master
Choose a base branch
from

Conversation

Vankata453
Copy link
Member

This PR overhauls ControlTextbox so it supports multiple lines.

A new derived from ControlTextbox class has been added - ControlScriptbox. It features suggestions when typing (just like the console does when "Tab" is pressed). Additional information and parameters for the suggested functions are also displayed. That information is fetched from the "data/scripts/reference.stsr" file, which is of type "supertux-scripting-reference". Other such files can also be imported using the register_scripting_reference() and unregister_scripting_reference() scripting functions.

image

Short video showcase from 2023 development summary video

NOTE: This is a WIP, since it needs to be suited to all additions and changes since the implementation of the simplesquirrel library. It also needs to further be tested for bugs.

1. `DrawingRequest` no longer preserves a variable indicating its type, but rather utilizes a `virtual` function for this purpose.
2. `DrawingRequest` now initializes some of its variables from the current `DrawingTransform`.
2. The viewport rectangle is now stored in `DrawingTransform`, instead of `DrawingContext`. bb18239 has added per-request viewport cropping. Utilizing it now is more convenient, because the old viewport wouldn't have to be stored in a separate variable in a draw function, so it could be restored later. A new transform could be pushed and popped instead.
Includes some scripting reference generation improvements as well.
Credits to RustyBox for the new text cursor!
@Vankata453 Vankata453 added this to the 0.7.0 milestone Aug 7, 2024
@tobbi
Copy link
Member

tobbi commented Aug 7, 2024

I'll probably do some style fixes soon.

@swagtoy
Copy link

swagtoy commented Nov 23, 2024

For reasons, Im interested in reviewing this when I get a chance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants