knob tooltips

For general discussion related FlowStone
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: knob tooltips

Post by Nubeat7 »

but it would be better if the cursor is not shown while dragging and stays at the same position, so after dragging the label keeps on the same place, i think there were posted some ruby/windows solutions somewhere
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: knob tooltips

Post by Tronic »

yes, I have already tried this, but if you drag an release too fast,
sometime you have an annoying flash redraw before it is cleared,
I've tried other solutions, but I think better than that for now it is not possible.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: knob tooltips

Post by Nubeat7 »

another thing which should be changed are the redrawing conditions in the "isInMousePoint" methode of the label
to this:
if (@erase_rect != (@rect = [x+2,y] + @area)) && @show

it should include the @show bool too, other wise it is permanently redrawing when moving the mouse on the surface..

just fixed it in my last version..
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: knob tooltips

Post by Nubeat7 »

ok how about that, the curser is hidden while interacting with knobs and holds the position, so also the label stays after interacting
Attachments
tooltip_hold_pos_while_drag.fsm
(583.17 KiB) Downloaded 925 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: knob tooltips

Post by RJHollins »

Still not seeing any text being displayed :(

But I do see the black box ... and the overall response seems better with this latest version NuBeat.

But why no text display ?? is this a 3.04 issue ? [any working substitute]?

thx
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: knob tooltips

Post by Nubeat7 »

is the box black, because it should be grey?
maybe it lies in the fact that the string and background brushes for the label are generated in the init methode, try to move it into the draw methode or make a blankline in the init methode to reinitialise...
User avatar
aombk
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece
Contact:

Re: knob tooltips

Post by aombk »

great work people! very interesting developments :)
this was a very busy week for me.
so i now have a lot of catching up to do in the filed of knob tooltips :)
User avatar
aombk
Posts: 34
Joined: Tue May 24, 2016 2:44 pm
Location: athens, greece
Contact:

Re: knob tooltips

Post by aombk »

i find it hard to follow these latest changes. the new knob confuses me. also the color and dimension changes in the tooltip and the knob do not get applied, probably because of what Nubeat7 said, that they get generated in the init method.

also in the last two files i noticed that if you get a tooltip to appear and then quickly move the mouse, sometimes, tooltip "leftovers" remain.

but again, my main problem is that this whole thing has gotten quite complicated. i need time to understand what is going on.
User avatar
Nubeat7
Posts: 1347
Joined: Sat Apr 14, 2012 9:59 am
Location: Vienna
Contact:

Re: knob tooltips

Post by Nubeat7 »

aombk wrote:i find it hard to follow these latest changes. the new knob confuses me. also the color and dimension changes in the tooltip and the knob do not get applied, probably because of what Nubeat7 said, that they get generated in the init method.

the knob itself didn't change a lot, the only thing which is new is the hit path,
it creates an ellipse graphicspath so you can use .isVisible in the isInMousePoint methode which avoids the areacalculating there, i simplyfied this a little more for you below.. and there is a connection from the mOver output to the mousemove on input all the rest is the same as before ..

color and dimension of the label itself is easy to change, just change the area array values( i changed thhe name to labelsize for better understanding) which is width and height of the label
the rest is set inside the font properties ...

what you mean with knobs do not get applied? you don't see them when you open the schematic?
btw if you change something in the knob code sometimes you need to recall the rectangles methode that it is shown on the frontpanel, just click on the radius input to do that..

i also commented the code, hope it helps..

about the artefacts which happens sometimes maybe there can be done a whole area redrawing when @show is set to false, this will be not too often and would clear the whole area not only tha last shown label area, while i need to say that this doesn't happen here..
Attachments
tooltip_hold_pos_while_drag.fsm
(582.36 KiB) Downloaded 940 times
RJHollins
Posts: 1573
Joined: Thu Mar 08, 2012 7:58 pm

Re: knob tooltips

Post by RJHollins »

For me to get the tooltip to display values, I had to temporarily bypass
#create brushes (can be done in the drawmethode too)
@b1 = Brush.new @c1
@b2 = Brush.new @c2

using #

I could immediately see values in the now greyed box.

I then cleared the 2 # from the code. Still worked.

Question ... I'm not finding a way to set knob to DEFAULT with [Cntrl-Click] ... can this be added ?

thx
Post Reply