Release Notes for 364


#1

Notes for Release 364


#2

Client Difference Log

API Changes

Added Class PluginMenu : Instance [NotCreatable] [NotReplicated]
	Added Property string PluginMenu.Icon [NotReplicated]
	Added Property string PluginMenu.Title [NotReplicated]
	Added Function void PluginMenu:AddAction(Instance action) {PluginSecurity}
	Added Function void PluginMenu:AddMenu(Instance menu) {PluginSecurity}
	Added Function Instance PluginMenu:AddNewAction(string actionId, string text, string icon = "") {PluginSecurity}
	Added Function void PluginMenu:AddSeparator() {PluginSecurity}
	Added Function void PluginMenu:Clear() {PluginSecurity}
	Added Function Instance PluginMenu:ShowAsync() {PluginSecurity} [Yields]

Added Class StopWatchReporter : Instance [NotCreatable] [Service] [NotReplicated]
	Added Function void StopWatchReporter:FinishTask(int taskId) {RobloxScriptSecurity}
	Added Function void StopWatchReporter:SendReport(string reportName) {RobloxScriptSecurity}
	Added Function int StopWatchReporter:StartTask(string reportName, string taskName) {RobloxScriptSecurity}

Added Property float KeyframeSequence.AuthoredHipHeight {PluginSecurity}
Added Property bool PluginAction.AllowBinding [ReadOnly]
Added Property int UserGameSettings.RCCProfilerRecordFrameRate
Added Property int UserGameSettings.RCCProfilerRecordTimeFrame

Added Function void LocalizationService:PromptDownloadGameTableToCSV(Instance table) {RobloxScriptSecurity} [Yields]
Added Function Instance LocalizationService:PromptUploadCSVToGameTable() {RobloxScriptSecurity} [Yields]
Added Function Instance Plugin:CreatePluginMenu(string id, string title = "", string icon = "") {PluginSecurity}
Added Function void StudioService:CopyToClipboard(string stringToCopy) {RobloxScriptSecurity}
Added Function void StudioService:OpenPluginInsertPage(int64 assetId) {RobloxScriptSecurity}
Added Function void StudioService:SetUniverseDisplayName(string newName) {RobloxScriptSecurity}
Added Function void ClientReplicator:RequestRCCProfilerData(int frameRate, int timeFrame) {RobloxScriptSecurity}

Added Event ClientReplicator.RCCProfilerDataComplete(bool success, string message) {RobloxScriptSecurity}

Added EnumItem Font.Gotham : 17 [Deprecated]
Added EnumItem Font.GothamSemibold : 18 [Deprecated]
Added EnumItem Font.GothamBold : 19 [Deprecated]
Added EnumItem Font.GothamBlack : 20 [Deprecated]

Changed the parameters of Function Plugin:CreatePluginAction 
	from: (string actionId, string text, string statusTip, string iconName = "")
	  to: (string actionId, string text, string statusTip, string iconName = "", bool allowBinding = true)

#3

If this is a thing for context menus I’ll be so happy


#4

It is, and its available for developers to use right now!
Heres an extremely-hacky sample that I made to demonstrate how it works:

-- This code can be pasted into the command bar, but only once.

local plugin = plugin or getfenv().PluginManager():CreatePlugin()
plugin.Name = "Plugin"
plugin.Parent = workspace

local pluginMenu = plugin:CreatePluginMenu(math.random(), "Test Menu")
pluginMenu.Name = "Test Menu"

pluginMenu:AddNewAction("ActionA", "A", "rbxasset://textures/loading/robloxTiltRed.png")
pluginMenu:AddNewAction("ActionB", "B", "rbxasset://textures/loading/robloxTilt.png")

local subMenu = plugin:CreatePluginMenu(math.random(), "C", "rbxasset://textures/explosion.png")
subMenu.Name = "Sub Menu"

subMenu:AddNewAction("ActionD", "D", "rbxasset://textures/whiteCircle.png")
subMenu:AddNewAction("ActionE", "E", "rbxasset://textures/icon_ROBUX.png")

pluginMenu:AddMenu(subMenu)
pluginMenu:AddSeparator()

pluginMenu:AddNewAction("ActionF", "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("Selected Action:", selectedAction.Text, "with ActionId:", selectedAction.ActionId)
		else
			print("User did not select an action!")
		end
	end
end

toggle.Changed:Connect(onToggled)

It is also available in Roblox’s new Toolbox. You can right click on an item in the toolbox to view it in a web browser, or copy its AssetId.

image


No documentation for plugin:CreatePluginMenu and return types listed incorrectly
#5

Really happy with this update.

Also, my reaction to these font additions,


#6

I can make reactions to my own posts… right?

> Added Function void StudioService:CopyToClipboard(string stringToCopy) {RobloxScriptSecurity}

image

> {RobloxScriptSecurity}

image


PSA: You can copy a decal's AssetId directly from studio's toolbox now!
#7

I just don’t see why it’s RobloxScriptSecurity. They could make it a prompt like “This plugin would like to copy this string. Allow?”, and even the same for GetClipboard. They could make a prompt where it confirms the action.


#8

I’m sticking with SourceSans, heh. To me Gotham is feels squashed, like the retro font but less extreme. Still good to see them adding more fonts, though.


#9

My theory right now is that it was added without going through the standard API approval procedure, rather it was just something they needed to add quickly for one of their use cases (such as the right click menu’s “copy asset id” option in the toolbox). It may be opened up to PluginSecurity later down the road, as long as it’s verified to be safe for general purpose use.


#10

When I try to use the new PluginMenu instance inside of my plugin, after the plugins refresh when updating, the menu stops working. Any idea why? I know that the Toolbox is able to get past this problem.

I’m hoping you know the answer to this problem since you’ve looked into them before.


#11

Not sure, it could be a bug.

If you are creating the menu initially and reusing it, there may be some unexpected behavior there. Roblox’s Toolbox only creates the right-click menu when the right-click action happens, so maybe try creating the menu in a scope where its activated so it can be recycled without issues.

If that doesn’t work, try assigning unique ActionIds everytime you spawn a menu.