Compare commits

...

3 Commits

Author SHA1 Message Date
teverse 4f369cd4b7 Indicate what kind of app is loading. 2020-06-29 21:27:42 +01:00
teverse eae49175b9 Placeholder app icons 2020-06-29 21:13:31 +01:00
Jay e1a0da2bb9 Added loading text 2020-06-29 18:52:25 +01:00
2 changed files with 35 additions and 16 deletions

View File

@ -30,14 +30,17 @@ local function createApp(app)
active = false active = false
}) })
if (app.iconUrl and app.iconUrl ~= "") then
local img = teverse.construct("guiImage", { local img = teverse.construct("guiImage", {
size = guiCoord(1, 0, 1, 0), size = guiCoord(1, 0, 1, 0),
image = app.iconUrl,
parent = appGui, parent = appGui,
active = false, active = false,
zIndex = -1 zIndex = -1
}) })
if (app.iconUrl and app.iconUrl ~= "") then
img.image = app.iconUrl
else
img.image = "tevurl:img/tevapp.png"
end end
return appGui return appGui
@ -130,7 +133,7 @@ return {
appGui.parent = appsContainer appGui.parent = appsContainer
appGui:on("mouseLeftUp", function() appGui:on("mouseLeftUp", function()
if not loading.visible then if not loading.visible then
loading.text = "Loading App" loading.text = "Loading App " .. (app.packageNetworked and "Online" or "Offline")
loading.visible = true loading.visible = true
if not app.packageNetworked then if not app.packageNetworked then
teverse.apps:loadRemote(app.id) teverse.apps:loadRemote(app.id)

View File

@ -19,14 +19,17 @@ local function createApp(app)
active = false active = false
}) })
if (app.iconUrl and app.iconUrl ~= "") then
local img = teverse.construct("guiImage", { local img = teverse.construct("guiImage", {
size = guiCoord(1, 0, 1, 0), size = guiCoord(1, 0, 1, 0),
image = app.iconUrl,
parent = appGui, parent = appGui,
active = false, active = false,
zIndex = -1 zIndex = -1
}) })
if (app.iconUrl and app.iconUrl ~= "") then
img.image = app.iconUrl
else
img.image = "tevurl:img/tevapp.png"
end end
return appGui return appGui
@ -37,6 +40,19 @@ return {
iconId = "layer-group", iconId = "layer-group",
iconType = "faSolid", iconType = "faSolid",
setup = function(page) setup = function(page)
local loading = teverse.construct("guiTextBox", {
parent = page,
size = guiCoord(1.0, 100, 1.0, 100),
position = guiCoord(0, -50, 0, -50),
backgroundAlpha = 0.4,
backgroundColour = colour(0, 0, 0),
text = "Working...",
textColour = colour(0,0,0),
textAlign = "middle",
visible = false,
zIndex = 10000
})
teverse.construct("guiTextBox", { teverse.construct("guiTextBox", {
parent = page, parent = page,
size = guiCoord(1.0, -20, 0, 48), size = guiCoord(1.0, -20, 0, 48),
@ -148,7 +164,7 @@ return {
appGui.parent = appsContainer appGui.parent = appsContainer
appGui:on("mouseLeftUp", function() appGui:on("mouseLeftUp", function()
if not loading.visible then if not loading.visible then
loading.text = "Loading App" loading.text = "Loading App " .. (app.packageNetworked and "Online" or "Offline")
loading.visible = true loading.visible = true
if not app.packageNetworked then if not app.packageNetworked then
teverse.apps:loadRemote(app.id) teverse.apps:loadRemote(app.id)