From 3fd6a6aecdcd5bc9acd6f9dbbfcb1d65427b2e5b Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Sun, 17 Apr 2016 21:09:24 +0200 Subject: [PATCH] Fix #33: tinted image buttons Not a bug, but a feature---now documented! --- docs/widgets.rst | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/docs/widgets.rst b/docs/widgets.rst index 0e78a0c..5c6c230 100644 --- a/docs/widgets.rst +++ b/docs/widgets.rst @@ -44,9 +44,6 @@ non-zero alpha value. You can provide additional ``hovered`` and ``active`` images, but the widget area 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:** ``normal`` @@ -58,6 +55,21 @@ such, it does not necessarily honor the cell size of a :doc:`layout`. ``active`` 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 ---------------