Fixes inconsistencies in spelling of colour/color by preferring "color" (only wxWidgets remains with some API that requires "colour"), fixes #1029.

NOTE: requires update-workspaces and may require correction of some
modded actors/scenarios

This was SVN commit r16438.
This commit is contained in:
historic_bruno
2015-03-15 23:59:48 +00:00
parent 7334f76af6
commit b1c4e29ac8
415 changed files with 1483 additions and 1483 deletions
@@ -161,13 +161,13 @@ bool JSI_IGUIObject::getProperty(JSContext* cx, JS::HandleObject obj, JS::Handle
case GUIST_CColor:
{
CColor colour;
GUI<CColor>::GetSetting(e, propName, colour);
CColor color;
GUI<CColor>::GetSetting(e, propName, color);
JS::RootedObject obj(cx, pScriptInterface->CreateCustomObject("GUIColor"));
vp.setObject(*obj);
JS::RootedValue c(cx);
// Attempt to minimise ugliness through macrosity
#define P(x) c = JS::NumberValue(colour.x); \
#define P(x) c = JS::NumberValue(color.x); \
if (c.isNull()) \
return false; \
JS_SetProperty(cx, obj, #x, c)
@@ -526,17 +526,17 @@ bool JSI_IGUIObject::setProperty(JSContext* cx, JS::HandleObject obj, JS::Handle
}
else if (vp.isObject() && JS_InstanceOf(cx, vpObj, &JSI_GUIColor::JSI_class, NULL))
{
CColor colour;
CColor color;
JS::RootedObject (cx, &vp.toObject());
JS::RootedValue t(cx);
double s;
#define PROP(x) JS_GetProperty(cx, obj, #x, &t); \
s = t.toDouble(); \
colour.x = (float)s
color.x = (float)s
PROP(r); PROP(g); PROP(b); PROP(a);
#undef PROP
GUI<CColor>::SetSetting(e, propName, colour);
GUI<CColor>::SetSetting(e, propName, color);
}
else
{