-
Notifications
You must be signed in to change notification settings - Fork 827
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 'StringList' as new parameter type for extensions #911
Conversation
Merge from upstream
Merge from Upstream
Sweet!
This means that you have to add a if case or handle in some way the case where "parameterMetadata" is undefined (which can happen if the field is used in some strange conditions).
Do you intend to use this soon for an extension? Or is it more to prepare things for later extensions? |
I wanted to use it in the Tween extension. But I still need to do some research on how Tween.js works and how it best fits into the GD workflow. I'll add the check and format this evening. |
No I think I'll remove the prefix (precisely, I'll apply the prefix only for parameters that are objects). |
Perform auto formatting
Ok done 😃 |
I wonder if it is possible to edit the list of items bound to the StringListField from within the extension that uses it. |
FYI, I'll do the changes but got carried out by other things when working on translations :) |
No problem, I'll probably spend the next two weeks on the tweening extension. I'll switch to the StringLists shortly before the extension is ready. |
I've fixed the "extra info" and added handling of "stringWithSelector", understood as a string by the game engine. "stringWithSelector" sounded better because the type sent to the JS function is a string, not a list/array of strings. To use this:
Let me know if it works. |
Merge from upstream
Remove workaround for preceeding classname in extraInfo
I couldn't find libGD.js under the path you mentioned. Or did you mean EDIT: |
You have to merge master branch in your branch ;)
Yes sorry, this file. Merge master, delete it and relaunch npm run start so that it get downloaded |
No easy way, we would need some kind of abstraction allowing to declare types of identifiers. |
Ok the items are correctly shown now. |
This should be the culprit. Will test it tonight.
Guess I found the culprit. Will test it tonight. |
Oh thinking about it now, as this is considered as a string, you have to ensure that quotes are in your values: dataSource={this._choices.map(choice => ({
text: choice,
value: '"' + choice + '"',
}))} |
…into stringlistitem
Now it is working :) |
Sweet! Looks good for me to merge |
Ran Prettier on your file, remember to run |
Merged! Thanks for adding this and look forward to see it being used in the Tween extension :) |
There is just a small "uglyness" (see below)