Да ебаные же в рот старгейты!1

This commit is contained in:
igor 2017-11-12 12:02:40 +03:00
parent c6d9d572ca
commit bb4f98458d
2 changed files with 9 additions and 9 deletions

View File

@ -830,7 +830,7 @@
type="Application",
icon="https://raw.githubusercontent.com/IgorTimofeev/OpenComputers/master/Applications/Stargate/Icon.pic",
createShortcut=true,
version=1.13,
version=1.14,
resources={
{
path="/Ch1.pic",

View File

@ -22,7 +22,6 @@ local contacts = {}
local Ch1Image = image.load(resources .. "Ch1.pic")
local Ch2Image = image.load(resources .. "Ch2.pic")
buffer.flush()
local mainContainer = GUI.fullScreenContainer()
---------------------------------------------------------------------------------------------
@ -141,8 +140,14 @@ end
---------------------------------------------------------------------------------------------
local width, height = 32, 37
local x, y = mainContainer.width - width - 3, math.floor(mainContainer.height / 2 - height / 2)
mainContainer:addChild(GUI.panel(1, 1, mainContainer.width, mainContainer.height, 0x1E1E1E))
mainContainer.SGImage = mainContainer:addChild(GUI.image(1, 1, image.load(resources .. "OffOff.pic")))
mainContainer.SGImage.localX, mainContainer.SGImage.localY = math.floor((x - 2) / 2 - image.getWidth(mainContainer.SGImage.image) / 2), mainContainer.height - image.getHeight(mainContainer.SGImage.image) + 1
mainContainer.chevronsContainer = mainContainer:addChild(GUI.container(mainContainer.SGImage.localX, mainContainer.SGImage.localY, mainContainer.SGImage.width, mainContainer.SGImage.height))
mainContainer.chevrons = {}
addChevron(13, 30)
@ -153,12 +158,6 @@ addChevron(72, 6)
addChevron(83, 17)
addChevron(79, 30)
local width, height = 32, 37
local x, y = mainContainer.width - width - 3, math.floor(mainContainer.height / 2 - height / 2)
mainContainer.SGImage.localX, mainContainer.SGImage.localY = math.floor((x - 2) / 2 - image.getWidth(mainContainer.SGImage.image) / 2), mainContainer.height - image.getHeight(mainContainer.SGImage.image) + 1
mainContainer.chevronsContainer.localPosition = mainContainer.SGImage.localPosition
mainContainer:addChild(newThing(mainContainer.SGImage.localX + mainContainer.SGImage.width, y, mainContainer.width - mainContainer.SGImage.localX - mainContainer.SGImage.width - width - 7, height))
mainContainer:addChild(GUI.label(x, y, width, 1, 0xEEEEEE, "Stargate " .. stargate.localAddress())):setAlignment(GUI.alignment.horizontal.center, GUI.alignment.vertical.top); y = y + 1
@ -312,8 +311,9 @@ loadContacts()
updateContacts()
update()
updateChevrons(stargate.stargateState() == "Connected")
mainContainer:draw()
buffer.draw()
buffer.draw(true)
mainContainer:startEventHandling()