forked from mirrors/0ad
Delete unused CCheckbox text setting remains following b1422137e5, refs 0f807c643a.
Differential Revision: https://code.wildfiregames.com/D2314 Tested on: clang 8.0.1., Jenkins This was SVN commit r22952.
This commit is contained in:
@@ -19,22 +19,11 @@
|
||||
|
||||
#include "CCheckBox.h"
|
||||
|
||||
#include "gui/CGUIColor.h"
|
||||
#include "graphics/FontMetrics.h"
|
||||
#include "ps/CStrIntern.h"
|
||||
|
||||
/**
|
||||
* TODO: Since there is no call to DrawText, the checkbox won't render any text.
|
||||
* Thus the font, caption, textcolor and other settings have no effect.
|
||||
*/
|
||||
CCheckBox::CCheckBox(CGUI& pGUI)
|
||||
: IGUIObject(pGUI), IGUITextOwner(pGUI), IGUIButtonBehavior(pGUI)
|
||||
: IGUIObject(pGUI), IGUIButtonBehavior(pGUI)
|
||||
{
|
||||
AddSetting<float>("buffer_zone");
|
||||
AddSetting<CGUIString>("caption");
|
||||
AddSetting<i32>("cell_id");
|
||||
AddSetting<bool>("checked");
|
||||
AddSetting<CStrW>("font");
|
||||
AddSetting<CStrW>("sound_disabled");
|
||||
AddSetting<CStrW>("sound_enter");
|
||||
AddSetting<CStrW>("sound_leave");
|
||||
@@ -48,39 +37,18 @@ CCheckBox::CCheckBox(CGUI& pGUI)
|
||||
AddSetting<CGUISpriteInstance>("sprite2_over");
|
||||
AddSetting<CGUISpriteInstance>("sprite2_pressed");
|
||||
AddSetting<CGUISpriteInstance>("sprite2_disabled");
|
||||
AddSetting<float>("square_side");
|
||||
AddSetting<CGUIColor>("textcolor");
|
||||
AddSetting<CGUIColor>("textcolor_over");
|
||||
AddSetting<CGUIColor>("textcolor_pressed");
|
||||
AddSetting<CGUIColor>("textcolor_disabled");
|
||||
AddSetting<CStrW>("tooltip");
|
||||
AddSetting<CStr>("tooltip_style");
|
||||
|
||||
AddText();
|
||||
}
|
||||
|
||||
CCheckBox::~CCheckBox()
|
||||
{
|
||||
}
|
||||
|
||||
void CCheckBox::SetupText()
|
||||
{
|
||||
ENSURE(m_GeneratedTexts.size() == 1);
|
||||
|
||||
m_GeneratedTexts[0] = CGUIText(
|
||||
m_pGUI,
|
||||
GetSetting<CGUIString>("caption"),
|
||||
GetSetting<CStrW>("font"),
|
||||
m_CachedActualSize.GetWidth() - GetSetting<float>("square_side"),
|
||||
GetSetting<float>("buffer_zone"),
|
||||
this);
|
||||
}
|
||||
|
||||
void CCheckBox::HandleMessage(SGUIMessage& Message)
|
||||
{
|
||||
// Important
|
||||
IGUIButtonBehavior::HandleMessage(Message);
|
||||
IGUITextOwner::HandleMessage(Message);
|
||||
|
||||
switch (Message.type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user