[v3!] TopbarPlus v3.0.0 | Construct intuitive topbar icons; customise them with themes, dropdowns, captions, labels and much more

These settings here should help:

For example, to extend the dropdown down you can do:

icon:set("dropdownMaxIconsBeforeScroll", 5)
3 Likes

Doens’t seem to work at all for some reason:
err
Code:

local Icon = require(game:GetService("ReplicatedStorage").Icon)
local skip1 = Icon.new()
:setImage(id here)
:setTip("Use this if you're stuck on a level")
:setLabel("Skip 1 Level")
:bindToggleItem(function() print("click") end)

local skip5 = Icon.new()
:setImage(id here)
:setTip("Use this if you want to speed through the game") 
:setLabel("Skip 5 Levels")
:bindToggleItem(function() print("click") end)

image
^ error 2 times

1 Like

:bindToggleItem is for UIObjects.
What you want to use instead is .Selected and .Deselected

skip5.Selected:Connect(function()
 print("selected")
end)

skip5.Deselected:Connect(function()
 print("deselected")
end)
1 Like

Expanding on what @Haydz6 said, you can find the documentation for bindToggleItem here:

You’ve got the right events amigo, just make sure they’re in camelCase instead of PascalCase.

@CassioTDS You can alternatively use bindEvent if you wish to continue the chain. e.g.:

local Icon = require(game:GetService("ReplicatedStorage").Icon)

local skip1 = Icon.new()
	:setImage(id here)
	:setTip("Use this if you're stuck on a level")
	:setLabel("Skip 1 Level")
	:bindEvent("toggled", function(icon, isSelected)
		print("click")
	end)

local skip5 = Icon.new()
	:setImage(id here)
	:setTip("Use this if you want to speed through the game") 
	:setLabel("Skip 5 Levels")
	:bindEvent("toggled", function(icon, isSelected)
		print("click")
	end)
2 Likes

Very useful!
But how would I make a working UTC clock as an icon?

even with that code, I get the following problem:
err2

Simply utilise the os library and then set the icons text using setLabel. e.g.:

icon:setLabel("17:56")
2 Likes

Can you share error details, code, etc, or even better a link to an uncopylocked place.

2 Likes

@ForeverHD do you think it’s amazing how many developers are making so many amazing games with TopbarPlus,

and think it won’t be possible without you.
so i just wanna say thank you so much.

i think this is my favorite thing made with TopbarPlus
https://www.roblox.com/library/9227995784/Custom-Bar-Gui

:slight_smile:

2 Likes

How do you make it so it doesn’t duplicate the icons when you respawn?

How do you get rid of the “ControllerMode” button?

Do you have a way we can bind chat commands to it like is someone says ‘!notepad’ it would trigger the button to be pressed / ui to apear and button to light up or what ever normally happens.

Your icons are duplicating because your LocalScript which creates these icons is resetting every time your LocalPlayer respawns.

You can solve this three different ways:

  1. Place the LocalScript which construct the icons within a GUI with ResetOnSpawn set to false.

  2. or Place the LocalScripts within StaterPlayerScripts.

  3. or Put the following code at the very bottom of your LocalScript:

local icons = IconController.getIcons()
for _, icon in pairs(icons) do
	IconController.clearIconOnSpawn(icon)
end
3 Likes

This currently can’t be modified, although I’ve opened up a ticket for exactly that here:

For the time being you can disable it by changing controllerOptionIcon:setEnabled(true) to controllerOptionIcon:setEnabled(false) around line 1054 of the IconController.

2 Likes

We don’t provide direct support for this so you could either use the new TextChatService or listen to Player.Chatted and parse the result to achieve this, then calling icon:select().

2 Likes

Not sure if this has been reported yet, but having more than 99 notifications makes the text leave the circle. It’s a very little bug, but still one nonetheless. The only solutions I have are:

  • Making the text scale smaller to fit the number (would look sloppy)
  • Making the circle scale bigger the fit the number (tried this, might cover a neighboring button)

image

Hi, Just curious on how would I delete using the :destroy() what are parameters?
@ForeverHD

Thanks I can look into this :+1:

Hi, there are no parameters, calling icon:destroy() is all you have to do for everything within the icon to be cleaned-up.

1 Like

Hey, how do I make it when I select one of the icons. It deselects.

1 Like