Is it possible to change the default color of a widget.newButton() ?

Rob, 

First off, this feature was not announced as a deprecated feature. It simply dropped off the face of the earth. Secondly, in all SDKs depreciated features are supported for a release or two after announcement of being depreciated, allowing developers transition to alternatives offered. See G1 compatibility mode for example… 

Regarding why I don’t wish to submit a feature request for this one… Reasons are twofold : 

  1. It is not a new feature. It existed once and we want it back unless there is an absolute reason as to why we can’t have it. So far I have not heard any reasonable explanation as to why it was taken away and why it can’t be brought back.

  2. I do not have a very high confidence in “voice of developers” being heard through the feedback system. Refer to my thread titled “Widget for text input” for instance… http://forums.coronalabs.com/topic/41661-widget-for-text-input/ - This feature is the highest voted feature if you count the 2 related feature suggestions… It has been sitting there for nearly a year. When is Corona Labs planning to “hear” this one and deliver? IMHO, Feature Suggestions are a simple black hole you like to send people whenever they get too bothersome. Corona Labs makes feature decisions based on what it deems critical and priority. What we want and need has very little impact. At least that’s how it looks and feels like on this end. 

At the end of the day this is a minor issue. I will stop harping on about this and move on. Worst case, I know there are workarounds. There are bigger issues out there that need to be sorted out. 

Have a nice weekend.

Hi @atanasster,

Our policies for adding code are pretty simple, add them, submit it,  and if it passes review we should add it.  I can’t say with certainty that it will pass muster, but engineering has said they will  consider submissions.

Thanks Rob,

I made the changes to widget_button - can you point me where to submit?

If anyone is interested in testing it out , let me know

Thanks
Atanas

I don’t fully understand github, but my understanding is that you make a pull request to get the repository make your changes, then push the changes back to online.  We will get notified and then check out the changes.

Let me get a better step-by-step from Engineering on how to get the changes back to us for review.

Rob

Hi Rob,

I think I figured it out and posted submitted a pull request for widget_button.lua. Also added a widgetext.lua that can be used for creating shaped buttons while the code is not in the main widget.lua files

Here is the usage :

       local button = widgetExt:newButton(

        {

          x = xButton,

          y = yButton,

          width = buttonsWidth,

          height = buttonsHeight,

          labelAlign = “center”, --optional, default is “center”

          labelAlignY = “center”, --optional, values are “top”, “bottom” and “center”

          labelYOffset = 0, --optional, default is 0

          shape = {

              cornerRadius = 10, --optional - default is 0 for a sharp corners rectangle

              strokeWidth = 2,  --optional, default is 1 pixel

              strokeColor = {default = {0.5,0.5,0.5,1}, over = {0,0,0,1}}, – optional, default is black

              fillColor = {default = {0.8,0.9,0.8,1}, over = {0.6,0.7,0.6,1}}, – optional, default is grey

                },

               

          onRelease = onRelease,

          label = “Shaped Button”,

          onRelease = onRelease,

              });