About
Developers are significantly limited when using the TopBar to store custom icons. Many of us utilise this area for shops, feedback-menus and help-panels, saving space we originally couldn’t afford to use elsewhere.
For example, HiddoDev’s tycoon with 1 billion visits and HD Admin both utilise custom icons:
The Problem
To achieve this currently, we have to disable the existing topbar, create a fake topbar, determine how many CoreGuis are visible, then calculate the inset for our icons appropriately. This alone creates a lot of hassle for developers, and with the introduction of the Emotes menu, it’s almost impossible to position icons perfectly now-a-days, for reasons mentioned here.
Solution
The solution? A new set of inbuilt functions to easily add, adapt and remove our own TopBar Icons.
StarterGui:CreateIcon(name, image, slot)
StarterGui:SetIconImage(name, image)
StarterGui:SetIconSlot(name, slot)
StarterGui:RemoveIcon(name)
Where name is the unique identifier of the icon, image the image of the icon, and slot the order the icon appears in after the final visible CoreGui (default: #slots+1).