mirror of https://github.com/teverse/teverse
Compare commits
2 Commits
9d2cca67eb
...
7cf19da3ae
Author | SHA1 | Date |
---|---|---|
Jay | 7cf19da3ae | |
Jay | d86d0a712f |
|
@ -1,5 +1,5 @@
|
|||
local main = teverse.construct("guiFrame", {
|
||||
parent = teverse.coreInterface,
|
||||
parent = teverse.interface,
|
||||
backgroundColour = colour.rgb(52, 58, 64),
|
||||
size = guiCoord(1, 0, 1, 100),
|
||||
position = guiCoord(0, 0, 0, -50)
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
local container = teverse.construct("guiFrame", {
|
||||
parent = teverse.coreInterface,
|
||||
size = guiCoord(0, 300, 0, 500),
|
||||
position = guiCoord(0, 20, 0, 20),
|
||||
backgroundAlpha = 0.7,
|
||||
zIndex = 1000,
|
||||
strokeRadius = 2,
|
||||
visible = false
|
||||
})
|
||||
|
||||
return container
|
|
@ -0,0 +1,69 @@
|
|||
-- This is the main interface loaded into coreinterface
|
||||
local console = require("tevgit:core/teverseUI/console.lua")
|
||||
|
||||
local container = teverse.construct("guiFrame", {
|
||||
parent = teverse.coreInterface,
|
||||
size = guiCoord(0, 77, 0, 26),
|
||||
position = guiCoord(1, -81, 1, -30),
|
||||
backgroundAlpha = 0.0,
|
||||
strokeRadius = 13,
|
||||
zIndex = 1000
|
||||
})
|
||||
|
||||
local homebtn
|
||||
|
||||
local ico = teverse.construct("guiIcon", {
|
||||
parent = container,
|
||||
size = guiCoord(0, 20, 0, 20),
|
||||
position = guiCoord(1, -23, 0.5, -10),
|
||||
iconId = "wrench",
|
||||
iconType = "faSolid",
|
||||
iconColour = colour(0, 0, 0),
|
||||
iconMax = 12,
|
||||
iconAlpha = 0.75,
|
||||
strokeRadius = 10,
|
||||
strokeAlpha = 0.5,
|
||||
backgroundAlpha = 1
|
||||
})
|
||||
|
||||
local lastClick = 0
|
||||
ico:on("mouseLeftDown", function()
|
||||
if os.clock() - lastClick < 0.4 then
|
||||
-- double click
|
||||
lastClick = 0
|
||||
console.visible = not console.visible
|
||||
else
|
||||
lastClick = os.clock()
|
||||
end
|
||||
end)
|
||||
|
||||
if teverse.dev.localTevGit then
|
||||
ico:on("mouseLeftUp", function()
|
||||
container.backgroundAlpha = 1.0
|
||||
homebtn.visible = true
|
||||
|
||||
repeat sleep(0.1) until teverse.input.mousePosition.y < container.absolutePosition.y - 25
|
||||
|
||||
container.backgroundAlpha = 0.0
|
||||
homebtn.visible = false
|
||||
end)
|
||||
|
||||
homebtn = teverse.construct("guiTextBox", {
|
||||
parent = container,
|
||||
size = guiCoord(0, 40, 0, 14),
|
||||
position = guiCoord(0, 6, 0.5, -7),
|
||||
text = "HOME",
|
||||
textAlign = "middle",
|
||||
textFont = "tevurl:fonts/openSansLight.ttf",
|
||||
textColour = colour(0, 0, 0),
|
||||
textSize = 14,
|
||||
strokeRadius = 7,
|
||||
strokeAlpha = 0.5,
|
||||
backgroundAlpha = 0,
|
||||
visible = false
|
||||
})
|
||||
|
||||
homebtn:on("mouseLeftUp", function()
|
||||
teverse.apps:loadDashboard()
|
||||
end)
|
||||
end
|
Loading…
Reference in New Issue