Jump to content

Indirect UI Double Slider Up Arrow Issue


BoltBait
 Share

Recommended Posts

The IndirectUI double slider control has an issue where the up arrow can not increase beyond certain values. For example, if you create a control min: 0, max: 15, default: 8, step: .01, you can not press the control's up arrow beyond 8.03 when starting from the default position of 8.

Here is a CodeLab script to demonstrate the issue:

 

#region UICode
double Amount1 = 8; // [0,15] Control Description
#endregion

void Render(Surface dst, Surface src, Rectangle rect)
{
    ColorBgra CurrentPixel;
    for (int y = rect.Top; y < rect.Bottom; y++)
    {
        if (IsCancelRequested) return;
        for (int x = rect.Left; x < rect.Right; x++)
        {
            CurrentPixel = src[x,y];
            dst[x,y] = CurrentPixel;
        }
    }
}
CodeLab then builds the following code from that script:

Hidden Content:

To view the issue, you must build the script to a DLL and install it. When you run the effect from within paint.net, try pressing the up arrow on the control. It will stop at 8.03. At this point, if you type in 8.04 tab, it will reset back to 8.03. Or, if you type 8.05 tab, then press the up arrow again it will stop at 8.28.

It appears that some values simply are not allowed in the control.

Using the down arrow jumps over these "broken" values (8.04, 8.29, etc.) but does not stop the UI.

EDIT: Interestingly, the built-in Effects > Noise > Add Noise effect does not show this issue with the coverage slider. I'm able to enter 8.04 and 8.29 directly into the control. HOWEVER, the built-in effect Effects > Render > Julia Fractal DOES show the problem with the Factor slider. You can not enter 8.04 or 8.29 into the amount. It appears that the maximum amount of the slider makes a difference. I think this shows that it is NOT a CodeLab issue.

This issue was originally reported by user TechnoRobbo.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

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...