Avatar Context Menu Improvements

Hello Developers,

When we released the Avatar Context Menu (ACM), we received a lot of feedback from the development community, including members of the dev forum, incubators and accelerators. We compiled a list and addressed every major issue and request we were aware of. New features include being able to easily customize the ACM to fit the theme of your game, and a new API to allow you to open and close the Avatar Context Menu directly through game logic. The full list includes the following changes:

  • New API to allow developers to customize the UI of the ACM
  • New API to enable developers to open/close the ACM
  • Developer custom menu options are now placed at the top of the list
  • The menu now closes after clicking custom menu items
  • Made whisper button more reliable, button disabled when you can’t chat with the player
  • ACM works properly while clicking on player in the dynamic thumbstick area
  • Made the Add Friend and Whisper buttons respect Blocked Status
  • Made the ACM work with Tap to Move correctly
  • Fixed bugs with using the ACM in first person
  • Minor UI improvements and polish

If you are interested in trying out the latest version of ACM, additional documentation is available on the Developer Hub:

Open/Close API

We have added a new SetCore/GetCore API to allow you to open and close the AvatarContextMenu. This API also allows you to check if the AvatarContextMenu is open. This can be used to make sure the Avatar Context Menu is only available in your game when it doesn’t conflict with other UI or gameplay. For example you may want to only have the ACM available in the lobby of your game and close it when users enter the round. This API could also be used to implement an alternative method of access to the ACM in your game.

void StarterGui:SetCore(“AvatarContextMenuTarget”, Player)

Opens the Avatar Context Menu with the given Player selected. If no player is given it will hide the avatar context menu if visible.

Player StarterGui:GetCore(“AvatarContextMenuTarget”)

Returns the selected player in the avatar context menu if it is open. Otherwise it returns nil.

Example:

local selectedPlayer = StarterGui:GetCore("AvatarContextMenuTarget")
StarterGui:SetCore("AvatarContextMenuTarget", nil) -- Close ACM
ImportantPromptModule:DoImportantPrompt()
wait(10)
StarterGui:SetCore("AvatarContextMenuTarget", selectedPlayer) --Reopen the ACM

Customizing the Avatar Context Menu

This new API allows you to customize the look and feel of the ACM to better fit the style of your game. There are 30 different options to allow you to customize the menu to your heart’s content!

Example:

local StarterGui = game:GetService("StarterGui")
 
StarterGui:SetCore("AvatarContextMenuTheme", { 
	BackgroundImage = "", 
	BackgroundTransparency = 0.5, 
	BackgroundColor = Color3.fromRGB(111, 145, 242),
	NameTagColor = Color3.fromRGB(0, 0, 200),
	NameUnderlineColor = Color3.fromRGB(213, 233, 255),
	ButtonFrameColor = Color3.fromRGB(15, 24, 65), 
	ButtonFrameTransparency = 0.2, 
	ButtonUnderlineColor = Color3.fromRGB(213, 233, 255), 
	Font = Enum.Font.SciFi
})
64 Likes

Nice! I’m glad to see feedback taken!

I’m curious. Why is this part of the CoreGUI and not a player script? Customizing this seems harder than it should be.

Edit: Whoops. Sorry for necroing this thread.

5 Likes

I just moved this to the public forum so don’t worry about bumping it, sorry! Making this a PlayerScript would mean we would need prompts to confirm users actions which would add a little bit of friction. We may also want to add functionality to the ACM that isn’t possible outside the CoreGui in the future.

4 Likes

Funny thing is, this post talks about improving the avatar context menu.

Was there ever one in the first place? Is it a console thing? Swear I’ve never seen it or heard anything about it. These sneaky sneaky features lol. I wonder what other golden gems are hiding in the midst of the API. I know I saw TimerService and ParabolaAdornment that developers can’t use.

4 Likes

Am I missing something? When trying to enable the ACM I’m getting this error:

local StarterGui = game:GetService("StarterGui")
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

if LocalPlayer:IsInGroup(000000) then
	StarterGui:SetCore("AvatarContextMenuEnabled", true) 
end
1 Like

I forgot to turn on this new API to enable the ACM. I will get this enabled as soon as possible.

For now please use StarterGui:SetCore("SetAvatarContextMenuEnabled", true)

4 Likes

This is great for lobbies and social games. No longer have to make a menu that prompts for everything anymore. The customization makes it better able to fit more games.

Thank you guys for listening to the community! Not many companies do that. Also glad to see these updates get better and better!!

1 Like

Just a heads up - the IX team will have SetCore and related articles on the devhub updated ASAP. For now, use this thread as a reference!

3 Likes

Thanks for taking in developer feedback before starting the push to get us to use it. These improvements will provide so much more value now, excited to add it to our game!

1 Like

I think both ‘Follow’ and ‘Block’ should be default actions in the future.

We are looking at the ACM and the in-game player list, what the default actions should be and how this should be presented. I think this is a reasonable request. Lots more cool stuff to come…

4 Likes

A post was merged into an existing topic: Inappropriate posts

When enabling the Avatar Context Menu, it binds the open menu action to the Gamepad button DPadUp. This sinks all DPadUp presses and attempts to open or close the menu. This is fine except when the player is utilizing the Gui Selection/Navigation system.

DPadUp will not be able to control navigation as long as Avatar Context Menu is enabled. If the player isn’t near another player, nothing will happen. If they are, the menu will appear (possibly on top of what they are navigating). LeftThumbstick still works for navigation, but the user may not know this, and (especially if they are not near another player) may become confused or frustrated with the Gui interface they are attempting to navigate.

A simple fix would be to add the following code to gamepadOpenMenu:

if GuiService.SelectedObject ~= nil then
	return Enum.ContextActionResult.Pass
end
2 Likes

A fix is on the way. Thanks for reporting.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.