mirror of
https://github.com/OpenMW/openmw.git
synced 2026-01-04 00:13:07 +00:00
Implement equal_to for Color
This commit is contained in:
parent
be0cbb7277
commit
45a51bceb2
2 changed files with 2 additions and 1 deletions
|
|
@ -237,6 +237,7 @@ namespace LuaUtil
|
|||
colorType["asRgba"] = [](const Misc::Color& c) { return Vec4(c.r(), c.g(), c.b(), c.a()); };
|
||||
colorType["asRgb"] = [](const Misc::Color& c) { return Vec3(c.r(), c.g(), c.b()); };
|
||||
colorType["asHex"] = [](const Misc::Color& c) { return c.toHex(); };
|
||||
colorType[sol::meta_function::equal_to] = [](const Misc::Color& a, const Misc::Color& b) { return a == b; };
|
||||
|
||||
sol::table color(lua, sol::create);
|
||||
color["rgba"] = [](float r, float g, float b, float a) { return Misc::Color(r, g, b, a); };
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ testing.registerGlobalTest('record creation', function()
|
|||
value = 10,
|
||||
duration = 12,
|
||||
radius = 30,
|
||||
color = 5,
|
||||
color = util.color.hex('123456'),
|
||||
name = "TestLight",
|
||||
model = "meshes/marker_door.dae"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue