@@ -120,6 +120,7 @@ namespace Polycode {
public:
UILabel(const String& text, int size=-1, const String& fontName = "sans", int amode = 0);
void setText(const String& text);
+ void setLabelColor(const Color &color);
Label *getLabel();
String getText();
@@ -82,7 +82,7 @@ UIComboBox::UIComboBox(UIGlobalMenu *globalMenu, Number comboWidth) : UIElement(
selectedLabel->setPosition(paddingX, paddingY);
addChild(selectedLabel);
- selectedLabel->color.setColorHexFromString(conf->getStringValue("Polycode", "uiDefaultFontColor"));
+ selectedLabel->setLabelColor(Color(0.0, 0.0, 0.0, 1.0));
String selectorBgImage = conf->getStringValue("Polycode", "uiComboBoxSelectorBgImage");
@@ -149,6 +149,10 @@ UILabel::UILabel(const String& text, int size, const String& fontName, int amode
setLocalBoundingBox(label->getLocalBoundingBox());
}
+void UILabel::setLabelColor(const Color &color) {
+ label->color = color;
+}
+
void UILabel::setText(const String& text) {
label->setText(text);
@@ -47,7 +47,7 @@ UIMenuItem::UIMenuItem(String label, String _id, void *data, Number comboWidth,
itemLabel->setBlendingMode(Renderer::BLEND_MODE_NORMAL);
itemLabel->setPosition(paddingX, floor(((comboHeight/2.0) - itemLabel->getHeight()/2.0) + paddingY));
addChild(itemLabel);
- itemLabel->color.setColorHexFromString(conf->getStringValue("Polycode", "uiDefaultFontColor"));
+ itemLabel->color.setColor(0.0, 0.0, 0.0, 1.0);
this->_id = _id;
this->data = data;