Compare commits
No commits in common. "f6e61c839ca06104ab4a9a114139612f5ba94ee4" and "d16558853cb7e64be9e0006e56732a96d039729f" have entirely different histories.
f6e61c839c
...
d16558853c
@ -143,7 +143,7 @@ local function itemList(groups, wBudget, hBudget, savedState, onClick, setPage,
|
|||||||
|
|
||||||
for i=entryStart,entryEnd do
|
for i=entryStart,entryEnd do
|
||||||
local group = groups[i]
|
local group = groups[i]
|
||||||
local text = group:getSimpleName()
|
local text = group:getDisplayName()
|
||||||
local count = tostring(group:getItemCount())
|
local count = tostring(group:getItemCount())
|
||||||
|
|
||||||
-- Fit text inside of width budget
|
-- Fit text inside of width budget
|
||||||
@ -241,7 +241,7 @@ local PAGES = {
|
|||||||
state.height,
|
state.height,
|
||||||
state.pageState[state.currentPage],
|
state.pageState[state.currentPage],
|
||||||
function(element, x, y, source, group)
|
function(element, x, y, source, group)
|
||||||
print("Clicked: "..group:getSimpleName())
|
print("Clicked: "..group:getDisplayName())
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
function(page)
|
function(page)
|
||||||
@ -253,7 +253,7 @@ local PAGES = {
|
|||||||
state:itemTransaction(function()
|
state:itemTransaction(function()
|
||||||
for _,nodeStack in ipairs(state.node:find(function(s) return not s:isEmpty() end)) do
|
for _,nodeStack in ipairs(state.node:find(function(s) return not s:isEmpty() end)) do
|
||||||
if not state.controller:insertStack(nodeStack) then
|
if not state.controller:insertStack(nodeStack) then
|
||||||
print("Couldn't find a free slot for: "..nodeStack:getSimpleName())
|
print("Couldn't find a free slot for: "..(nodeStack:getDisplayName() or nodeStack:getName() or "[EMPTY]"))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@ -291,14 +291,16 @@ local CONTROLLER_STATE = {
|
|||||||
monitor = monitor,
|
monitor = monitor,
|
||||||
nextPage = "MAIN",
|
nextPage = "MAIN",
|
||||||
exit = false,
|
exit = false,
|
||||||
pageState = {}
|
pageState = {},
|
||||||
|
lock = lock,
|
||||||
|
unlock = unlock,
|
||||||
|
isLocked = isLocked
|
||||||
}
|
}
|
||||||
|
|
||||||
function CONTROLLER_STATE:itemTransaction(transact)
|
function CONTROLLER_STATE:itemTransaction(transact)
|
||||||
lock()
|
self.lock()
|
||||||
transact()
|
transact()
|
||||||
saveState(CACHE_FILE, self.controller)
|
self.unlock()
|
||||||
unlock()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
os.queueEvent("dummy_event")
|
os.queueEvent("dummy_event")
|
||||||
|
@ -33,14 +33,6 @@ function ItemGroup:getDisplayName()
|
|||||||
return self:_getIdentityStack():getDisplayName()
|
return self:_getIdentityStack():getDisplayName()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ItemGroup:getSimpleName()
|
|
||||||
return self:isEmpty() and "[EMPTY]" or self:_getIdentityStack():getSimpleName()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ItemGroup:isEmpty()
|
|
||||||
return self:_getIdentityStack():isEmpty()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ItemGroup:getName()
|
function ItemGroup:getName()
|
||||||
return self:_getIdentityStack():getName()
|
return self:_getIdentityStack():getName()
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user