Try calling YourIcon:autoDeselect(false)
on both of your buttons. For some reason, by default, if another button is selected, clicking another will deselect all other buttons. This will turn that feature off.
Did seem to fix my issue, thank you!
Ben cooking so hard that gordon ramsay is jealous of him
I’m having a problem with the menu where it’s not properly positioned, and they open both at the same time.
Auto Deselect doesn’t seem to be working. Additionally, it would be nice if you add the smooth dropdowns again.
if you have a button that can be selected and deselected if you have it unselected and click a diffrent button (i think its only 1 click buttons) it also selects the buttons that can be selected and deselected
(tested this in your playground too)
possible that this will be fixed?
(i added a audio so its more clear to show that its an issue)
You just have to disable autoDeselect for the mute icon:
icon:autoDeselect(false)
thanks it worked
im not sure why this was not used within the playground because it looks like a bug when its on by default
For some reason, all the icons are getting duplicated. Here’s my code:
local module = require(game.ReplicatedStorage.Modules.Icon)
local function createButtons()
local SettingsIcon = module.new()
SettingsIcon:setLabel("")
SettingsIcon:setLabel("Settings", "Viewing")
SettingsIcon:setImage(11293977610, "Deselected")
SettingsIcon:setImage(18724105193, "Selected")
SettingsIcon:setCaption("Open Settings")
local ProfileIcon = module.new()
ProfileIcon:setLabel("")
ProfileIcon:setLabel("Profile", "Viewing")
ProfileIcon:setImage(11295273292, "Deselected")
ProfileIcon:setImage(18725137702, "Selected")
ProfileIcon:setCaption("Open Profile")
end
createButtons()
I have just figured it out!! for everyone that has this issue, put the local script (responsible for creating the icons) inside replicated storage or inside the workspace. for some reason it doesn’t work in the starterGUI or starterPlayerGui
I have just run into an issue where when I add an incon into existing menu using “:joinMenu()” the size of the menu does not change, resulting in user having to scroll for the other icons. That wouldn’t be an issue if there wasn’t space for the menu to resize but there is.
The scrollbar itself is also visible (upon opening) even when the content is fully visible.
I haven’t tested this on the new UI.
Edit: found another issue with captions which are aligned to the top and not bottom of the “Icons container” (may I call it like this?).
(Works fine on new UI.)
You can do it with :setOrder(number)
its a great module and all but anyone knows how to get rid of this?
this part literally breaks if i dont disable Better Chat which is obviously something I dont want to do
Mostly because better chat already haves a top bar module, any ideas?
If anyone needs a invite friends script, here!
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local SocialService = game:GetService("SocialService")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local inviteOptions = Instance.new("ExperienceInviteOptions")
inviteOptions.InviteMessageId = "YOURNOTIFICATIONSTRINGHERE"
local function canSendGameInvite(sendingPlayer)
local success, canSend = pcall(function()
return SocialService:CanSendGameInviteAsync(sendingPlayer)
end)
return success and canSend
end
local Invite = Icon.new()
:setImage(16485180075)
:setLabel("Invite")
:oneClick()
:bindEvent("selected", function()
local canInvite = canSendGameInvite(player)
if canInvite then
SocialService:PromptGameInvite(player)
script.Click:Play()
end
end)
You could use :setOrder()
or just create the menu before the music
For some reason I can’t seem to get my dropdown to work. As soon as I add :setIcon() to any of the menu items, it stops working. Same thing if I try to assign a function to it when clicked.
Here is the current script which works but the dropdown buttons don’t have icons or functions:
Icon.new()
:setLabel(“Menu”)
:modifyTheme({“Dropdown”, “MaxIcons”, 2})
:modifyChildTheme({“Widget”, “MinimumWidth”, 100})
:setDropdown({
Icon.new()
:setLabel(“Settings”)
,
Icon.new()
:setLabel(“Gifts”)
,
})
As soon as I add :setIcon() after any of the :setLabel() it just breaks and creates a completely seperate icon.
Can you fix the wally release? When running wally-package-types --sourcemap sourcemap.json Packages/
it errors error: Could not convert require expression to file path: No .lua/.luau file found for linked node
.
I just wanted to say that I love this and have used it not just for menus, but static displays too. Works very nice as a clean interface on mobile:
How can I make a developer product purchase print to my dropdown buttons?