SynthMaker

Slider changes appearance when clicked - possible?

Archive · 2010 14 old posts

From the original SynthMaker forum (2004–2014), with its members’ names and dates.

XoechZ ·

Hello!

I want to create a special slider, that should be like this:

Take the stock bitmap slider with the black slider drag element. Now, when I click it with the mouse and drag it, the slider should change it's appearance. Maybe change it's color to red. When I release the mouse button, it should go back to it's original look. I think for this I'd need a slider with two slider bitmaps. One for normal and one for "being dragged".

Is this possible, or has anyone created such a slider yet?

Thanks in advance for helpful answers.

XoechZ

philter5 ·

i´ve done something like that with a switch. but for a slider it´s the same way. you just need to add the alternate bitmap for the slider and connect this bitmap and the standard bitmap to a selector. now take the "is dragging" output from the control module and connect it to the top input of your selector. now everytime you drag the slider the bitmap will change from e.g. black to red and when you release it will turn back to black. hope this helps

phil

XoechZ ·

Wow, that sounds easy. I will try that.

Thanks!

pall ·

Here's what you are looking for. It's good?

pall ·

I changed the original Track Bitmap. Looks like better.

pall ·

May come with a correction

XoechZ ·

That´s great! Thank you very much!

pall ·

Welcome. Want to try with a Mouse Over module? It is not very difficult. And of course, will have other effect.

loopeytunes ·

I've added a redraw to it so when you click it changes straight away

XoechZ ·

Thanks again! You are great and very helpful.

There is only one problem with that slider: When you move the mouse out of it´s control area while dragging, the slider keeps the "clicked" state when you release the mouse button. I think that´s because then the slider does not recognise that the mouse is released.

Is there a cure for this?

rl ·

yes.

- you could use the mouse over to create a trigger when the mouse leaves the area. Here's a little example: [old link]

pall ·

Hello Loopey. There's no reason to make a Redraw, because they already have. If you do not change their status Slider (bitmamps), mean that you pulled Pointer out of space area, where MouseLUp no longer works. You have the option to remain with the slider ON (second bitmap), or drag the mouse in view area only. But the best is to do all this with MouseOver module, as they have before offered.

loopeytunes ·

hey pall, I realise now that the LDo wasn't connected to the redraw..lol

trogluddite ·

You can also to use the "Dragging" boolean output from the Y Drag primitive to detect the mouse release - this will go false when you release the mouse even if you are outside the view area. The slider changing when you hover the mouse over the control is a very pleasing effect, but note that there is a slight CPU hit if you have lots of MGUI's with the 'Mouse moves' inputs enabled.

Wrote something here? To have a post removed or your name hidden, write to [email protected].

Before your first post

A few rules keep this a friendly place. You agree to them once.

Shown next to what you post, here and in the app. It doesn’t have to be your real name: 3–24 lower-case letters, digits or _ (capitals become lower case, spaces become _).

    Then your post goes up straight away.

    Delete this reply?

    Open it in SynthMaker?

    It goes on the track you’re editing there, in place of that track’s sound, and into My sounds. Your other tracks stay as they are.

    Want to keep that track’s sound? Start a new song in SynthMaker first (Song › New song), then open this.

    Report this reply?

    Only the developer reads reports. The person isn’t told who reported them.

    What’s wrong with it?

    Block this person?

    You won’t see their posts and replies here any more. They aren’t told, and you can unblock them at any time.

    People you’ve blocked

    Their posts and replies are hidden from you. Unblock someone to see them again.

    The community rules

    A few rules keep this a friendly place. Everyone agrees to them once, before their first post.