So essentially, when you have a key binded to a button thats inside a menu the button will do its function, but the menu will not open to show said button, even though when you open the menu the button is selected.
Is it possible to select multiple items at the same time? For example, on the Playground, there’s a ‘mute ambience’ button. I would’ve expected that to have stayed selected if I pressed other objects such as ‘shop.’
First of all, I found two “bugs” at once … at least I think. It is cool your Icons supports Rich text, but the function you are getting text size takes the whole text. As a result, when you try to set icon label to this string <b><font color=\"#04afec\">DPM Accounts</font></b>, the result is very very long icon: . The second thing is the aligment - when the button is longer than the last icon’s end (that holds the hidden icons cuz of small screen size), the icon is aligned by the end of the list of icons (for right alignent the most left icon’s end) and you cannot see the whole icon.
Then, I would like to suggest a few things. (Please edit me if the thing was suggested already, I gave up at 119)
I don’t think it would be big problem, but it can short the code a little bit more - multiple iconStates!
You can handle it by reading other arguments (second and third), or by reading a table.
Example:
Icon:setLabel("Account", "deselected", "hovering")
-- or
Icon:setLabel("Account", {"deselected", "hovering"})
Aaand I forgot the two more suggestions … so maybe next time =D
I think developer(s) is using TextService:GetTextSize() method, which probably does not handle this problem … idk now. I also think if developer(s) find it worth, he (they … sorry, I really don’t know now) would do it. I don’t know about any other auto scaling for objects, and if the function really does not support rich text, I will try to find or report the problem as bug in another article.
When I’m thinking about it, if I would test that myself this bug report does not must be there … I will try it next day
Edit: Did some fast research and found out this might be problem from Roblox, same as I already found an article about it.
And, if there is no mistake in what I’ve read, term “developers” should be right.
Is the ID Asset ID (aka Image ID) or Decal ID? Decals won’t work.
Also, you must define the icon befower setting image:
local Icon = require(game:GetService("ReplicatedStorage").Icon) -- in hope the module is located in ReplicatedStorage
local test = Icon.new() -- you don't need to define variable, you can use the code in example instead
test:setImage(6326373239)
-- or you can use
test:setLabel("Test")
:setImage(6326373239)
Hope it helped! Otherwise I don’t know where the issue can be.
First, the reply is dedicated for someone else.
Secondly, that one was saying his function is not working, so I tried to help him in the way I can (in hope Ben won’t need to responde).
I also know I can upload my own decals / images or even assets (like Models, etc.); only Audio and some clothing are limited by Bobuxs.
I don’t you to feel bad for your response, absolutely not, just don’t understand what you wanted to say with it, sorry.
I’ve already tried several ways to enable/disable a ScreenGui called “shopFrame”. The “Test me” button is visible but when I click on the know nothing happens.
I hope below script and image helps me solve the problem.
-- Within a LocalScript in StarterPlayerScripts and assuming TopbarPlus is placed in ReplicatedStorage
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local icon = Icon.new()
icon:setImage(6399193086)
icon:setLabel("Test me")
:bindEvent("deselected", function()
game.StarterGui.shopFrame.Enabled = false
end)
:bindEvent("selected", function()
game.StarterGui.shopFrame.Enabled = true
end)