Updated to OTCv8 3.1 rev 211

This commit is contained in:
OTCv8 2022-05-19 19:32:13 +00:00
parent ac617e456a
commit 5050b080f2
9 changed files with 7 additions and 36 deletions

BIN
data/images/game/floor.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -8,6 +8,7 @@ CreatureButton < UICreatureButton
anchors.left: parent.left anchors.left: parent.left
anchors.top: parent.top anchors.top: parent.top
phantom: true phantom: true
old-scaling: true
UIWidget UIWidget
id: spacer id: spacer

View File

@ -103,46 +103,12 @@ function onShowFloorChange(checkBox, checked)
local newMargin = floor:getMarginRight() + 8 local newMargin = floor:getMarginRight() + 8
floor:setMarginRight(newMargin) floor:setMarginRight(newMargin)
if newMargin >= 64 then if newMargin >= 64 then
for i = 1, floorTiles do
local sprites = {}
local startIndex = 1 + ((i - 1) * floorTiles)
local endIndex = i * floorTiles
for k = startIndex, endIndex do
sprites[#sprites + 1] = floor:getChildByIndex(k):getSpriteId()
end
table.insert(sprites, #sprites, table.remove(sprites, 1))
local sid = 1
for k = startIndex, endIndex do
floor:getChildByIndex(k):setSpriteId(sprites[sid])
sid = sid + 1
end
end
floor:setMarginRight(0) floor:setMarginRight(0)
end end
elseif direction == Directions.West then elseif direction == Directions.West then
local newMargin = floor:getMarginLeft() + 8 local newMargin = floor:getMarginLeft() + 8
floor:setMarginLeft(newMargin) floor:setMarginLeft(newMargin)
if newMargin >= 64 then if newMargin >= 64 then
for i = 1, floorTiles do
local sprites = {}
local startIndex = 1 + ((i - 1) * floorTiles)
local endIndex = i * floorTiles
for k = startIndex, endIndex do
sprites[#sprites + 1] = floor:getChildByIndex(k):getSpriteId()
end
table.insert(sprites, 1, table.remove(sprites, #sprites))
local sid = 1
for k = startIndex, endIndex do
floor:getChildByIndex(k):setSpriteId(sprites[sid])
sid = sid + 1
end
end
floor:setMarginLeft(0) floor:setMarginLeft(0)
end end
end end
@ -238,8 +204,7 @@ function create(currentOutfit, outfitList, mountList, wingList, auraList, shader
floor = window.preview.panel.floor floor = window.preview.panel.floor
for i = 1, floorTiles * floorTiles do for i = 1, floorTiles * floorTiles do
local tile = g_ui.createWidget("UISprite", floor) g_ui.createWidget("FloorTile", floor)
tile:setSpriteId(math.random(10057, 10064))
end end
floor:hide() floor:hide()

View File

@ -1 +1,6 @@
FloorTile < UIWidget
image-source: /images/game/floor
size: 32 32
phantom: true
OutfitWindow OutfitWindow

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.