Jump to content

Changing IndirectUI control values


pikalek
 Share

Recommended Posts

Is it possible to dynamically change the min/max property of a slider control generated via the IndirectUI?

Specifically, I want to limit a max value based on the bounds of the selection region.

I tried using some astronomically large limit & then clamping the amount; this worked, but the UI felt like it handled poorly; most of the slider range becomes functionally useless & the usable range becomes very 'touchy'. Using a smaller limit helps, but then it hamstrings the plugin with an artificial limit.

Reviewing the archives, I found a related, older discussion on changing UI control values using IndirectUI, but I don't see how the SoftMutuallyBoundMinMaxRule would help my problem since it only involves one control.

Can I coax this behavior out of the IndirectUI via clever programming or some other IndirectUI?

Link to comment
Share on other sites

Could you change your control to a "percentage"?

I could, but the result is not as precise as I'd like as the user cannot consistently indicate how many pixels to shift the selection by. Your idea is certainly a good one & is on my short list alternatives. I'm still interested in knowing if IndirectUI can solve this problem directly though.

Edited by pikalek
Link to comment
Share on other sites

Is it possible to dynamically change the min/max property of a slider control generated via the IndirectUI?

No, you cannot do this.

The property collection you create is meant to be a "schema" for your effect, and independent of the incoming data (Surface). So, OnCreatePropertyCollection() won't be a good place to do this type of change.

This could probably be accomplished with a rule, if such a rule existed. There just hasn't been anyone asking for this type of feature before now.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

No, you cannot do this.

The property collection you create is meant to be a "schema" for your effect, and independent of the incoming data (Surface). So, OnCreatePropertyCollection() won't be a good place to do this type of change.

This could probably be accomplished with a rule, if such a rule existed. There just hasn't been anyone asking for this type of feature before now.

Thanks for the clarification - I was pretty sure, there was still the chance I had missed something. Plus, others now know as well. As BoItBait pointed out, I do have some alternatives, so I can still get by using the IndirectUI & if I really can't live the alternatives, I could always brew my own UI with Visual Studio.

Anyway, I imagine it's called IndirectUI for reason; while having a little more control would be convenient for my situation, there's probably higher development priorities than adding a new rule.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...