- Main Page
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# KrButton Class Reference

A super class for more specialized buttons. More...

`#include <button.h>`

Inheritance diagram for KrButton:

List of all members.

## Public Member Functions
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.

## Detailed Description

A super class for more specialized buttons.

It's only external method is to set the text of the button.

## Member Function Documentation

void KrButton::SetIcon | ( | KrSprite * | giveSprite | ) |

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.

The documentation for this class was generated from the following file:

- button.h