From d6def8fcc416ff4d7c54ae651a623161f9c7b772 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 23 Jun 2010 23:31:29 -0300 Subject: [PATCH] The number of colors in indexed sprites cannot be modified in the beta version yet (it needs more testing). --- data/widgets/new_sprite.xml | 2 +- src/jinete/jfile.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/widgets/new_sprite.xml b/data/widgets/new_sprite.xml index 72bcac8db..34ec93b65 100644 --- a/data/widgets/new_sprite.xml +++ b/data/widgets/new_sprite.xml @@ -16,7 +16,7 @@ - + diff --git a/src/jinete/jfile.cpp b/src/jinete/jfile.cpp index 82d4f41b7..3f11fbeda 100644 --- a/src/jinete/jfile.cpp +++ b/src/jinete/jfile.cpp @@ -326,6 +326,7 @@ static JWidget convert_xmlelement_to_widget(TiXmlElement* elem) const char *name = elem->Attribute("name"); const char *tooltip = elem->Attribute("tooltip"); bool selected = bool_attr_is_true(elem, "selected"); + bool disabled = bool_attr_is_true(elem, "disabled"); bool expansive = bool_attr_is_true(elem, "expansive"); bool magnetic = bool_attr_is_true(elem, "magnetic"); bool noborders = bool_attr_is_true(elem, "noborders"); @@ -346,6 +347,9 @@ static JWidget convert_xmlelement_to_widget(TiXmlElement* elem) if (selected) jwidget_set_selected(widget, selected); + if (disabled) + jwidget_disable(widget); + if (expansive) jwidget_expansive(widget, true);