JSAddon Widgets #819
KhandamovA
started this conversation in
Show and tell
Replies: 1 comment
-
https://github.com/KhandamovA/useful-js-libs/blob/main/TurboWarp/JSAddon.js |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I don’t know about you, but I always lacked control objects, so I decided to fix it.
Hello everyone, it's me again. It hasn't been that long, but I managed to add something new to my extension. #809.
let's start
In this addition, it will be possible to add widgets to the stage, as well as stylize them.
To add widgets (buttons, textboxes, comboboxes, checkboxes, radio buttons), we need variable monitors.
Variable names can be anything. Do not uncheck monitor visibility checkboxes if you don't want to reset the widget's state.
Select a variable to be converted into a widget
Next, specify which widget you want to convert the variable to
Select a style if necessary. The style must already be registered
result
Such a widget can be dragged like any other variable monitor. There is a separate block for the dropdown list and radio buttons. The only difference is that you need to provide an array as initial values
result
Each such widget can emit signals that are caught by this block.
The values of widgets at the moment of the signal come to the variables from which the widgets are made.
To hide a widget, use a special block if you don't want the mutation to reset.
My extension saves mutations on project reload, in order to save the state of mutations use this block
now a little about styles. Styles can be registered, deleted, and used in your widgets. CSS is used for styling.
That's all. Thank you all for your attention. Waiting for your opinion and suggestions
Beta Was this translation helpful? Give feedback.
All reactions