Lua 関数の PopupInput は、変数リストから項目を選択できるポップアップ入力をUIに作成します。
PopupInput({title:str,caller:handle,items:table:{{'str'|'int'|'lua'|'handle', name, type-dependent}...},selectedValue:str,x:int,y:int,target:handle,render_options:{left_icon,number,right_icon},useTopLeft:bool,properties:{prop:value}}): string:value
例
ポップアップ入力を開き、選択された結果を Command Line History に出力するには、以下のようなコードでプラグインを作成します。
local function main(displayHandle)
local descTable = {
title = "Demo",
caller = displayHandle,
items = {"Select","Some","Value","Please"},
selectedValue = "Some",
add_args = {FilterSupport="Yes"},
}
local a,b = PopupInput(descTable)
Printf("a = %s",tostring(a))
Printf("b = %s",tostring(b))
end
return main