Motor Sınıfı
PluginMenu
*Bu içerik, yapay zekâ (beta) kullanılarak çevrildi ve hatalar içerebilir. Sayfayı İngilizce görüntülemek için buraya tıkla.
Özet
Yöntemler
AddNewAction(actionId: string,text: string,icon: string):Instance |
AddSeparator():() |
Clear():() |
Kod Örnekleri
Bir PluginMenu ve PluginMenuAction Oluşturma
-- Bu kod Komut Çubuğu'na yapıştırılabilir, ancak yalnızca bir kez
local pluginMenu = plugin:CreatePluginMenu(math.random(), "Test Menüsü")
pluginMenu.Name = "Test Menüsü"
pluginMenu:AddNewAction("EylemA", "A", "rbxasset://textures/loading/robloxTiltRed.png")
pluginMenu:AddNewAction("EylemB", "B", "rbxasset://textures/loading/robloxTilt.png")
local subMenu = plugin:CreatePluginMenu(math.random(), "C", "rbxasset://textures/explosion.png")
subMenu.Name = "Alt Menü"
subMenu:AddNewAction("EylemD", "D", "rbxasset://textures/whiteCircle.png")
subMenu:AddNewAction("EylemE", "E", "rbxasset://textures/icon_ROBUX.png")
pluginMenu:AddMenu(subMenu)
pluginMenu:AddSeparator()
pluginMenu:AddNewAction("EylemF", "F", "rbxasset://textures/sparkle.png")
local toggle = Instance.new("BoolValue")
toggle.Name = "TogglePluginMenu"
toggle.Parent = workspace
local function onToggled()
if toggle.Value then
toggle.Value = false
local selectedAction = pluginMenu:ShowAsync()
if selectedAction then
print("Seçilen Eylem:", selectedAction.Text, " ile ActionId:", selectedAction.ActionId)
else
print("Kullanıcı bir eylem seçmedi!")
end
end
end
toggle.Changed:Connect(onToggled)API Referansı
Özellikler
Yöntemler
AddNewAction
AddSeparator
PluginMenu:AddSeparator():()
Dönüşler
()
Clear
PluginMenu:Clear():()
Dönüşler
()