This commit is contained in:
Igor Timofeev 2018-05-19 02:39:39 +03:00
parent b8455db8a8
commit 42e1ca3042
15 changed files with 33 additions and 35 deletions

View File

@ -456,7 +456,7 @@ calculateLightComboBox()
mainContainer.toolbar.blockColorSelector = mainContainer.toolbar:addChild(GUI.colorSelector(2, elementY, elementWidth, 1, 0xEEEEEE, "Block color")); elementY = elementY + mainContainer.toolbar.blockColorSelector.height + 1 mainContainer.toolbar.blockColorSelector = mainContainer.toolbar:addChild(GUI.colorSelector(2, elementY, elementWidth, 1, 0xEEEEEE, "Block color")); elementY = elementY + mainContainer.toolbar.blockColorSelector.height + 1
mainContainer.toolbar.backgroundColorSelector = mainContainer.toolbar:addChild(GUI.colorSelector(2, elementY, elementWidth, 1, scene.backgroundColor, "Background color")); elementY = elementY + mainContainer.toolbar.blockColorSelector.height + 1 mainContainer.toolbar.backgroundColorSelector = mainContainer.toolbar:addChild(GUI.colorSelector(2, elementY, elementWidth, 1, scene.backgroundColor, "Background color")); elementY = elementY + mainContainer.toolbar.blockColorSelector.height + 1
mainContainer.toolbar.backgroundColorSelector.onTouch = function() mainContainer.toolbar.backgroundColorSelector.onColorSelected = function()
scene.backgroundColor = mainContainer.toolbar.backgroundColorSelector.color scene.backgroundColor = mainContainer.toolbar.backgroundColorSelector.color
end end

View File

@ -348,7 +348,7 @@ local function newRatingWidget(x, y, rating, firstColor, secondColor)
end end
local function deletePublication(publication) local function deletePublication(publication)
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, localization.areYouSure) local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, localization.areYouSure)
local buttonsLayout = container.layout:addChild(newButtonsLayout(1, 1, container.layout.width, 3)) local buttonsLayout = container.layout:addChild(newButtonsLayout(1, 1, container.layout.width, 3))
buttonsLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 2, 0, 0xE1E1E1, 0x2D2D2D, 0x0, 0xE1E1E1, localization.yes)).onTouch = function() buttonsLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 2, 0, 0xE1E1E1, 0x2D2D2D, 0x0, 0xE1E1E1, localization.yes)).onTouch = function()
@ -407,7 +407,7 @@ local function download(publication)
end end
if publication then if publication then
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, localization.choosePath) local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, localization.choosePath)
container.layout:setFitting(2, 1, false, false) container.layout:setFitting(2, 1, false, false)
local filesystemChooserPath = fileVersions[publication.file_id] and getApplicationPathFromVersions(fileVersions[publication.file_id].path) local filesystemChooserPath = fileVersions[publication.file_id] and getApplicationPathFromVersions(fileVersions[publication.file_id].path)
@ -1298,7 +1298,7 @@ newPublicationInfo = function(file_id)
end end
buttonsLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 1, 0, 0xA5A5A5, 0xFFFFFF, 0x2D2D2D, 0xFFFFFF, existingReviewText and localization.changeReview or localization.writeReview)).onTouch = function() buttonsLayout:addChild(GUI.adaptiveRoundedButton(1, 1, 1, 0, 0xA5A5A5, 0xFFFFFF, 0x2D2D2D, 0xFFFFFF, existingReviewText and localization.changeReview or localization.writeReview)).onTouch = function()
local container = MineOSInterface.addUniversalContainer(window, existingReviewText and localization.changeReview or localization.writeReview) local container = MineOSInterface.addBackgroundContainer(window, existingReviewText and localization.changeReview or localization.writeReview)
container.layout:setFitting(2, 1, false, false) container.layout:setFitting(2, 1, false, false)
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xFFFFFF, 0x696969, 0xB4B4B4, 0xFFFFFF, 0x2D2D2D, existingReviewText or "", localization.writeReviewHere)) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xFFFFFF, 0x696969, 0xB4B4B4, 0xFFFFFF, 0x2D2D2D, existingReviewText or "", localization.writeReviewHere))
@ -1608,7 +1608,7 @@ editPublication = function(initialPublication, initialCategoryID)
local lastDependencyType = 1 local lastDependencyType = 1
dependenciesLayout.addButton.onTouch = function() dependenciesLayout.addButton.onTouch = function()
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, localization.addDependency) local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, localization.addDependency)
container.layout:setFitting(2, 1, false, false) container.layout:setFitting(2, 1, false, false)
@ -1783,7 +1783,7 @@ updateFileList = function(category_id, updates)
if updates then if updates then
if #result > 0 then if #result > 0 then
layout:addChild(GUI.adaptiveRoundedButton(1, 1, 2, 0, 0x696969, 0xFFFFFF, 0x2D2D2D, 0xFFFFFF, localization.updateAll)).onTouch = function() layout:addChild(GUI.adaptiveRoundedButton(1, 1, 2, 0, 0x696969, 0xFFFFFF, 0x2D2D2D, 0xFFFFFF, localization.updateAll)).onTouch = function()
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, "") local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, "")
container.layout:setFitting(2, 1, false, false) container.layout:setFitting(2, 1, false, false)
local progressBar = container.layout:addChild(GUI.progressBar(1, 1, 40, 0x66DB80, 0x0, 0xE1E1E1, 0, true, true, "", "%")) local progressBar = container.layout:addChild(GUI.progressBar(1, 1, 40, 0x66DB80, 0x0, 0xE1E1E1, 0, true, true, "", "%"))

