27#include <guichan/font.hpp>
30 const std::string &group,
35 setWidth(skin.getMinWidth() + 2 * skin.padding + skin.spacing + getFont()->getWidth(caption));
36 setHeight(skin.getMinHeight() + 2 * skin.padding);
49 skin.
draw(g, widgetState);
51 if (
auto skinState = skin.getState(widgetState.
flags))
53 auto &textFormat = skinState->textFormat;
54 g->drawText(getCaption(),
55 skin.getMinWidth() + skin.padding + skin.spacing,
58 textFormat.bold ?
boldFont : getFont(),
A central point of control for graphics.
Theme * getTheme() const
The global GUI theme.
void draw(Graphics *graphics, const WidgetState &state) const
const Skin & getSkin(SkinType skinType) const
gcn::Font * boldFont
Bolded text font.