KUIML - Switching skins

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS
Plug'n Script

Post

Hello,

I have a plugin where I want to switch between a large skin and small skin (they're completely different, hence why I'm not just using gui.zoom). I've implemented it with default.kuiml file (shown below) and a button on each sub-skin file that switches a skin_selector parameter between 0 and 1. Would you mind giving your opinion on whether there's a better way? One thing that would be nice is if the last selected skin would be remembered between loads (I tried using persistent="true" but without success).

Code: Select all

<PARAM id="skin_selector" type="integer" min="0" max="1" default="0" />
<ACTION_TRIGGER requires="skin_selector;skin_widget.src" event_id="skin_selector.value_changed" script="if (skin_selector > 0) skin_widget.src = &quot;small.kuiml&quot;; else skin_widget.src = &quot;big.kuiml&quot;;" />
<KUIML_WIDGET id="skin_widget" root_path="$SCRIPT_DATA_PATH$" src="" />
Thanks for your help :)

Post

All you need to do is to make the KUIML widget persistent in addition to your parameter (persistent=true on the widget): this will save the internal state of the widget, including the skin data.

Your solution is definitely fine. Maybe it would be even simpler if you just used a button with an action that toggles the skin file path (no additional parameter persistency required)?

Post

OK, thank you! :)
Maybe it would be even simpler if you just used a button with an action that toggles the skin file path (no additional parameter persistency required)?
This is very true! I could use an IMAGE_ACTION_BUTTON and modify the source that way :dog:

Post Reply

Return to “Blue Cat Audio”