Fix #33: tinted image buttons

Not a bug, but a feature---now documented!
This commit is contained in:
Matthias Richter 2016-04-17 21:09:24 +02:00
parent 10767cca33
commit 3fd6a6aecd

View file

@ -44,9 +44,6 @@ non-zero alpha value.
You can provide additional ``hovered`` and ``active`` images, but the widget area You can provide additional ``hovered`` and ``active`` images, but the widget area
is always computed from the ``normal`` image. is always computed from the ``normal`` image.
Note that ``ImageButton`` does not recieve width and height parameters. As
such, it does not necessarily honor the cell size of a :doc:`layout`.
**Additional Options:** **Additional Options:**
``normal`` ``normal``
@ -58,6 +55,21 @@ such, it does not necessarily honor the cell size of a :doc:`layout`.
``active`` ``active``
Image for the active state of the widget. Defaults to ``hovered`` if omitted. Image for the active state of the widget. Defaults to ``hovered`` if omitted.
.. note::
``ImageButton`` does not recieve width and height parameters. As such, it
does not necessarily honor the cell size of a :doc:`layout`.
.. note::
Unlike other widgets, ``ImageButton`` is tinted by the currently active
color. If you want the button to appear untinted, make sure the active color
is set to white before adding the button, e.g.::
love.graphics.setColor(255,255,255)
suit.ImageButton(push_me, {hovered=and_then_just, active=touch_me},
suit.layout:row())
Mutable Widgets Mutable Widgets
--------------- ---------------