-
-
Notifications
You must be signed in to change notification settings - Fork 492
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
Vankata453
wants to merge
21
commits into
SuperTux:master
Choose a base branch
from
Vankata453:scriptbox-overhaul
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+7,127
−829
Conversation
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
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
added
involves:editor
status:in-progress
Progress has been done, but more is intended be done
type:feature
category:code
involves:scripting
labels
Aug 7, 2024
I'll probably do some style fixes soon. |
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
Labels
category:code
involves:editor
involves:scripting
status:in-progress
Progress has been done, but more is intended be done
type:feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theregister_scripting_reference()
andunregister_scripting_reference()
scripting functions.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.