Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local bWidHeight
- local bInnerWidHeight
- local bX
- local bY
- local biX
- local biY
- local fontName
- local tiles = {}
- function GeneratePositions()
- fontName = ScrW() .. "x" .. ScrH()
- if (ScrW() < ScrH()) then
- bWidHeight = .9 * ScrW()
- else
- bWidHeight = .9 * ScrH()
- end
- bInnerWidHeight = .75 * bWidHeight
- bX = math.floor((ScrW() / 2) - (bWidHeight / 2))
- bY = math.floor((ScrH() / 2) - (bWidHeight / 2))
- biX = math.floor((ScrW() / 2) - (bInnerWidHeight / 2))
- biY = math.floor((ScrH() / 2) - (bInnerWidHeight / 2))
- local lgTileWH = (.25 * bWidHeight) / 2
- -- You've passed go. Collect $2 million
- tiles[1] = {
- Width = lgTileWH,
- Height = lgTileWH,
- }
- end
- function DrawBoard()
- if (!bWidHeight) or (!tileWidth) or (!tileHeight) or (!fontName) or (!bX) or (!bY) or (!biX) or (!biY) then
- GeneratePositions()
- end
- surface.SetFont("Monopoly." .. fontName)
- surface.SetDrawColor(0, 0, 0, 255)
- surface.DrawOutlinedRect(x, y, bWidHeight, bWidHeight)
- surface.DrawOutlinedRect(iX, iY, bInnerWidHeight, bInnerWidHeight)
- end
- hook.Add("HUDPaint", "DrawMonopolyBoard", DrawBoard)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement