fix element buttons not changing color when using tpt.el.color, remove 4 char restriction on element names with tpt.el.name
This commit is contained in:
parent
eaf0daec43
commit
3329a6bd79
@ -264,7 +264,7 @@ int luacon_element_getproperty(char * key, int * format, unsigned int * modified
|
|||||||
offset = offsetof(Element, Colour);
|
offset = offsetof(Element, Colour);
|
||||||
*format = 0;
|
*format = 0;
|
||||||
if (modified_stuff)
|
if (modified_stuff)
|
||||||
*modified_stuff |= LUACON_EL_MODIFIED_GRAPHICS;
|
*modified_stuff |= LUACON_EL_MODIFIED_GRAPHICS | LUACON_EL_MODIFIED_MENUS;
|
||||||
}
|
}
|
||||||
else if (strcmp(key, "colour")==0){
|
else if (strcmp(key, "colour")==0){
|
||||||
offset = offsetof(Element, Colour);
|
offset = offsetof(Element, Colour);
|
||||||
@ -457,12 +457,6 @@ int luacon_elementwrite(lua_State* l){
|
|||||||
//Convert to upper case
|
//Convert to upper case
|
||||||
for(j = 0; j < strlen(tempstring); j++)
|
for(j = 0; j < strlen(tempstring); j++)
|
||||||
tempstring[j] = toupper(tempstring[j]);
|
tempstring[j] = toupper(tempstring[j]);
|
||||||
if(strlen(tempstring)>4)
|
|
||||||
{
|
|
||||||
free(tempstring);
|
|
||||||
free(key);
|
|
||||||
return luaL_error(l, "Name too long");
|
|
||||||
}
|
|
||||||
if(luacon_ci->GetParticleType(tempstring) != -1)
|
if(luacon_ci->GetParticleType(tempstring) != -1)
|
||||||
{
|
{
|
||||||
free(tempstring);
|
free(tempstring);
|
||||||
|
Reference in New Issue
Block a user