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

Selector checkmark

For general discussion related FlowStone

Selector checkmark

Postby tektoog » Sun Mar 29, 2020 1:35 am

Hey,
After all these years, I feel kind of dumb to ask for that but, I actually just realised that :? :(
When using submenus with the stock selector, how do you get the checkmark to also show up in the first menu branch?
Selector Checkmark.fsm
(3.55 KiB) Downloaded 955 times

Is it only possible, or do I have to use a ruby type selector?
A great thanks in advance for your answers... ;)
"Essential random order for chaotic repetitive sequences"
User avatar
tektoog
 
Posts: 141
Joined: Sat Oct 30, 2010 11:49 pm
Location: Geneva - Switzerland

Re: Selector checkmark

Postby trogluddite » Sun Mar 29, 2020 2:23 am

AFAIK, there isn't a way to check a sub-menu heading. It's only possible to check a single item, and it has to be one of the selectable indexes. It works the same way in Ruby, too (and the same for Ruby's option to "grey out" an item).

I'd really like the ability to use arrays to specify multiple ticks or grey-outs - it would be really handy for creating drop-down menus with multiple toggled options etc. There are really only two workarounds...

1) Dynamically modify the options-list string to include your own marker characters when they're needed. This is relatively simple, but it never looks as nice as a proper tick-mark, no matter what characters or font you choose.

2) Build a completely custom selector from basic GUI primitives. This can look very smart, but is a lot harder work, as you'd have to do all of the drawing and mouse handling yourself.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1727
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: Selector checkmark

Postby tektoog » Sun Mar 29, 2020 3:07 am

Trog, thanks for your answer… ;)
… which is the one I was afraid of... :(
trogluddite wrote:There are really only two workarounds...

This is the conclusion I came to also… but,... I will live with the mark on the second layer ;) :?
Another small detail, but which has all its importance when you want to present a polished end project…

Should be another small update that would present FS at its best... ;)
"Essential random order for chaotic repetitive sequences"
User avatar
tektoog
 
Posts: 141
Joined: Sat Oct 30, 2010 11:49 pm
Location: Geneva - Switzerland

Re: Selector checkmark

Postby tulamide » Sun Mar 29, 2020 9:26 am

I would additionally also love the ability to insert seperator lines, as in other Windows menus. (I had this weird dream that since then feels like it was real, where I accidentally found an ascii sign that inserted a seperator line)
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Selector checkmark

Postby Spogg » Sun Mar 29, 2020 12:05 pm

tulamide wrote:...(I had this weird dream that since then feels like it was real, where I accidentally found an ascii sign that inserted a seperator line)


At least your dreams about FlowStone make sense! :lol:
User avatar
Spogg
 
Posts: 3318
Joined: Thu Nov 20, 2014 4:24 pm
Location: Birmingham, England

Re: Selector checkmark

Postby DaveyBoy » Thu Jun 25, 2020 4:13 pm

Just came accross this post while searching for drop list posts . . . .

Tulamide wrote:
I would additionally also love the ability to insert seperator lines, as in other Windows menus.


well now you can :D

Image

It won't be the prettiest code you've ever seen . . but it works

Trog wrote:
Build a completely custom selector from basic GUI primitives. This can look very smart, but is a lot harder work, as you'd have to do all of the drawing and mouse handling yourself.


Well I've had a lot of Flow_time recently and someone had to do it :)

This is still very much a work in progress. Tick marks and separaters are done . . I'm now looking at sub-menus and greying out . . could take a while!

Windows Menus 32.fsm
(18.46 KiB) Downloaded 865 times

Windows Menus 64.fsm
(18.72 KiB) Downloaded 862 times


Windows Menus 32 - repaired.fsm
Omitted to name wireless input causing cfg file to not be written - fixed
(18.47 KiB) Downloaded 868 times


Enjoy :)
Last edited by DaveyBoy on Sun Jun 28, 2020 7:46 pm, edited 1 time in total.
User avatar
DaveyBoy
 
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Re: Selector checkmark

Postby tulamide » Thu Jun 25, 2020 7:16 pm

DaveyBoy wrote:Tulamide wrote:
I would additionally also love the ability to insert seperator lines, as in other Windows menus.


well now you can :D

That's a really nice one! And the code is structered well, it is no problem to follow it. Maybe somewhere in the future we could outsource the graphics elements, so that it is easier for people to adapt it to their style. Other than that: hats off! I can imagine the time it took to create.
Thank you for sharing!
"There lies the dog buried" (German saying translated literally)
tulamide
 
Posts: 2686
Joined: Sat Jun 21, 2014 2:48 pm
Location: Germany

Re: Selector checkmark

Postby RJHollins » Thu Jun 25, 2020 8:41 pm

That is some nice work DaveyBoy :)
RJHollins
 
Posts: 1567
Joined: Thu Mar 08, 2012 7:58 pm

Re: Selector checkmark

Postby tektoog » Fri Jun 26, 2020 1:09 am

DaveyBoy wrote:well now you can

Haaaaaaaaaaa!!!! :D
What a good soul you are!!! ;)
Nice work there!
I didn't get that part though... Maybe you could explain it?
Code: Select all
   #   ---------------------------------------   
   when 100   #   File - New               Put Droplist finished code here |
   #   if @menus[@menu_over][:items][@item_over] == true                  |
   #      Do Something                                          |
   #   else Do something else                                       |
   #   end                                                      |
   when 101   #   File - Open                                       |      
   #                                                         |
   when 203   #   Edit - Copy                                       |
   #                                                         |
   when 414   #   Options - Midi Stop                                 |
   #                                                         |
   when 502   #   Help - Check for updates                           V
   
   # etc
   
   # etc
   
   #   ---------------------------------------
   end

DaveyBoy wrote:This is still very much a work in progress. Tick marks and separaters are done . . I'm now looking at sub-menus and greying out . . could take a while!

Could you maybe also post a functional example of the edit menu? like implementing the undo/redo, cut/copy/paste functions?
But maybe is it too much demanding? ;)

As Tulamide already said
tulamide wrote:hats off!

It looks really "professional" and polished... Good job!!!
"Essential random order for chaotic repetitive sequences"
User avatar
tektoog
 
Posts: 141
Joined: Sat Oct 30, 2010 11:49 pm
Location: Geneva - Switzerland

Re: Selector checkmark

Postby DaveyBoy » Sun Jun 28, 2020 7:49 pm

Thanks for the kind words guys.

Tulamide wrote:
I can imagine the time it took to create.


Writing 'Flow_time' instead of 'Flow-time' is a bit of a givaway :lol:

Tektoog - The best way I can think of to explain is to think of banks of switches.
The first bank (File) starts from 100 the second bank {Edit) from 200 . . and so on.

This could all have been put in the mouseLDown method but I thought it better to do it this way

The input numbers are virtual inputs (as opposed to physical inputs) to the Ruby code box and when you select or tick/untick a menu item the event method sees this and acts accordingly. You just need to put some logic in the appropriate event number to make it do what you want it to do.

in the attached example I've implemented the File - Open item and all the Options items. The latter are changing the state of boolean variables. I've put the outputs in the watch panel (was easier for me :) )

Windows Menus 32 v1.0.1.fsm
(23.76 KiB) Downloaded 872 times


I hope this explains it better :D

in my original reply, in the 32 bit version I omitted to name a wireless input which would have caused the config file not to be written, this has now been fixed.
User avatar
DaveyBoy
 
Posts: 131
Joined: Wed May 11, 2016 9:18 pm
Location: Leeds UK

Next

Return to General

Who is online

Users browsing this forum: No registered users and 26 guests