Control

forum for discussing Control interface software

Register or log in - lost password?

Control » General

LED / Round Button?

(7 posts) (3 voices)
  • Started 1 year ago by Macciza
  • Latest reply from Anonymous

Tags:

  • baby designer clothes
  • beautiful summer dresses
  • celebrity gowns cheap
  • christian louboutin shoes for cheap
  • ladies clothing
  • LED
  • prom dresses
  • replica watches rolex men
  • RoundButton
  • sexy halloween costumes
  • summer wedding guest dress
  • weeding dresses
  • white summer dresses for juniors
  • wholesale bridal gowns
  1. Macciza
    Member

    Hi All
    Just starting to check it all out and it certainly is interesting. Have checked out PhoneGap and the Control source as well.

    Am wondering about the possibility of adding a RoundButton and/or LED? I guess LED is a special case of RoundButton anyway . .
    First thought was just to duplicate the Button and alter the geometry but could not quite find where this is done . . .

    Any suggestions or finished products welcome

    Cheers
    MM

    Posted 1 year ago #
  2. admin
    Key Master

    Hmmm... you could always apply a borderRadius to the button. So, if you add an oninit event handler to the button (let's assume the button is named myButton):

    "oninit": "myButton.fillDiv.style.borderRadius='5px';"

    And yes, I'd just use a button for LED. If you really want to make fancier shapes / widgets, take a look at the Knob widget... it uses a canvas object to allow for custom drawing routines.

    Hope this helps... - Charlie

    PS - Note that for widgets that move (like multitouch in particular) adding borderRadius really slows down the animation speed a great deal. But for buttons I don't think it should be a problem.

    Posted 1 year ago #
  3. Macciza
    Member

    Hi
    Had kinda hoped that wherever the shape of the Button was defined could be altered to a circle rather than rectangle . . .
    Then code would be easily interchangeable between square and round . . .
    Could not quite find where this was defined. . .

    Will have a look at the Knob widget . . .

    Cheers
    MM

    Posted 1 year ago #
  4. admin
    Key Master

    For reasons of performance most widgets are defined as html div tags, which are rectangular. The Knob is the only one that currently uses the canvas object (which, as mentioned, lets you draw arbitrary shapes). If Apple and Google ever get their act together and hardware accelerate the canvas object I'll switch all the widgets to use it, but until then...

    Posted 1 year ago #
  5. admin
    Key Master

    In the Develop branch on GitHub I've changed how the widget inheritance works... it is now much easier to override drawing behavior for all widgets of a particular type. To change all sliders, for example, you override:

    Slider.prototype.draw = function() {
        // your new drawing code
    }

    You can also customize event handling / whatever else you want about widgets in the same way. You can still override drawing for one particular widget as well... if you have a slider named "mySlider" you would just use:

    mySlider.draw = function() {
        // your new drawing code
    }

    I'm thinking about just going ahead and moving to using canvas for all the drawing routines... if I do this (which would require some work) the flexibility of customizing draw routines will be greatly improved.

    I've only committed these changes for iOS, but I don't think it will take much work to incorporate them into Android. Will try to do that soon. - Charlie

    Posted 1 year ago #
  6. admin
    Key Master

    OK, I went ahead and made the changes in Android as well. - Charlie

    Posted 1 year ago #
  7. Anonymous
    Unregistered

    plus size wedding dresses online Although just as there is not just one white color there are multiple ivory colors. So what is called a ivory wedding dress at one shop may look a bit different from another ivory dress at another shop.
    Now, what if your skin is darker in tone? The mostly polyester bright white or bluest white can work well…though not so much for many blond Although the contours and stylish modern cut is still popular, but next year’s trend, layering around the princess-style skirt,
    wedding and bridesmaids dresses sweetheart neckline, and style of the 20th century, the skirt 50′s start.
    Fun, stylish and still a lot of romantic wedding ring pillow , summer clothes 20th century-style knee-length dress 50′s dress is suitable for those who want non-traditional

    Posted 9 months ago #

RSS feed for this topic

Control is proudly powered by bbPress.