View File

@ -112,7 +112,7 @@ local function newNoGUI(width, height)
end end
local function new() local function new()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Create") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Create")
local widthTextBox = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, "8", "Width", true)) local widthTextBox = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, "8", "Width", true))
widthTextBox.validator = function(text) widthTextBox.validator = function(text)

View File

@ -147,7 +147,7 @@ local function onFavouriteTouch(path)
addWorkpath(path) addWorkpath(path)
updateFileListAndDraw() updateFileListAndDraw()
else else
GUI.error("Path doesn't exists: " .. path) GUI.alert("Path doesn't exists: " .. path)
end end
end end
@ -163,7 +163,7 @@ openFTP = function(...)
updateSidebar() updateSidebar()
updateFileListAndDraw() updateFileListAndDraw()
else else
GUI.error(reason) GUI.alert(reason)
end end
end end
@ -307,7 +307,7 @@ prevButton.onTouch = function()
end end
FTPButton.onTouch = function() FTPButton.onTouch = function()
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, MineOSCore.localization.networkFTPNewConnection) local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.networkFTPNewConnection)
local ad, po, us, pa, la = "ftp.example.com", "21", "root", "1234" local ad, po, us, pa, la = "ftp.example.com", "21", "root", "1234"
if #MineOSCore.properties.FTPConnections > 0 then if #MineOSCore.properties.FTPConnections > 0 then

View File

@ -1 +0,0 @@
Простой мультипоточный скрипт, которую я написал по большей части для себя: дождь в одинойчной игре заебал меня настолько, насколько это вообще возможно. Для работы программе требуется дебаг-карта.

View File

@ -1 +0,0 @@
Простой мультипоточный скрипт, которую я написал по большей части для себя: дождь в одинойчной игре заебал меня настолько, насколько это вообще возможно. Для работы программе требуется дебаг-карта.

View File

@ -10,11 +10,11 @@ local world
if component.isAvailable("debug") then if component.isAvailable("debug") then
world = component.debug.getWorld() world = component.debug.getWorld()
else else
GUI.error("This program requires debug card to run") GUI.alert("This program requires debug card to run")
return return
end end
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, "Fuck The Rain") local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, "Fuck The Rain")
local lines = string.wrap("This script works as background daemon and checks rain condition in specified interval", 36) local lines = string.wrap("This script works as background daemon and checks rain condition in specified interval", 36)
container.layout:addChild(GUI.textBox(1, 1, 36, #lines, nil, 0xA5A5A5, lines, 1, 0, 0)) container.layout:addChild(GUI.textBox(1, 1, 36, #lines, nil, 0xA5A5A5, lines, 1, 0, 0))
@ -49,7 +49,7 @@ container.layout:addChild(GUI.button(1, 1, 36, 3, 0x444444, 0xFFFFFF, 0x2D2D2D,
end end
end end
container:delete() container:remove()
MineOSInterface.mainContainer:drawOnScreen() MineOSInterface.mainContainer:drawOnScreen()
end end

View File

@ -78,7 +78,7 @@ local function update()
end end
functionButton.onTouch = function() functionButton.onTouch = function()
local container = MineOSInterface.addUniversalContainer(window, "Set function f(x)") local container = MineOSInterface.addBackgroundContainer(window, "Set function f(x)")
local inputField = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, yDependencyString, "f(x)", false)) local inputField = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, yDependencyString, "f(x)", false))
inputField.onInputFinished = function() inputField.onInputFinished = function()
if inputField.text then if inputField.text then

