diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 08:57:30 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-07-03 08:57:30 +1000 |
commit | 7999442f01140eec6cba813bb76fc3b5c9e5aa90 (patch) | |
tree | 803361028115bb3858bbc996d03790a04977dd94 /source/game/scripting/StarLuaGameConverters.cpp | |
parent | 398a5655f42378176a1e596af6d399a180ffb733 (diff) |
Fix scaling
not happy with having to do this, but whatever
Diffstat (limited to 'source/game/scripting/StarLuaGameConverters.cpp')
-rw-r--r-- | source/game/scripting/StarLuaGameConverters.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/game/scripting/StarLuaGameConverters.cpp b/source/game/scripting/StarLuaGameConverters.cpp index 070048e..baae984 100644 --- a/source/game/scripting/StarLuaGameConverters.cpp +++ b/source/game/scripting/StarLuaGameConverters.cpp @@ -449,7 +449,12 @@ Maybe<Drawable> LuaConverter<Drawable>::to(LuaEngine& engine, LuaValue const& v) else if (auto poly = table->get<Maybe<PolyF>>("poly")) drawable = Drawable::makePoly(poly.take(), color); else if (auto image = table->get<Maybe<String>>("image")) - drawable = Drawable::makeImage(image.take(), 1.0f, table->get<Maybe<bool>>("centered").value(true), Vec2F(), color); + drawable = Drawable::makeImage( + image.take(), + table->get<Maybe<bool>>("screenSpace").value(false) ? 1.0f : 1.0f / TilePixels, + table->get<Maybe<bool>>("centered").value(true), + Vec2F(), + color); else return {}; // throw LuaAnimationComponentException("Drawable table must have 'line', 'poly', or 'image'"); |