fix CreateStatusBarTexturePointer events arguments

This commit is contained in:
Pinya
2017-12-16 20:52:32 +03:00
parent bc9f256f77
commit dd8462afd6
+12 -10
View File
@@ -280,20 +280,22 @@ local function OnOrientationChanged(self, orientation)
end end
end end
local function OnSizeChanged(self, width, height) local function OnSizeChanged()
self.texturePointer.width = width local width, height = this:GetWidth(), this:GetHeight()
self.texturePointer.height = height this.texturePointer.width = width
self.texturePointer:SetWidth(width) this.texturePointer.height = height
self.texturePointer:SetHeight(height) this.texturePointer:SetWidth(width)
this.texturePointer:SetHeight(height)
end end
local function OnValueChanged(self, value) local function OnValueChanged()
local _, max = self:GetMinMaxValues() local value = arg1
local _, max = this:GetMinMaxValues()
if self.texturePointer.verticalOrientation then if this.texturePointer.verticalOrientation then
self.texturePointer:SetHeight(self.texturePointer.height * (value / max)) this.texturePointer:SetHeight(this.texturePointer.height * (value / max))
else else
self.texturePointer:SetWidth(self.texturePointer.width * (value / max)) this.texturePointer:SetWidth(this.texturePointer.width * (value / max))
end end
end end