View File

@ -99,7 +99,7 @@ local function byteFieldEventHandler(mainContainer, object, e1, e2, e3, e4, e5)
menu:addSeparator() menu:addSeparator()
menu:addItem("Edit").onTouch = function() menu:addItem("Edit").onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Fill byte range [" .. selection.from .. "; " .. selection.to .. "]") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Fill byte range [" .. selection.from .. "; " .. selection.to .. "]")
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x666666, 0x666666, 0xE1E1E1, 0x2D2D2D, string.format("%02X" , bytes[selection.from]), "Type byte value")) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x666666, 0x666666, 0xE1E1E1, 0x2D2D2D, string.format("%02X" , bytes[selection.from]), "Type byte value"))
input.onInputFinished = function(text) input.onInputFinished = function(text)
@ -118,7 +118,7 @@ local function byteFieldEventHandler(mainContainer, object, e1, e2, e3, e4, e5)
end end
menu:addItem("Insert").onTouch = function() menu:addItem("Insert").onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Insert bytes at position " .. selection.from .. "") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Insert bytes at position " .. selection.from .. "")
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x666666, 0x666666, 0xE1E1E1, 0x2D2D2D, "", "Type byte values separated by space", true)) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x666666, 0x666666, 0xE1E1E1, 0x2D2D2D, "", "Type byte values separated by space", true))
local switch = container.layout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0x1E1E1E, 0xE1E1E1, 0xBBBBBB, "Select inserted bytes:", true)).switch local switch = container.layout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0x1E1E1E, 0xE1E1E1, 0xBBBBBB, "Select inserted bytes:", true)).switch

View File

@ -1665,7 +1665,7 @@ topMenuProperties.onTouch = function()
for i = 1, #colors do for i = 1, #colors do
local colorSelector = container:addChild(GUI.colorSelector(x, y, colorSelectorWidth, colorSelectorHeight, config.syntaxColorScheme[colors[i][1]], colors[i][1])) local colorSelector = container:addChild(GUI.colorSelector(x, y, colorSelectorWidth, colorSelectorHeight, config.syntaxColorScheme[colors[i][1]], colors[i][1]))
colorSelector.onTouch = function() colorSelector.onColorSelected = function()
config.syntaxColorScheme[colors[i][1]] = colorSelector.color config.syntaxColorScheme[colors[i][1]] = colorSelector.color
GUI.LUA_SYNTAX_COLOR_SCHEME = config.syntaxColorScheme GUI.LUA_SYNTAX_COLOR_SCHEME = config.syntaxColorScheme
saveConfig() saveConfig()
@ -1692,7 +1692,7 @@ topMenuProperties.onTouch = function()
end end
local colorSelector = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.cursorColor, localization.cursorColor)) local colorSelector = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.cursorColor, localization.cursorColor))
colorSelector.onTouch = function() colorSelector.onColorSelected = function()
config.cursorColor = colorSelector.color config.cursorColor = colorSelector.color
saveConfig() saveConfig()
end end

View File

@ -296,7 +296,7 @@ local function newNoGUI(width, height)
end end
local function new() local function new()
local container = MineOSInterface.addUniversalContainer(mainContainer, "New picture") local container = MineOSInterface.addBackgroundContainer(mainContainer, "New picture")
local widthInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x696969, 0xE1E1E1, 0x2D2D2D, "51", "Width")) local widthInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x696969, 0xE1E1E1, 0x2D2D2D, "51", "Width"))
local heightInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x696969, 0xE1E1E1, 0x2D2D2D, "19", "Height")) local heightInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x696969, 0xE1E1E1, 0x2D2D2D, "19", "Height"))
@ -371,7 +371,7 @@ fileItem.onTouch = function()
end end
menu:addItem("Open from URL").onTouch = function() menu:addItem("Open from URL").onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Open from URL") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Open from URL")
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x969696, 0xE1E1E1, 0x2D2D2D, "", "http://example.com/test.pic")) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x969696, 0xE1E1E1, 0x2D2D2D, "", "http://example.com/test.pic"))
input.onInputFinished = function() input.onInputFinished = function()
@ -429,7 +429,7 @@ fileItem.onTouch = function()
end end
mainContainer.menu:addItem("View").onTouch = function() mainContainer.menu:addItem("View").onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "View") local container = MineOSInterface.addBackgroundContainer(mainContainer, "View")
local colorSelector1 = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.transparencyBackground, "Transparency background")) local colorSelector1 = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.transparencyBackground, "Transparency background"))
local colorSelector2 = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.transparencyForeground, "Transparency foreground")) local colorSelector2 = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, config.transparencyForeground, "Transparency foreground"))
@ -448,7 +448,7 @@ mainContainer.menu:addItem("View").onTouch = function()
end end
mainContainer.menu:addItem("Hotkeys").onTouch = function() mainContainer.menu:addItem("Hotkeys").onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Hotkeys") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Hotkeys")
local lines = { local lines = {
"There are some hotkeys that works exactly like in real Photoshop:", "There are some hotkeys that works exactly like in real Photoshop:",
" ", " ",

View File

@ -7,7 +7,7 @@ local event = require("event")
--------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, "Running string setup") local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, "Running string setup")
local textInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xFFFFFF, 0x696969, 0xB4B4B4, 0xFFFFFF, 0x2D2D2D, "Working on cool things, don't distract me", "Type text here", true)) local textInput = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xFFFFFF, 0x696969, 0xB4B4B4, 0xFFFFFF, 0x2D2D2D, "Working on cool things, don't distract me", "Type text here", true))
local backgroundColorSelector = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, 0x0, "Background color")) local backgroundColorSelector = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, 0x0, "Background color"))

