#include <button.h>
Inheritance diagram for KrButton::
Public Methods | |
void | SetTextChar (const std::string &text) |
Set the text of the button. The font used is specified in the Scheme. | |
void | SetIcon (KrSprite *giveSprite) |
Put a sprite on the button, as an icon or "decal" image. More... |
It's only external method is to set the text of the button.
|
Put a sprite on the button, as an icon or "decal" image. The sprite is passed to the Button, which owns it and will delete it when the Button is deleted. The Frame and Action of the Sprite will be unchanged by the button. You can change the Frame or Action, but the button will always position and size the icon based on the Frame and Action at the time it was added. The icon can be changed at any time, and the button will clean up memory and create a new one. |