From a1b2762b59c839b853d9539c515ac9eb54a03c17 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Fri, 20 Oct 2023 03:31:28 +0200 Subject: [PATCH] fixes to prev. commits. + Lua func *_getRepeatScale() --- Aquaria/ScriptInterface.cpp | 1 + BBGE/Quad.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 6d8b602..613bfb1 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -2085,6 +2085,7 @@ luaFunc(quad_getBorderAlpha) Q_FUNC(getter, prefix, setRepeatTexture) \ Q_FUNC(getter, prefix, isRepeatTexture ) \ Q_FUNC(getter, prefix, setRepeatScale ) \ + Q_FUNC(getter, prefix, getRepeatScale ) \ Q_FUNC(getter, prefix, setRenderBorder ) \ Q_FUNC(getter, prefix, isRenderBorder ) \ Q_FUNC(getter, prefix, setRenderCenter ) \ diff --git a/BBGE/Quad.cpp b/BBGE/Quad.cpp index f9665ea..93895c7 100644 --- a/BBGE/Quad.cpp +++ b/BBGE/Quad.cpp @@ -303,16 +303,19 @@ void Quad::setWidthHeight(float w, float h) else height = h; width = w; + updateTexCoords(); } void Quad::setWidth(float w) { width = w; + updateTexCoords(); } void Quad::setHeight(float h) { height = h; + updateTexCoords(); } void Quad::onSetTexture() @@ -327,6 +330,7 @@ void Quad::onSetTexture() width = 64; height = 64; } + updateTexCoords(); } PauseQuad::PauseQuad() : Quad(), pauseLevel(0), positionSnapTo(0), autoWidth(0), autoHeight(0)