View File

@ -165,7 +165,7 @@ mainContainer.connectionButton = mainContainer:addChild(GUI.framedButton(x, y, w
-- mainContainer.connectionButton.animated = false -- mainContainer.connectionButton.animated = false
mainContainer.connectionButton.onTouch = function() mainContainer.connectionButton.onTouch = function()
if stargate.stargateState() == "Idle" then if stargate.stargateState() == "Idle" then
local container = MineOSInterface.addUniversalContainer(mainContainer, "Connect") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Connect")
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, contacts.last, "Type address here")) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, contacts.last, "Type address here"))
input.onInputFinished = function() input.onInputFinished = function()
if input.text then if input.text then
@ -201,7 +201,7 @@ end
mainContainer.messageContactButton = mainContainer:addChild(GUI.framedButton(x, y, width, 3, 0xEEEEEE, 0xEEEEEE, 0xBBBBBB, 0xBBBBBB, "Message")); y = y + 4 mainContainer.messageContactButton = mainContainer:addChild(GUI.framedButton(x, y, width, 3, 0xEEEEEE, 0xEEEEEE, 0xBBBBBB, 0xBBBBBB, "Message")); y = y + 4
mainContainer.messageContactButton.onTouch = function() mainContainer.messageContactButton.onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Message") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Message")
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, nil, "Type message text here")) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, nil, "Type message text here"))
input.onInputFinished = function() input.onInputFinished = function()
if input.text then if input.text then
@ -231,7 +231,7 @@ end
mainContainer.addContactButton = mainContainer:addChild(GUI.framedButton(x, y, width, 3, 0xEEEEEE, 0xEEEEEE, 0xBBBBBB, 0xBBBBBB, "Add contact")); y = y + 3 mainContainer.addContactButton = mainContainer:addChild(GUI.framedButton(x, y, width, 3, 0xEEEEEE, 0xEEEEEE, 0xBBBBBB, 0xBBBBBB, "Add contact")); y = y + 3
mainContainer.addContactButton.onTouch = function() mainContainer.addContactButton.onTouch = function()
local container = MineOSInterface.addUniversalContainer(mainContainer, "Add contact") local container = MineOSInterface.addBackgroundContainer(mainContainer, "Add contact")
local input1 = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, nil, "Name")) local input1 = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, nil, "Name"))
local input2 = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, contacts.last, "Address")) local input2 = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xEEEEEE, 0x666666, 0x666666, 0xEEEEEE, 0x262626, contacts.last, "Address"))

6
OS.lua
View File

@ -878,7 +878,7 @@ local function createOSWidgets()
end end
container.layout:addChild(GUI.textBox(1, 1, 36, 1, nil, 0x5A5A5A, {MineOSCore.localization.transparencySwitchInfo}, 1, 0, 0, true, true)) container.layout:addChild(GUI.textBox(1, 1, 36, 1, nil, 0x5A5A5A, {MineOSCore.localization.transparencySwitchInfo}, 1, 0, 0, true, true))
backgroundColorSelector.onTouch = function() backgroundColorSelector.onColorSelected = function()
MineOSCore.properties.backgroundColor = backgroundColorSelector.color MineOSCore.properties.backgroundColor = backgroundColorSelector.color
MineOSCore.properties.menuColor = menuColorSelector.color MineOSCore.properties.menuColor = menuColorSelector.color
MineOSCore.properties.dockColor = dockColorSelector.color MineOSCore.properties.dockColor = dockColorSelector.color
@ -886,8 +886,8 @@ local function createOSWidgets()
MineOSInterface.mainContainer:drawOnScreen() MineOSInterface.mainContainer:drawOnScreen()
end end
menuColorSelector.onTouch = backgroundColorSelector.onTouch menuColorSelector.onColorSelected = backgroundColorSelector.onColorSelected
dockColorSelector.onTouch = backgroundColorSelector.onTouch dockColorSelector.onColorSelected = backgroundColorSelector.onColorSelected
container.panel.eventHandler = function(mainContainer, object, e1) container.panel.eventHandler = function(mainContainer, object, e1)
if e1 == "touch" then if e1 == "touch" then

