UI art in Studio

How RoGenie builds game UI on image art - the ArtKit, ArtKey, nine-slice frames that scale with the screen, menus that open and close, text that stays editable, and the checks after a build.

On this page

Most game UI is best built from native parts: Frames, TextLabels, rounded corners, strokes, gradients and layouts. They cost nothing, stay sharp at every size and are easy to change. Some games want art instead: an ornate panel, a painted button, a wooden sign. RoGenie can build UI on art you already have on Roblox, such as images you uploaded, the image of a Creator Store decal, or renders from Blender.

On paid plans, RoGenie can also make the art: a matching UI kit, icon sets, logos, banners, backdrops and badges in your place's art style, recorded in the ArtKit below. See Game art.

Words stay editable

RoGenie puts the art behind the UI, not the words. Titles, labels and prices stay real TextLabels on top of the art, so you can edit and translate them, and they stay sharp on every screen. When RoGenie has the art image itself, its checks also warn about text that is hard to read over the art.

The ArtKit

RoGenie keeps a place's UI art in one ModuleScript, ReplicatedStorage.UIArt.ArtKit. Each entry has a name, for example ui.panel.shop, and holds:

  • the image id and its size in pixels,
  • how it fits: fit keeps its shape, while slice, slice_h and slice_v are nine-slice art that stretches both ways, only across, or only down,
  • the nine-slice centre, and the padding that keeps content inside the frame,
  • for an icon on a sheet of icons, its square on the sheet,
  • the corner size the art was designed for.

Your own scripts can read the ArtKit too. Its folder and script names are neutral, because they ship to players' devices.

ArtKey: art on an element

When RoGenie builds UI, it gives an ImageLabel or ImageButton an ArtKey attribute that names an ArtKit entry. From that entry it sets:

  • the image and how it scales (Slice or Fit),
  • the nine-slice centre, or the icon's square on its sheet,
  • an aspect-ratio constraint, so the art never stretches out of shape,
  • padding from the entry, so text and icons sit inside the frame,
  • a transparent background.

It leaves out a UIStroke or UICorner on the art element, because the art draws its own edge, and keeps a UIGradient. An ArtKey the kit does not have stops the build with a message that names the key and lists the kit's keys.

Nine-slice frames that scale

A nine-slice image keeps its corners crisp while its middle stretches. On Roblox the corner size does not follow the screen size by itself, so the first build that uses ArtKey or UIRole adds a small binder to your place:

  • a ModuleScript, ReplicatedStorage.UIArt.SliceBinder, and
  • a LocalScript, StarterPlayer.StarterPlayerScripts.UIArtBinder.

The binder sizes the corners for each screen. For art that stretches both ways and has a design corner size, a corner follows the player's screen height (that size is for a screen 1080 pixels high). Otherwise the corners follow the element's own size. Either way, the two corners together stay within 90% of the side they slice, and the binder follows UIScale. It also covers UI that your scripts clone while the game runs, and UI that Roblox rebuilds when a player respawns. In Edit mode you see the corners at their 1080-pixel size; in play they follow the screen. Elements without an ArtKey are never touched.

UIRole: menus that open and close

Give buttons and frames a UIRole attribute and the binder wires them up:

UIRoleWhat it does
open:<Name>Opens the menu (a modal) called Name. Only one menu is open at a time.
closeCloses the open menu.
backdropCatches clicks behind the menu. It never closes the menu.

The B button on a gamepad closes the menu too. UIRole also works on plain UI without art. If a script with the binder's name that RoGenie did not write is in the way, RoGenie says so and leaves the roles unwired.

Checks after a build

When RoGenie builds UI with art, it runs the UI Layout Scan on it straight away. Besides elements cut off by the screen or overlapping each other, the scan checks for:

  • images that did not load, or that are stretched out of shape,
  • nine-slice settings that are broken, and corners that overlap or are too small on some screens,
  • strokes or rounded corners that clash with the art, and art stacked on art,
  • text inside a CanvasGroup, and text that is hard to read over the art,
  • buttons smaller than 44 pixels on phones, elements outside the screen's safe area, and a backdrop that closes on click,
  • more than 30 different images on one screen.

To work out where everything lands, the scan follows aspect-ratio and size constraints, UIScale, padding, list and grid layouts and automatic sizes. It says so when it could not follow a layout.

With Screenshots on in Tool access, the scan also takes two pictures: one at the largest 16:9 size that fits your Studio viewport, and one at a phone size of 896 × 414, or the largest size of that shape that fits the viewport. The Roblox top bar and the notches of real devices are not drawn.

For a menu, RoGenie also gets a ready playtest: open the menu, click the backdrop (the menu must stay open), then close it. During a plan step with playtest verification on, a step that builds UI with art also needs a UI scan and a playtest before it counts as done.

Back to top