32#include <guichan/widgets/label.hpp>
44 setFrameSize(skin.frameSize);
51 mLabel->setCaption(caption);
54 setSize(mLabel->getWidth() +
mPadding * 2,
58 static_cast<TabbedArea*
>(mTabbedArea)->adjustTabPositions();
63 if (getFrameSize() == 0)
67 if (mTabbedArea && mTabbedArea->isTabSelected(
this))
73 if (mTabbedArea && mTabbedArea->isTabSelected(
this))
80 if (
auto state = skin.getState(flags))
82 gcn::Color foregroundColor = state->textFormat.color;
83 auto outlineColor = state->textFormat.outlineColor;
94 auto label =
static_cast<Label*
>(mLabel);
95 label->setForegroundColor(foregroundColor);
97 label->setShadowColor(state->textFormat.shadowColor);
107 state.
width += getFrameSize() * 2;
108 state.
height += getFrameSize() * 2;
111 if (mTabbedArea && mTabbedArea->isTabSelected(
this))
A central point of control for graphics.
Theme * getTheme() const
The global GUI theme.
void setOutlineColor(std::optional< gcn::Color > color)
Sets the color of the outline.
const gcn::Color & getColor(int type) const
Gets the color associated with the type.
const gcn::Color * mTabColor
void drawFrame(gcn::Graphics *graphics) override
Draw the tab frame.
void setCaption(const std::string &caption)
Sets the caption of the tab.
void draw(gcn::Graphics *graphics) override
Draw the tab.
void setTabColor(const gcn::Color *color)
Set the normal color fo the tab's text.
void setFlash(bool flash)
Set tab flashing state.
A tabbed area, the same as the guichan tabbed area in 0.8, but extended.
const Skin & getSkin(SkinType skinType) const
const Palette & getPalette(size_t index) const
void drawSkin(Graphics *graphics, SkinType type, const WidgetState &state) const