diff --git a/itemcontroller.lua b/itemcontroller.lua index 861198d..e9a268b 100644 --- a/itemcontroller.lua +++ b/itemcontroller.lua @@ -582,7 +582,7 @@ local PAGES = { -- Set dynamic states for elements - sortButton:setText("<"..tostring(state.sortMode)..">") + sortButton:setText("<"..tostring(pageState.sortMode)..">") storageSatProgress:setProgress(1 - (emptyCount / totalCount)) local basePageIndex = (pageState.currentPage - 1) * groupEntryListBudget @@ -669,7 +669,7 @@ local PAGES = { keyboardButton:setOnClick(function() print("Toggling keyboard...") - state.showKeyboard = not state.showKeyboard + pageState.showKeyboard = not pageState.showKeyboard reloadState() return true @@ -693,7 +693,7 @@ local PAGES = { sortButton:setOnClick(function() print("Reorganizing...") - state.sortMode = (state.sortMode + 1 + #SORT_MODE) % #SORT_MODE + pageState.sortMode = (pageState.sortMode + 1 + #SORT_MODE) % #SORT_MODE reloadState() return true end)