Compare with Previous |
Blame |
View Log
import "DigitalUtopia.Utilsx.Class";
Tile = class( Turbine.UI.Control );
function Tile:Constructor(x,y,bgX,bgY,zoomInfo)
Turbine.UI.Control.Constructor( self );
self:SetSize(256,256);
--self:SetBackColor(Turbine.UI.Color( math.random(), math.random(), math.random() ));
self:SetPosition(x,y);
self:SetMouseVisible(false);
self.zInfo=zoomInfo;
self.tileType = self.zInfo.tileType;
self.mapName = self.zInfo.mapName;
self.maxX=self.zInfo.maxTileX;
self.maxY=self.zInfo.maxTileY;
self.zoom=self.zInfo.zoom;
self.tileString=self.zInfo.tileString;
--Turbine.Shell.WriteLine(tt);
function self:SetZoom(zi)
self.tileType = zi.tileType;
self.mapName = zi.mapName;
self.maxX=zi.maxTileX;
self.maxY=zi.maxTileY;
self.zoom=zi.zoom;
self.tileString=zi.tileString
end
self.SetBackgroundImage=function(x,y)
self.backgroundX=x;
self.backgroundY=y;
self.bgstring = "DigitalUtopia/LotroMaps/MapData/"..self.mapName.."/"..self.tileType.."/"..self.zoom.."/"..self.tileString.."_"..self.zoom.."_"..x.."x"..y..".jpg"
--Turbine.Shell.WriteLine(self.bgstring);
if (x >= 0 and x <= self.maxX and y >= 0 and y <= self.maxY)then
self:SetBackground(self.bgstring);
else
self:SetBackground("DigitalUtopia/LotroMaps/MapData/"..self.mapName.."/Terrain/7/te_7_0x0.jpg");
end
end
self.SetBackgroundImage(bgX,bgY);
end
Compare with Previous |
Blame
All times are GMT -5. The time now is 06:56 PM.