Button control replacing Method control

A place for developers to discuss development of OSA
Post Reply
Message
Author
Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Button control replacing Method control

#1 Post by Vaughn » Sat Jun 21, 2014 5:46 am

I have rebuilt the Method Image control. It is now a Button Control, although I have not renamed it in the GUI yet.

Now you have a Mouse Down and a Mouse Up image, so you can have a "Pressed image"... You can execute a Method AND/OR a Script on button down AND on button up. This Quadruples the number of things that can be executed from a single click.


The example I am using it for is the Pan/Tilt Camera buttons. When you hold a button down, it changes colors and pans, and when you let the button up, it changes color back and issues a Stop command to the camera to stop its panning.

Vaughn

Image

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Button control replacing Method control

#2 Post by Vaughn » Sat Jun 21, 2014 8:56 am

Actually, I never finished any of these controls from the very beginning. The way they are supposed to work is as soon as you select Add State Image from the Screens context menu, it is supposed to generate a unique name, and create the object. When you set all of the settings on the Add Form, you would then be updating the object. Then when you Right-Click on any Screen Object in Edit Mode, you should be able to select Edit Screen Object, and it would load the same form as Add, but would pre-populate all of the settings, thereby allowing editing without using the WebUI's Objects page.

So, I am going to do this for the new Button Image control I made and get that in before 044. We will probably have to wait for me to do any further work on the Controls until after the next release. Unless we are able to get the release out for other reasons, than I may try to overhaul all the controls so people can just fix their screens once and be done..

There is no reason the Navigation Image control can not be merged into this new Button Control either. So I guess we will see how much I get done before next release. I can't forget that these changes are impacting the WebUI too, and I am not so good at the Web stuff yet.

Vaughn

User avatar
kherron
Posts: 646
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: Button control replacing Method control

#3 Post by kherron » Sat Jun 21, 2014 5:13 pm

Very Cool :D

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: Button control replacing Method control

#4 Post by Automate » Fri Jul 04, 2014 5:45 am

Vaughn wrote:Then when you Right-Click on any Screen Object in Edit Mode, you should be able to select Edit Screen Object, and it would load the same form as Add, but would pre-populate all of the settings, thereby allowing editing without using the WebUI's Objects page.
This will be nice. Have you pushed this into Git?

Also, it would be nice to be able to delete a control from the right click so you don't have to go to the WebUI's Objects page.

And while your at it maybe a clone/copy command so if you have multiple controls that are similar you can clone and then edit them for the differences.

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Button control replacing Method control

#5 Post by Vaughn » Fri Jul 04, 2014 5:53 am

Automate wrote: Also, it would be nice to be able to delete a control from the right click so you don't have to go to the WebUI's Objects page.

And while your at it maybe a clone/copy command so if you have multiple controls that are similar you can clone and then edit them for the differences.
All that is done already, along with Animation.

So now you can right click any screen object and it takes you into Edit mode. From there, you can change the name and click Add (cloning). There is also a delete option from that screen. X/Y and other data entry points have been added, so there should be no reason to have to use the WebUI.

Most of it is committed to Git, but the new Object Types are not in there, so you will need some SQL to make it work, which I will try to get added to Git. I still am working on it, and I have not gotten to the Label Controls yet. And the Browser control intercepts the right click so have not figured out what to do about that yet.. But I think you will like it all.


Vaughn

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Button control replacing Method control

#6 Post by Vaughn » Fri Jul 04, 2014 5:58 am

Image

User avatar
kherron
Posts: 646
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: Button control replacing Method control

#7 Post by kherron » Fri Jul 04, 2014 6:02 am

This is very Nice :D

GREAT JOB :!:

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: Button control replacing Method control

#8 Post by Vaughn » Fri Jul 04, 2014 6:05 am

Next major upgrade to the Button Control will be to allow picking of Method and States to execute when clicked. Right now it is pretty much hard-coded to On/Off toggling.

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Button control replacing Method control

#9 Post by tommysharp » Fri Jul 04, 2014 11:53 am

It sounds like you have confirmed this but being able to duplicate a screen object from the objects list screen would be awesome!

Sent from my Nexus 5 using Tapatalk

Post Reply