[Gambas-user] Supped up the WebAudio.class

Bruce Steers bsteers4 at gmail.com
Sat Jul 30 17:22:03 CEST 2022


On Sat, 30 Jul 2022, 15:17 Benoit Minisini, <
benoit.minisini at gambas-basic.org> wrote:

> Le 30/07/2022 à 14:46, Bruce Steers a écrit :
> >
> > I got more cool ideas that will probably be coded terribly if I do it ;)
> lol
> >
> > 1. Make WebEvent.class for use in the WebForm_Event() event.  this would
> > open up many avenues for coding tricks with non-handled events. I
> > figured it out by reading the WebControl.class but i think an
> > Event.class and a wiki page to describe the class/WebForm_Event() event
> > is needed.
>
> What do you want to achieve exactly?
>

Catching events that trigger that are not listed, like gotfocus for
example.

I could intercept and manage all kinds of events with it without having to
set up a custom class like I did with webslider

The WebForm_Event() seems pretty useless at present.


> >
> > 2. Slider needs mouse-up, mouse-down events so you can disable it if
> > it's currently being slid.  (or handle internally in the WebSlider.class
> > to not update if being slid) for purpose of something like an audio
> > position slider that will update itself regularly.  It's currently kinda
> > unusable for that (i fixed by make my own version with mouseup/mousedown
> > events)
>
> But the WebSlider Change event is -not- raised when the slider button is
> slid. It is raised on mouse button release.
>
> What are you talking about?
>

My web audio player uses a slider to show position and to change position.

You can see what I mean in the test app I made for WebAudio as your
webslider is not fixed.

Because the code updates the WebSlider.value on time change triggers. When
I grab the slider to move it the time change event moves the slider back to
time position while dragging. I can't stop.it

On the player on that website link of mine a similar method is used but
I've made mousedown and mouseup events for slider so I can disable the
position updating the slider till mouseup.

>
> > 3. I'm sure i'll think of more upgrades as I use it.
> >
> > On a more awesome note I should say I'm really liking gb.web.gui. 😎👍
> > I've knocked up a webpage for my music as i've mentioned before
> > http://bws.org.uk/music <http://bws.org.uk/music>  it's looking good
> > (even on my phone)
> > Got an audio player with custom controls thanks to my terrible coding
> > abilities and Benoits awesome coding abilities :)
>
> Thanks. It's mainly that you must think more before emitting code. :-)
>

Yes, and learn more I guess.
Cheers Ben


> > I've made an alternative WebButton.class that supports a Hover image.
> > (the play button)  trouble is the image flicks to normal and back as it
> > crosses into the image inside the button.
>
> This should normally be done purely with CSS, and I don't see how it
> could not work.
>

It worked nicely when I triggered the image change from just the image
hover event, then I changed it to be the button hover event not the inside
image.

It shows hover image when hovering over both the button and the image but
when crossing over the image boundary it flicks back to normal image for a
moment.
 It's not a deal breaker for me 😎
Perhaps you could do a better job of enabling a dual image button.

My ultimate objective was a triple image button that's has images for
normal, hovered and pressed states.

And then possibly image saturation/dimming for disabled state.


Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220730/81a498c6/attachment-0001.htm>


More information about the User mailing list