MakeButton ID of Nil to be usable for creating button again.
- airsoftsoftwair
- Posts: 5446
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: MakeButton ID of Nil to be usable for creating button again.
When making a slider button I wouldn't create a knob button that moves but I'd create a button that covers the whole slider area and then implement knob drawing within that area depending on where the mouse is.
Re: MakeButton ID of Nil to be usable for creating button again.
Hello,
if this can help, in my HGui library I implemented the sliders I using two buttons.
First I create the back area for the full size slider and then another button to handle the cursor.
When the cursor changes its position I simply removed the old button and generate another one to the new position, but it's just an implementation, not the fastest, but for me iy's the cleanest since I have separated events for the slider back area and the cursor.
With two buttons in my case worked just fine.
if this can help, in my HGui library I implemented the sliders I using two buttons.
First I create the back area for the full size slider and then another button to handle the cursor.
When the cursor changes its position I simply removed the old button and generate another one to the new position, but it's just an implementation, not the fastest, but for me iy's the cleanest since I have separated events for the slider back area and the cursor.
With two buttons in my case worked just fine.
----------------------------
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆
[Allanon] Fabio Falcucci | GitHub for recent works | Support me on Patreon for Hollywood libraries | ☆★ All my links ★☆