The number of colors in indexed sprites cannot be modified in the beta version yet (it needs more testing).

This commit is contained in:
David Capello 2010-06-23 23:31:29 -03:00
parent 52f94b613b
commit d6def8fcc4
2 changed files with 5 additions and 1 deletions

View File

@ -16,7 +16,7 @@
<box vertical="true" homogeneous="true" childspacing="0">
<box horizontal="true">
<radio name="radio3" text="&amp;Indexed with " group="1" tooltip="Using a palette of 256 colors&#10;(8 bits per pixel)" />
<entry name="colors" maxsize="8" tooltip="Maximum number of colors&#10;(only for Indexed images)" />
<entry name="colors" maxsize="8" tooltip="Maximum number of colors&#10;(only for Indexed images)&#10;&#10;This field cannot be modified in this beta version." disabled="true" />
<label text="Colors" />
</box>
<radio name="radio1" text="&amp;RGB Color" group="1" tooltip="RGBA color mode&#10;(32 bits per pixel)" />

View File

@ -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);