View File

@ -728,7 +728,7 @@ function MineOSInterface.iconRightClick(icon, e1, e2, e3, e4)
if icon.extension ~= ".app" then if icon.extension ~= ".app" then
menu:addItem(MineOSCore.localization.addToFavourites).onTouch = function() menu:addItem(MineOSCore.localization.addToFavourites).onTouch = function()
local container = MineOSInterface.addUniversalContainer(MineOSInterface.mainContainer, MineOSCore.localization.addToFavourites) local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.addToFavourites)
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, icon.name, MineOSCore.localization.name)) local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, icon.name, MineOSCore.localization.name))
container.panel.eventHandler = function(mainContainer, object, e1) container.panel.eventHandler = function(mainContainer, object, e1)
@ -889,7 +889,7 @@ end
----------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------------------------------------------------------------------
function MineOSInterface.addUniversalContainer(parentContainer, title) function MineOSInterface.addBackgroundContainer(parentContainer, title)
local container = GUI.addBackgroundContainer(parentContainer, true, true, title) local container = GUI.addBackgroundContainer(parentContainer, true, true, title)
container.panel.colors.background = MineOSCore.properties.transparencyEnabled and 0x0 or MineOSCore.properties.backgroundColor container.panel.colors.background = MineOSCore.properties.transparencyEnabled and 0x0 or MineOSCore.properties.backgroundColor
container.panel.colors.transparency = MineOSCore.properties.transparencyEnabled and GUI.BACKGROUND_CONTAINER_PANEL_TRANSPARENCY container.panel.colors.transparency = MineOSCore.properties.transparencyEnabled and GUI.BACKGROUND_CONTAINER_PANEL_TRANSPARENCY
@ -898,7 +898,7 @@ function MineOSInterface.addUniversalContainer(parentContainer, title)
end end
local function addUniversalContainerWithInputTextBox(parentWindow, text, title, placeholder) local function addUniversalContainerWithInputTextBox(parentWindow, text, title, placeholder)
local container = MineOSInterface.addUniversalContainer(parentWindow, title) local container = MineOSInterface.addBackgroundContainer(parentWindow, title)
container.inputField = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, text, placeholder, false)) container.inputField = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, text, placeholder, false))
container.label = container.layout:addChild(GUI.label(1, 1, 36, 1, 0xFF4940, MineOSCore.localization.file .. " " .. MineOSCore.localization.alreadyExists)):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP) container.label = container.layout:addChild(GUI.label(1, 1, 36, 1, 0xFF4940, MineOSCore.localization.file .. " " .. MineOSCore.localization.alreadyExists)):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)
@ -1243,7 +1243,7 @@ end
local function GUICopy(parentContainer, fileList, toPath) local function GUICopy(parentContainer, fileList, toPath)
local applyYes, breakRecursion local applyYes, breakRecursion
local container = MineOSInterface.addUniversalContainer(parentContainer, MineOSCore.localization.copying) local container = MineOSInterface.addBackgroundContainer(parentContainer, MineOSCore.localization.copying)
local textBox = container.layout:addChild(GUI.textBox(1, 1, container.width, 1, nil, 0x787878, {}, 1, 0, 0, true, true):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)) local textBox = container.layout:addChild(GUI.textBox(1, 1, container.width, 1, nil, 0x787878, {}, 1, 0, 0, true, true):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP))
local switchAndLabel = container.layout:addChild(GUI.switchAndLabel(1, 1, 37, 8, 0x66DB80, 0x1E1E1E, 0xE1E1E1, 0x787878, MineOSCore.localization.applyToAll .. ":", false)) local switchAndLabel = container.layout:addChild(GUI.switchAndLabel(1, 1, 37, 8, 0x66DB80, 0x1E1E1E, 0xE1E1E1, 0x787878, MineOSCore.localization.applyToAll .. ":", false))
container.panel.eventHandler = nil container.panel.eventHandler = nil