TopbarPlus v2 | Construct intuitive topbar icons

TopbarPlus

:floppy_disk: Source Code | :open_book: Documentation | :ocean: Playground

Construct dynamic and intuitive topbar icons. Enhance the appearance and behaviour of these icons with features such as themes, dropdowns and menus.

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

Icon.new()
    :setImage(6326373239)
    :setLabel("Nanoblox")

:rocket: Features


:sparkles: What’s new


:clapper: Get Started


:package: Installation


:bulb: API


Additional

  • We highly recommend users of v1 transition to v2 for its many new features, enhancements, fixes, optimisations and greater ease of use.

  • Big thanks to these people for their resources and contributions:

  • TopbarPlus is completely free and open source. It operates under an MIT License; you only have to provide credit and link back to this thread to use and modify.

  • v2 alone has taken many months to develop so any feedback is greatly appreciated!

359 Likes

Amazing to see a second version to this! Definitely going to try this out!

11 Likes

The new horizontal menus look fantastic! Thank you for keeping this fantastic resource fresh!

5 Likes

I absolutely loved the first version of TopbarPlus and have used it on numerous projects. This second iteration of it seems even more fantastic, can’t wait to use it on my future projects! Keep up the good work.

8 Likes

This is amazing! Such a huge improvement…

4 Likes

Amazing! It’s Looks Very Good! I’m Gonna Try This Out! :wink:

1 Like

Woah, good job on this! I hope this is seen as much as your other projects. I’m going to very much use this in my own projects.

1 Like

I LOVE the look of the bars. It really does make it seem like it’s a part of Roblox, which will help make the UI cleaner! I remember when this first was created and man, you’ve added so many things! Nice work!!

3 Likes

Woah! I will use it in my games!

Thank you very much for sharing this.
I would like to make a feature request, if I may.

The ability to Parent buttons and menus to other frames than just the TopBar.
Something like icon:setParent(someFrameOutsideTopbar)

This would make it possible to easily make other GUI like tabs and other kinds of menus outside of just the TopBar.

I’m thinking of things like perhaps an inventory with tabs to sort the items. You would open the inventory with the button on the TopBar but you would also create the tabs that filter the inventory. All in the same system.

1 Like

This is certainly a consideration (and potentially a new project in itself) although for TopbarPlus we’ll likely remain within it’s original intention to provide game developers with easy-to-add and easy-to-customise topbar icons and software developers and runtime applications (like admin commands) with the ability to seamlessly integrate their own icons into others games.

2 Likes

Hey, I have a dropdown menu in-game and am trying to figure out how to add functions to the individual icons. I wanted to achieve allowing a player to morph themselves when they press an option using HD admin. Could you break it down for me?

You can achieve this with setDropdown combined with bindEvent demonstrated here:

https://1foreverhd.github.io/TopbarPlus/features/#dropdowns

If you’re attempting to morph someone via HD Admin I’d recommend waiting until Nanoblox is released which has a greatly more reliable API. For the time being you could morph people using HumanoidDescriptions

3 Likes

For HD Admin users: it’s now compatible with both v1 and v2 so you’ll no longer experience any issues if you previously attempted to use v2 in your game alongside it

1 Like

Is there a way to make it work with ResetOnSpawn?

1 Like

Sure can, simply utilise the new IconController.clearIconOnSpawn(icon) in v2.2.0 (or just re-add the topbarplus model).

e.g. after you’ve constructed all your icons do:

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

I think I have explained myself wrong, what I want is that when the player reappears the Guis that are with the ResetOnSpawn option activated implemented in the topbarplus, the guis will appear again and that they can be opened from the top bar, as before this version when I put ResetOnSpawn the GUI became unusable.

What I mean by this is: When the player appears, the usable ResetOnSpawn guis reappear, not that it is deleted.

—If you have done what I wanted to tell you then it is a mistake for being a new option or I did something wrong—

This is what the ResetOnSpawn property is for. If you set it to true then your UI objects will be destroyed no matter what.

Assuming your topbaricons are constructed in a location that does persist (such as starterplayerscripts) and you want to bind them to GUIs that reset on spawn, then you could achieve this by listening for game.Players.PlayerAdded in the script that persists, then using icon:bindToggleItem and icon:unbindToggleItem when the desired GUIs are removed/added back in.

The above method is just over complicating things though - you’d honestly be better off fixing whatever problems you have with ResetOnSpawn and setting this property to false.

Well, thanks for your time, I’ll try to see if I can find a way to do what I have in mind.

By the way, I love this project that you are doing, I look forward to many more improvements and other amazing projects from you.:+1::star_struck:

1 Like

I keep running into this problem when creating a second topbar button: image

No matter what the :setOrder is, they always stack ontop of eachother, my code is:


    local playerGui = player.PlayerGui

    local replicatedStorage = game:GetService("ReplicatedStorage")

    local iconModule = replicatedStorage.Icon

    local Icon = require(iconModule)

    local IconController = require(iconModule.IconController)

    local Themes = require(iconModule.Themes)

    local gui = playerGui:WaitForChild("gameUI")

    local lplayer = game.Players.LocalPlayer

    -- Apply BlueGradient Theme

    IconController.setGameTheme(Themes.BlueGradient)

    if lplayer.UserId == 817819194 then

    local panel = Icon.new()

    :setImage(6384095729, "deselected")

    :setImageYScale(0.7, "deselected")

    :setImage(6384109922, "selected")

    :setLabel("Close Panel", "selected")

    :bindToggleItem(gui.Panel)

    panel:setCaption("StudioOS Panel")

    :setOrder(1)

    panel:notify()

    panel:bindToggleKey(Enum.KeyCode.V)

    else

    print("Player not whitelisted.")

    gui.Panel:Destroy()

    end

    local suggest = Icon.new()

    :setImage(6384752804, "deselected")

    :setImageYScale(0.7, "deselected")

    :setImage(6384109922, "selected")

    :setLabel("Close", "selected")

    :bindToggleItem(gui.Suggest)

    suggest:setCaption("Suggest")

    suggest:bindToggleKey(Enum.KeyCode.C)

    :setOrder(2)