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

Is there a way to force toggle** it off?

image

I tried doing

icon:setEnabled(false)
icon:setEnabled(true)

to force it to stop being highlighted white, but it just disables and reenables while keeping the white highlight.

**toggle meaning make it stop being highlighted


Solved by @miguelrioja777, thank you.

1 Like

Try using:

icon:deselect()

If u want to lock u can use:

icon:lock()

And for unlock:

icon:unlock()
1 Like

You can achieve this now with the latest release:

Simply do…

IconController.mimicCoreGui = false

…followed by:

game:GetService("StarterGui"):SetCore("TopbarEnabled", false)

I recommend updating to the latest version as it also accounts for Console (controller) and Mobile devices.

2 Likes

does this also support input fields for text or numbers?

Input fields as in a TextBox? Not currently. What’s your use case?

afbeelding
“enter stage”- the enter stage button lets you fill in a number and then you get teleported to that stage.

but alsow song id suggestions
renaming yourself
just small strings

I’ve opened up a feature ticket for this here:

1 Like


button on the right of the topbar is off screen (if the screen is to small

but damn


this looks soo good

That will be due to the default alignment which you can modify by doing the following:

local overflowRight = IconController.getIcon("_overflowIcon-right")
overflowRight:set("dropdownAlignment", "right")

Great to see you putting the icons to good use!

1 Like

Thanks so much for this enhancement!
It will be put to great use! :heart:

1 Like

Does this allow you to modify the default chat icon?

That was originally the goal with Icon.mimic(coreGuiName) (e.g. Icon.mimic("Chat")) although that’s unfortunately not possible anymore due to further restrictions within the core and chat main scripts.

1 Like

afbeelding

a mobile player just send me this image

is there a way to get n overflow button in the center?

1 Like

I’ve seen games like “Outlaster” do it though, and I’m fairly certain they use TopbarPlus v1 or v2 due to the fact that their core gui icons all have TopbarPlus styled captions, including the chat icon.

I think I’ve come pretty close to creating an icon that mimics the chat button, however it only works when selecting, not deselecting. Here’s what I have so far:

local chatIcon = Icon.new()
:setName("ChatIcon")
:setImage(6915959809)
:setCaption("Chat")
:bindEvent("selected", function(chatIcon)
	StarterGui:SetCore("ChatActive",true)
	print("true")
end)
:bindEvent("deselected", function(chatIcon)
	StarterGui:SetCore("ChatActive",false)
	print("false")
end)

When I do this, it works almost perfectly, except for the fact that it makes the default chat icon appear in the topbar every time the icon is selected, and it disappears when deselected:

local chatIcon = Icon.new()
:setName("ChatIcon")
:setImage(6915959809)
:setCaption("Chat")
:bindEvent("selected", function(chatIcon)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, true)
	StarterGui:SetCore("ChatActive",true)
	print("true")
end)
:bindEvent("deselected", function(chatIcon)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Chat, false)
	StarterGui:SetCore("ChatActive",false)
	print("false")
end)	

If anyone has any ideas, please let me know.

We’re only supporting overflows for left and right set icons for the time-being due to additional complexities involved with mid-set icons.

A solution for you instead: check the clients screen size with ViewportSize, then if their X size is below a certain value, create an icon and set a dropdown with all your other icons.

local screenSize = ...

local icon1 = Icon.new()
local icon2 = Icon.new()
local icon3 = Icon.new()

if screenSize.X < DESIRED_AMOUNT then
    local dropdownIcon = Icon.new()
    dropdownIcon:setDropdown({icon1, icon2, icon3})
end

Apologies, by ‘impossible’ I should have said ‘impossible to mimic the chat icon perfectly while preserving the default chat menus without forking and creating your own’.

You’re welcome to use the code we originally wrote for the Chat Mimic Icon:

As far as I’m aware though (with the recent removal of key chat events) you won’t be able to mimic it perfectly unless you create your own chat menu or a fork of the core chat.

1 Like

Is there a way to make a button that hides a certain topbar? (screen gui button)

What do you mean by this?

Do you want hide a CoreGui, Fame, Screen Gui, etc?

I want to make a button that hides 2 of the icons (top bar icons).
I guess its kind of a frame but since its a topbar icon I dont know if its possible.

When I say topbar icon, I mean I made an icon out of this module, and I want to make a button that hides 2 of the icons, so players can decide if to view them.

icon:setEnabled(false) should do the trick:

1 Like