Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

Bitmap Button ?

Post any examples or modules that you want to share here

Bitmap Button ?

Postby az-terisk » Wed Nov 28, 2018 8:22 pm

Good evening everyone ! :D

For a project I would like to create a bitmap based button that responds to three states :

1. Normal;
2. Mouse Over;
3. Pressed.

I tried to tinker with the "Button" prefab by inserting a single "Bitmap" and removing the "Background" and "Label" part of the Ruby code. But apart from that, i'm stuck.

Indices or tracks to follow ?

Thanks in advance (and sorry for my bad English, I'm French).
az-terisk
 
Posts: 29
Joined: Sun Dec 25, 2016 1:00 pm

Re: Bitmap Button ?

Postby tiffy » Fri Nov 30, 2018 8:39 pm

az-terisk wrote:Good evening everyone ! :D

For a project I would like to create a bitmap based button that responds to three states :

1. Normal;
2. Mouse Over;
3. Pressed.

I tried to tinker with the "Button" prefab by inserting a single "Bitmap" and removing the "Background" and "Label" part of the Ruby code. But apart from that, i'm stuck.

Indices or tracks to follow ?

Thanks in advance (and sorry for my bad English, I'm French).


Not sure if this is what you require:
Attachments
Bitmap Button (Dual).fsm
(15.24 KiB) Downloaded 975 times
User avatar
tiffy
 
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Bitmap Button ?

Postby Phil Thalasso » Sat Dec 01, 2018 10:25 am

Hello Tiffy and thank you for providing this schematic.

Now, if I may dare: Is it possible to set up things in a way
that the button colour changes in its three states?

Example: up=red.jpg
mouse-over=blue.jpg
down=black.jpg

If you found the time to answer that, I'd really appreciate it.
Thank you.

Regards
Phil
User avatar
Phil Thalasso
 
Posts: 150
Joined: Tue Jun 27, 2017 12:42 pm
Location: Munich, Germany

Re: Bitmap Button ?

Postby tiffy » Sat Dec 01, 2018 12:13 pm

Phil Thalasso wrote:Hello Tiffy and thank you for providing this schematic.

Now, if I may dare: Is it possible to set up things in a way
that the button colour changes in its three states?

Example: up=red.jpg
mouse-over=blue.jpg
down=black.jpg

If you found the time to answer that, I'd really appreciate it.
Thank you.

Regards
Phil


Yes, it is possible (and very easy too) to change the schematic in order that the Button Color changes for instance when Mouse-Over is activated as you mentioned "Blue" and "Red" for Mouse-Up and "Black" for Mouse-Down. I previously done something similar but I will have to search through my examples when I have time and upload it (unless someone else is quicker than me and would be so kind to upload an example here) ...as I am currently working on something else. Do you want to use Bitmaps for the Colors?
User avatar
tiffy
 
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Bitmap Button ?

Postby Phil Thalasso » Sat Dec 01, 2018 12:53 pm

Thank you Tiffy for the quick response.
"Do you want to use Bitmaps for the Colors?"
Yes, very much so. I like things to look
appealing (I know ... :-)).

Regards
Phil
User avatar
Phil Thalasso
 
Posts: 150
Joined: Tue Jun 27, 2017 12:42 pm
Location: Munich, Germany

Re: Bitmap Button ?

Postby ChrisHooker » Sat Dec 01, 2018 2:11 pm

Hi Phil and az-terisk,

To get the bitmap to change while hovering, you just need to route the hover status to the selector for the bitmap.
Since status is On/Off, you must convert the On State to an Int (either by forcing a connection to a Float-based prim (CTRL+SHIFT while connecting), or by using a "Select" prim that takes one of 2 inputs based on a Bool status), and then make that Int value (when hovered) high enough that when added to the Bitmap Selector index, it changes to a new bitmap to indicate hovering. More complicated to explain than to do.

Attached is a schematic.
Bitmap Button with Hover.fsm
(18.31 KiB) Downloaded 960 times


Since when hovering over the button, all it shows is the hover bitmap, you can't tell when clicking what state you're changing it to, you can also add a multiplier (by zero) to effectively turn off the hover-state when a click trigger is sent. A delayed trigger will reset back to enabling the hover state bitmap.

Attached is a 2nd schematic to illustrate.


I've modded Tiffy's schematic for these - please note that these are not set up for preset handling nor automation.
ChrisHooker
 
Posts: 55
Joined: Tue Jul 13, 2010 10:02 pm

Re: Bitmap Button ?

Postby tiffy » Sat Dec 01, 2018 3:35 pm

Thank you, Chris, well done...I like it.

Hope it is what the other two gentlemen require.
User avatar
tiffy
 
Posts: 400
Joined: Wed May 08, 2013 12:14 pm

Re: Bitmap Button ?

Postby Phil Thalasso » Sat Dec 01, 2018 5:21 pm

Wonderful!
Thank you Chris and thank you bunches. During my last vacation I was trying to get at what you presented in minutes - obviously to no avail.
I have to frankly admit that I would not have been capable of thinking-up anything alike myself.
Great learning experience!!

Regards
Phil
User avatar
Phil Thalasso
 
Posts: 150
Joined: Tue Jun 27, 2017 12:42 pm
Location: Munich, Germany

Re: Bitmap Button ?

Postby wlangfor@uoguelph.ca » Mon Dec 03, 2018 3:13 pm

Thanks, I find these ideas useful. It's funny how they're simple to do in theory but the other day I ruined a schematic trying to add mouseover's lol.
My youtube channel: DSPplug
My Websites: www.dspplug.com KVRaudio flowstone products
User avatar
wlangfor@uoguelph.ca
 
Posts: 912
Joined: Tue Apr 03, 2018 5:50 pm
Location: North Bay, Ontario, Canada

Re: Bitmap Button ?

Postby az-terisk » Tue Dec 04, 2018 8:56 pm

Good evening,

First, sorry for the late response. A big thank you to you, that's exactly what I was looking for ! :o

I'm going to study this schematic.

Good evening ! :D
az-terisk
 
Posts: 29
Joined: Sun Dec 25, 2016 1:00 pm


Return to User Examples

Who is online

Users browsing this forum: No registered users and 5 guests