mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
))
This commit is contained in:
parent
67d38da1ce
commit
3846eddc61
@ -1244,9 +1244,7 @@ local function toggleTopToolBar()
|
||||
calculateSizes()
|
||||
end
|
||||
|
||||
local function createEditOrRightClickMenu(x, y)
|
||||
local menu = GUI.addContextMenu(mainContainer, x, y)
|
||||
|
||||
local function createEditOrRightClickMenu(menu)
|
||||
menu:addItem(localization.cut, not codeView.selections[1], "^X").onTouch = function()
|
||||
cut()
|
||||
end
|
||||
@ -1311,14 +1309,12 @@ local function createEditOrRightClickMenu(x, y)
|
||||
menu:addItem(localization.clearBreakpoints, not breakpointLines, "^F9").onTouch = function()
|
||||
clearBreakpoints()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
codeView.eventHandler = function(mainContainer, object, e1, e2, e3, e4, e5)
|
||||
if e1 == "touch" then
|
||||
if e5 == 1 then
|
||||
createEditOrRightClickMenu(e3, e4)
|
||||
createEditOrRightClickMenu(GUI.addContextMenu(mainContainer, e3, e4))
|
||||
else
|
||||
setCursorPositionAndClearSelection(convertScreenCoordinatesToTextPosition(e3, e4))
|
||||
end
|
||||
@ -1531,11 +1527,8 @@ leftTreeView.onItemSelected = function(path)
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
local topMenuMineCode = topMenu:addItem("MineCode", 0x0)
|
||||
topMenuMineCode.onTouch = function()
|
||||
local menu = GUI.addContextMenu(mainContainer, topMenuMineCode.x, topMenuMineCode.y + 1)
|
||||
|
||||
menu:addItem(localization.about).onTouch = function()
|
||||
local MineCodeContextMenu = topMenu:addContextMenu("MineCode", 0x0)
|
||||
MineCodeContextMenu:addItem(localization.about).onTouch = function()
|
||||
local container = addBackgroundContainer(localization.about)
|
||||
|
||||
local about = {
|
||||
@ -1561,91 +1554,71 @@ topMenuMineCode.onTouch = function()
|
||||
textBox:setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)
|
||||
textBox.eventHandler = nil
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
menu:addItem(localization.quit, false, "^W").onTouch = function()
|
||||
mainContainer:stopEventHandling()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
local topMenuFile = topMenu:addItem(localization.file)
|
||||
topMenuFile.onTouch = function()
|
||||
local menu = GUI.addContextMenu(mainContainer, topMenuFile.x, topMenuFile.y + 1)
|
||||
MineCodeContextMenu:addItem(localization.quit, false, "^W").onTouch = function()
|
||||
mainContainer:stopEventHandling()
|
||||
end
|
||||
|
||||
menu:addItem(localization.new, false, "^N").onTouch = function()
|
||||
local fileContextMenu = topMenu:addContextMenu(localization.file)
|
||||
fileContextMenu:addItem(localization.new, false, "^N").onTouch = function()
|
||||
newFile()
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(localization.open, false, "^O").onTouch = function()
|
||||
fileContextMenu:addItem(localization.open, false, "^O").onTouch = function()
|
||||
openFileWindow()
|
||||
end
|
||||
end
|
||||
|
||||
if component.isAvailable("internet") then
|
||||
menu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
|
||||
if component.isAvailable("internet") then
|
||||
fileContextMenu:addItem(localization.getFromWeb, false, "^U").onTouch = function()
|
||||
downloadFileFromWeb()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
fileContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(localization.save, not leftTreeView.selectedItem, "^S").onTouch = function()
|
||||
fileContextMenu:addItem(localization.save, not leftTreeView.selectedItem, "^S").onTouch = function()
|
||||
saveFileWindow()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(localization.saveAs, false, "^⇧S").onTouch = function()
|
||||
fileContextMenu:addItem(localization.saveAs, false, "^⇧S").onTouch = function()
|
||||
saveFileAsWindow()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(localization.launchWithArguments, false, "^F5").onTouch = function()
|
||||
fileContextMenu:addItem(localization.launchWithArguments, false, "^F5").onTouch = function()
|
||||
launchWithArgumentsWindow()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
local topMenuEdit = topMenu:addItem(localization.edit)
|
||||
topMenuEdit.onTouch = function()
|
||||
createEditOrRightClickMenu(topMenuEdit.x, topMenuEdit.y + 1)
|
||||
end
|
||||
local topMenuEdit = topMenu:addContextMenu(localization.edit)
|
||||
createEditOrRightClickMenu(topMenuEdit)
|
||||
|
||||
local topMenuGoto = topMenu:addItem(localization.gotoCyka)
|
||||
topMenuGoto.onTouch = function()
|
||||
local menu = GUI.addContextMenu(mainContainer, topMenuGoto.x, topMenuGoto.y + 1)
|
||||
|
||||
menu:addItem(localization.pageUp, false, "PgUp").onTouch = function()
|
||||
local gotoContextMenu = topMenu:addContextMenu(localization.gotoCyka)
|
||||
gotoContextMenu:addItem(localization.pageUp, false, "PgUp").onTouch = function()
|
||||
pageUp()
|
||||
end
|
||||
|
||||
menu:addItem(localization.pageDown, false, "PgDn").onTouch = function()
|
||||
pageDown()
|
||||
end
|
||||
|
||||
menu:addItem(localization.gotoStart, false, "Home").onTouch = function()
|
||||
setCursorPositionToHome()
|
||||
end
|
||||
|
||||
menu:addItem(localization.gotoEnd, false, "End").onTouch = function()
|
||||
setCursorPositionToEnd()
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
|
||||
menu:addItem(localization.gotoLine, false, "^L").onTouch = function()
|
||||
gotoLineWindow()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
local topMenuProperties = topMenu:addItem(localization.properties)
|
||||
topMenuProperties.onTouch = function()
|
||||
local menu = GUI.addContextMenu(mainContainer, topMenuProperties.x, topMenuProperties.y + 1)
|
||||
gotoContextMenu:addItem(localization.pageDown, false, "PgDn").onTouch = function()
|
||||
pageDown()
|
||||
end
|
||||
|
||||
menu:addItem(localization.colorScheme).onTouch = function()
|
||||
gotoContextMenu:addItem(localization.gotoStart, false, "Home").onTouch = function()
|
||||
setCursorPositionToHome()
|
||||
end
|
||||
|
||||
gotoContextMenu:addItem(localization.gotoEnd, false, "End").onTouch = function()
|
||||
setCursorPositionToEnd()
|
||||
end
|
||||
|
||||
gotoContextMenu:addSeparator()
|
||||
|
||||
gotoContextMenu:addItem(localization.gotoLine, false, "^L").onTouch = function()
|
||||
gotoLineWindow()
|
||||
end
|
||||
|
||||
local propertiesContextMenu = topMenu:addContextMenu(localization.properties)
|
||||
propertiesContextMenu:addItem(localization.colorScheme).onTouch = function()
|
||||
local container = GUI.addBackgroundContainer(mainContainer, true, false, localization.colorScheme)
|
||||
|
||||
local colorSelectorsCount, colorSelectorCountX = 0, 4; for key in pairs(config.syntaxColorScheme) do colorSelectorsCount = colorSelectorsCount + 1 end
|
||||
@ -1678,9 +1651,9 @@ topMenuProperties.onTouch = function()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(localization.cursorProperties).onTouch = function()
|
||||
propertiesContextMenu:addItem(localization.cursorProperties).onTouch = function()
|
||||
local container = addBackgroundContainer(localization.cursorProperties)
|
||||
|
||||
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xC3C3C3, 0x787878, 0x787878, 0xC3C3C3, 0x2D2D2D, config.cursorSymbol, localization.cursorSymbol))
|
||||
@ -1704,31 +1677,28 @@ topMenuProperties.onTouch = function()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
|
||||
if topToolBar.hidden then
|
||||
menu:addItem(localization.toggleTopToolBar).onTouch = function()
|
||||
if topToolBar.hidden then
|
||||
propertiesContextMenu:addItem(localization.toggleTopToolBar).onTouch = function()
|
||||
toggleTopToolBar()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
propertiesContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(config.syntaxHighlight and localization.disableSyntaxHighlight or localization.enableSyntaxHighlight).onTouch = function()
|
||||
propertiesContextMenu:addItem(config.syntaxHighlight and localization.disableSyntaxHighlight or localization.enableSyntaxHighlight).onTouch = function()
|
||||
syntaxHighlightingButton.pressed = not syntaxHighlightingButton.pressed
|
||||
syntaxHighlightingButton.onTouch()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(config.enableAutoBrackets and localization.disableAutoBrackets or localization.enableAutoBrackets, false, "^]").onTouch = function()
|
||||
propertiesContextMenu:addItem(config.enableAutoBrackets and localization.disableAutoBrackets or localization.enableAutoBrackets, false, "^]").onTouch = function()
|
||||
config.enableAutoBrackets = not config.enableAutoBrackets
|
||||
saveConfig()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(config.enableAutocompletion and localization.disableAutocompletion or localization.enableAutocompletion, false, "^I").onTouch = function()
|
||||
propertiesContextMenu:addItem(config.enableAutocompletion and localization.disableAutocompletion or localization.enableAutocompletion, false, "^I").onTouch = function()
|
||||
toggleEnableAutocompleteDatabase()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
leftTreeViewResizer.onResize = function(dragWidth, dragHeight)
|
||||
|
||||
@ -339,15 +339,12 @@ end
|
||||
|
||||
mainContainer.menu:addItem("PE", 0x00B6FF)
|
||||
|
||||
local fileItem = mainContainer.menu:addItem("File")
|
||||
fileItem.onTouch = function()
|
||||
local menu = GUI.addContextMenu(mainContainer, fileItem.x, fileItem.y + 1)
|
||||
local fileItem = mainContainer.menu:addContextMenu("File")
|
||||
fileItem:addItem("New").onTouch = new
|
||||
|
||||
menu:addItem("New").onTouch = new
|
||||
fileItem:addSeparator()
|
||||
|
||||
menu:addSeparator()
|
||||
|
||||
menu:addItem("Open").onTouch = function()
|
||||
fileItem:addItem("Open").onTouch = function()
|
||||
local filesystemDialog = GUI.addFilesystemDialog(mainContainer, true, 50, math.floor(mainContainer.height * 0.8), "Open", "Cancel", "File name", "/")
|
||||
filesystemDialog:setMode(GUI.IO_MODE_OPEN, GUI.IO_MODE_FILE)
|
||||
filesystemDialog:addExtensionFilter(".pic")
|
||||
@ -358,17 +355,17 @@ fileItem.onTouch = function()
|
||||
loadImage(path)
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local subMenu = menu:addSubMenu("Open recent", #config.recentFiles == 0)
|
||||
for i = 1, #config.recentFiles do
|
||||
subMenu:addItem(string.limit(config.recentFiles[i], 32, "left")).onTouch = function()
|
||||
local fileItemSubMenu = fileItem:addSubMenu("Open recent", #config.recentFiles == 0)
|
||||
for i = 1, #config.recentFiles do
|
||||
fileItemSubMenu:addItem(string.limit(config.recentFiles[i], 32, "left")).onTouch = function()
|
||||
loadImage(config.recentFiles[i])
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem("Open from URL").onTouch = function()
|
||||
fileItem:addItem("Open from URL").onTouch = function()
|
||||
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"))
|
||||
@ -396,15 +393,15 @@ fileItem.onTouch = function()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
fileItem:addSeparator()
|
||||
|
||||
menu:addItem("Save", not savePath).onTouch = function()
|
||||
fileItem:addItem("Save", not savePath).onTouch = function()
|
||||
saveImage(savePath)
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem("Save as").onTouch = function()
|
||||
fileItem:addItem("Save as").onTouch = function()
|
||||
local filesystemDialog = GUI.addFilesystemDialog(mainContainer, true, 50, math.floor(mainContainer.height * 0.8), "Save", "Cancel", "File name", "/")
|
||||
filesystemDialog:setMode(GUI.IO_MODE_SAVE, GUI.IO_MODE_FILE)
|
||||
filesystemDialog:addExtensionFilter(".pic")
|
||||
@ -415,15 +412,12 @@ fileItem.onTouch = function()
|
||||
filesystemDialog.onSubmit = function(path)
|
||||
saveImage(path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
fileItem:addSeparator()
|
||||
|
||||
menu:addItem("Exit").onTouch = function()
|
||||
fileItem:addItem("Exit").onTouch = function()
|
||||
mainContainer:stopEventHandling()
|
||||
end
|
||||
|
||||
mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
mainContainer.menu:addItem("View").onTouch = function()
|
||||
|
||||
59
OS.lua
59
OS.lua
@ -512,11 +512,9 @@ local function createOSWidgets()
|
||||
MineOSInterface.mainContainer.windowsContainer = MineOSInterface.mainContainer:addChild(GUI.container(1, 2, 1, 1))
|
||||
|
||||
MineOSInterface.mainContainer.menu = MineOSInterface.mainContainer:addChild(GUI.menu(1, 1, MineOSInterface.mainContainer.width, MineOSCore.properties.menuColor, 0x696969, 0x3366CC, 0xFFFFFF))
|
||||
local item1 = MineOSInterface.mainContainer.menu:addItem("MineOS", 0x000000)
|
||||
item1.onTouch = function()
|
||||
local menu = MineOSInterface.addContextMenu(MineOSInterface.mainContainer, item1.x, item1.y + 1)
|
||||
|
||||
menu:addItem(MineOSCore.localization.aboutSystem).onTouch = function()
|
||||
local MineOSContextMenu = MineOSInterface.mainContainer.menu:addContextMenu("MineOS", 0x000000)
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.aboutSystem).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.aboutSystem)
|
||||
container.layout:setFitting(2, 1, false, false)
|
||||
container.layout:removeChildren()
|
||||
@ -559,40 +557,37 @@ local function createOSWidgets()
|
||||
MineOSInterface.mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.updates).onTouch = function()
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.updates).onTouch = function()
|
||||
MineOSInterface.safeLaunch(MineOSPaths.applications .. "App Market.app/Main.lua", "updates")
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
MineOSContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(MineOSCore.localization.logout, MineOSCore.properties.protectionMethod == "withoutProtection").onTouch = function()
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.logout, MineOSCore.properties.protectionMethod == "withoutProtection").onTouch = function()
|
||||
login()
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.reboot).onTouch = function()
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.reboot).onTouch = function()
|
||||
MineOSNetwork.broadcastComputerState(false)
|
||||
require("computer").shutdown(true)
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.shutdown).onTouch = function()
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.shutdown).onTouch = function()
|
||||
MineOSNetwork.broadcastComputerState(false)
|
||||
require("computer").shutdown()
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
MineOSContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(MineOSCore.localization.returnToShell).onTouch = function()
|
||||
MineOSContextMenu:addItem(MineOSCore.localization.returnToShell).onTouch = function()
|
||||
MineOSNetwork.broadcastComputerState(false)
|
||||
MineOSInterface.mainContainer:stopEventHandling()
|
||||
MineOSInterface.clearTerminal()
|
||||
os.exit()
|
||||
end
|
||||
|
||||
MineOSInterface.mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
local item2 = MineOSInterface.mainContainer.menu:addItem(MineOSCore.localization.network)
|
||||
item2.onTouch = function()
|
||||
local networkItem = MineOSInterface.mainContainer.menu:addItem(MineOSCore.localization.network)
|
||||
networkItem.onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.network)
|
||||
local insertModemTextBox = container.layout:addChild(GUI.textBox(1, 1, 36, 1, nil, 0x5A5A5A, {MineOSCore.localization.networkModemNotAvailable}, 1, 0, 0, true, true))
|
||||
local stateSwitchAndLabel = container.layout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0x2D2D2D, 0xE1E1E1, 0x878787, MineOSCore.localization.networkState .. ":", MineOSCore.properties.network.enabled))
|
||||
@ -682,12 +677,9 @@ local function createOSWidgets()
|
||||
check()
|
||||
end
|
||||
|
||||
local item3 = MineOSInterface.mainContainer.menu:addItem(MineOSCore.localization.settings)
|
||||
item3.onTouch = function()
|
||||
local menu = MineOSInterface.addContextMenu(MineOSInterface.mainContainer, item3.x, item3.y + 1)
|
||||
|
||||
local settingsContextMenu = MineOSInterface.mainContainer.menu:addContextMenu(MineOSCore.localization.settings)
|
||||
if computer.getArchitectures then
|
||||
menu:addItem(MineOSCore.localization.CPUArchitecture).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.CPUArchitecture).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.CPUArchitecture)
|
||||
|
||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||
@ -707,7 +699,7 @@ local function createOSWidgets()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.RAMControl).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.RAMControl).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.RAMControl)
|
||||
|
||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||
@ -744,7 +736,7 @@ local function createOSWidgets()
|
||||
update()
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.screenResolution).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.screenResolution).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.screenResolution)
|
||||
|
||||
local widthTextBox = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, tostring(MineOSCore.properties.resolution and MineOSCore.properties.resolution[1] or 160), "Width", true))
|
||||
@ -771,9 +763,9 @@ local function createOSWidgets()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
settingsContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(MineOSCore.localization.systemLanguage).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.systemLanguage).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.systemLanguage)
|
||||
|
||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||
@ -798,7 +790,7 @@ local function createOSWidgets()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.wallpaper).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.wallpaper).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.wallpaper)
|
||||
|
||||
local filesystemChooser = container.layout:addChild(GUI.filesystemChooser(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696, MineOSCore.properties.wallpaper, MineOSCore.localization.open, MineOSCore.localization.cancel, MineOSCore.localization.wallpaperPath, "/"))
|
||||
@ -847,7 +839,7 @@ local function createOSWidgets()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.screensaver).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.screensaver).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.screensaver)
|
||||
|
||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||
@ -877,7 +869,7 @@ local function createOSWidgets()
|
||||
MineOSInterface.mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.colorScheme).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.colorScheme).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.colorScheme)
|
||||
|
||||
local backgroundColorSelector = container.layout:addChild(GUI.colorSelector(1, 1, 36, 3, MineOSCore.properties.backgroundColor, MineOSCore.localization.backgroundColor))
|
||||
@ -917,7 +909,7 @@ local function createOSWidgets()
|
||||
end
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.iconProperties).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.iconProperties).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.iconProperties)
|
||||
|
||||
local showExtensionSwitch = container.layout:addChild(GUI.switchAndLabel(1, 1, 36, 8, 0x66DB80, 0x2D2D2D, 0xE1E1E1, 0x878787, MineOSCore.localization.showExtension .. ":", MineOSCore.properties.showExtension)).switch
|
||||
@ -959,7 +951,7 @@ local function createOSWidgets()
|
||||
showHiddenFilesSwitch.onStateChanged, showApplicationIconsSwitch.onStateChanged = showExtensionSwitch.onStateChanged, showExtensionSwitch.onStateChanged
|
||||
end
|
||||
|
||||
menu:addItem(MineOSCore.localization.dateAndTime).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.dateAndTime).onTouch = function()
|
||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.timezone)
|
||||
|
||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||
@ -990,15 +982,12 @@ local function createOSWidgets()
|
||||
MineOSInterface.mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
menu:addSeparator()
|
||||
settingsContextMenu:addSeparator()
|
||||
|
||||
menu:addItem(MineOSCore.localization.setProtectionMethod).onTouch = function()
|
||||
settingsContextMenu:addItem(MineOSCore.localization.setProtectionMethod).onTouch = function()
|
||||
setProtectionMethod()
|
||||
end
|
||||
|
||||
MineOSInterface.mainContainer:drawOnScreen()
|
||||
end
|
||||
|
||||
MineOSInterface.mainContainer.menuLayout = MineOSInterface.mainContainer:addChild(GUI.layout(1, 1, 1, 1, 1, 1))
|
||||
MineOSInterface.mainContainer.menuLayout:setDirection(1, 1, GUI.DIRECTION_HORIZONTAL)
|
||||
MineOSInterface.mainContainer.menuLayout:setAlignment(1, 1, GUI.ALIGNMENT_HORIZONTAL_RIGHT, GUI.ALIGNMENT_VERTICAL_TOP)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user