ps ui
2.0.1
對於所有支援問題,請在我們的 Discord 支援聊天中提問。如果您需要協助,請勿在 GitHub 上建立問題。問題僅針對錯誤回報和新功能。
透過成功或失敗的回調開始數位迷宮遊戲。
exports [ ' ps-ui ' ]: Maze ( function ( success )
if success then
print ( " success " )
else
print ( " fail " )
end
end , timeLimit ) -- Hack Time Limit in seconds
顯示包含文字、類型和持續時間的通知。
exports [ ' ps-ui ' ]: Notify ( ' Your message ' , ' notification-type ' , duration )
透過成功或失敗的回調開始 Circle 遊戲。
exports [ ' ps-ui ' ]: Circle ( function ( success )
if success then
print ( " success " )
else
print ( " fail " )
end
end , numCircles , time ) -- Number of Circles, Time in milliseconds
透過成功或失敗的回調開始 Scrambler 遊戲。
exports [ ' ps-ui ' ]: Scrambler ( function ( success )
if success then
print ( " success " )
else
print ( " fail " )
end
end , type , time , mirrored ) -- Type options: alphabet, numeric, alphanumeric, greek, braille, runes; Time in seconds; Mirrored options: 0, 1, 2
透過成功或失敗的回調開始 VAR Hack 遊戲。
exports [ ' ps-ui ' ]: VarHack ( function ( success )
if success then
print ( " success " )
else
print ( " fail " )
end
end , numBlocks , time ) -- Number of Blocks, Time in seconds
透過成功或失敗的回調開始鋁熱劑遊戲。
exports [ ' ps-ui ' ]: Thermite ( function ( success )
if success then
print ( " success " )
else
print ( " fail " )
end
end , time , gridSize , incorrectBlocks ) -- Time in seconds, Grid Size (5-10), Incorrect Blocks
建立帶有子選單和事件的選單。
exports [ ' ps-ui ' ]: CreateMenu ({
{
id = " examplemenu " , -- has to be unique
header = " Menu Header " ,
text = " Menu Text " ,
icon = " icon-class " ,
color = " color " ,
event = " event-name " ,
args = { arg1 , arg2 },
server = false ,
subMenu = {
{
id = " examplesubmenu " , -- has to be unique
header = ' Submenu Header ' ,
icon = ' icon-class ' ,
color = ' color ' ,
event = " event-name " ,
args = { arg1 , arg2 },
},
},
},
})
隱藏目前顯示的選單
exports [ ' ps-ui ' ]: HideMenu ()
exports [ ' ps-ui ' ]: StatusShow ( " Title " , " Description " , " icon " ,
{
{ key = " Key1 " , value = " Value1 " },
{ key = " Key2 " , value = " Value2 " },
{ key = " Key3 " , value = " Value3 " }
})
以指定顏色顯示文字
exports [ ' ps-ui ' ]: DisplayText ( " Your text " , " color " )
隱藏目前顯示的文字
exports [ ' ps-ui ' ]: HideText ()
顯示輸入表單並列印輸入值。
local input = exports [ ' ps-ui ' ]: Input ({
{
id = ' 1 ' ,
label = ' Label ' ,
type = " input-type " ,
icon = " icon-class "
},
-- Add more inputs as needed
})
for k , v in pairs ( input ) do
print ( k , v . id , v . value )
end
顯示來自 URL 的圖像。
exports [ ' ps-ui ' ]: ShowImage ( " imageURL " )