mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-09-14 11:06:16 +05:00
.firstParent field instead of :getFirstParent() and GUI.menu with nested menus fix
This commit is contained in:
parent
218b6a0515
commit
5f0567b77e
@ -253,7 +253,7 @@ local function updateModelFromWidgets()
|
||||
|
||||
local shapeIndex = getCurrentShapeIndex()
|
||||
if shapeIndex then
|
||||
model.shapes[shapeIndex].texture = #textureInput.text > 0 and textureInput.text or "empty"
|
||||
model.shapes[shapeIndex].texture = #textureInput.text > 0 and textureInput.text or nil
|
||||
model.shapes[shapeIndex].tint = tintSwitch.state and tintColorSelector.color or nil
|
||||
end
|
||||
end
|
||||
@ -532,7 +532,7 @@ printButton.onTouch = function()
|
||||
|
||||
for i = 1, #model.shapes do
|
||||
local shape = model.shapes[i]
|
||||
proxies.printer3d.addShape(shape[1], shape[2], shape[3], shape[4], shape[5], shape[6], shape.texture, shape.state, shape.tint)
|
||||
proxies.printer3d.addShape(shape[1], shape[2], shape[3], shape[4], shape[5], shape[6], shape.texture or "empty", shape.state, shape.tint)
|
||||
end
|
||||
|
||||
local success, reason = proxies.printer3d.commit(count)
|
||||
|
||||
@ -55,7 +55,7 @@ for j = 1, buttonCount do
|
||||
buttons[j][i] = buttonsContainer:addChild(GUI.button(x, y, buttonWidth, buttonHeight, 0x2D2D2D, 0xB4B4B4, 0x696969, 0xD2D2D2, " "))
|
||||
buttons[j][i].onTouch = function()
|
||||
set(i, j)
|
||||
buttons[j][i]:getFirstParent():drawOnScreen()
|
||||
buttons[j][i].firstParent:drawOnScreen()
|
||||
end
|
||||
|
||||
x = x + buttonWidth + stepX
|
||||
|
||||
@ -361,13 +361,13 @@ end
|
||||
function MineOSInterface.iconLaunchers.showPackageContent(icon)
|
||||
icon.parent.parent:setWorkpath(icon.path)
|
||||
icon.parent.parent:updateFileList()
|
||||
icon:getFirstParent():drawOnScreen()
|
||||
icon.firstParent:drawOnScreen()
|
||||
end
|
||||
|
||||
function MineOSInterface.iconLaunchers.showContainingFolder(icon)
|
||||
icon.parent.parent:setWorkpath(fs.path(icon.shortcutPath))
|
||||
icon.parent.parent:updateFileList()
|
||||
icon:getFirstParent():drawOnScreen()
|
||||
icon.firstParent:drawOnScreen()
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Loading…
Reference in New Issue
Block a user