Archived
added Repackable Items mod
This commit is contained in:
1 parent
ca19a3650c
commit
8d3be04061
18 files changed
+1276
No files matched your search
+32
@@ -0,0 +1,32 @@
|
||||
--[[
|
||||
Shown by RepackableItems_Live (client) when this client's box/carton
|
||||
definitions differ from the server's. The server's file has already been
|
||||
saved by then; it only loads when the client connects, so the player has
|
||||
to rejoin. Leaves the same way vanilla's disconnect screen
|
||||
does (ISServerDisconnectUI: getCore():exitToMenu()).
|
||||
]]
|
||||
|
||||
RepackableItems_RejoinPrompt = {}
|
||||
|
||||
local dialog = nil
|
||||
|
||||
local function onClick(_target, _button)
|
||||
dialog = nil
|
||||
getCore():exitToMenu()
|
||||
end
|
||||
|
||||
function RepackableItems_RejoinPrompt.show()
|
||||
if dialog then
|
||||
return
|
||||
end
|
||||
local width, height = 420, 150
|
||||
local x = (getCore():getScreenWidth() - width) / 2
|
||||
local y = (getCore():getScreenHeight() - height) / 2
|
||||
dialog = ISModalDialog:new(x, y, width, height,
|
||||
getText("IGUI_RepackableItems_RejoinRequired"), false, nil, onClick, 0)
|
||||
dialog:initialise()
|
||||
dialog:addToUIManager()
|
||||
dialog:setAlwaysOnTop(true)
|
||||
end
|
||||
|
||||
return RepackableItems_RejoinPrompt
|
||||
Reference in new issue
Block a user