Console Prompt Icons - Add ImageLabels that update based on which controller the player is using!


This module lets you create ImageLabels/ImageButtons that update images based on what controller they’re using!
This module can also be used to get controller icons, either from a specific controller type or just the current controller type.
Get Module Here | Download the Controller Icons

The Controller Icons used were created by Xelu

Set Up the Module

Setting up the module is easy! Just insert the module in for example ReplicatedStorage, then just require it in a LocalScript!

local ReplicatedStorage = game:GetService("ReplicatedStorage")
require(ReplicatedStorage.ConsoleIcons) -- or just replace it with the path of the module
Use the Module

To make use of this module, simply

  1. Create an ImageLabel/ImageButton (or use an existing one)
  2. Add the GUI_ConsolePrompt tag to the image
  3. Use these attributes to customize the image:
  • ConsoleButton - sets the controller icon (check Docs for more info)
  • CustomConsoleType - sets the console icon to a specific set of controller icons (check Docs for more info)
  • HideWhenGamepadDisconnects - if true, the Image will only show if a controller is connected.
Docs

Attributes

  • ConsoleButton, sets the controller icon
    NOTE: The icon names are the same as they are in Enum.KeyCode
    This attribute is REQUIRED
  • CustomConsoleType, sets the console icon to a specific set of controller icons
    Accepted Values: ps, xbox
    This attribute is NOT REQUIRED, if not included, it will set the controller icons based off of which controller the player is using.
  • HideWhenGamepadDisconnects, if true, the Image will only show if a gamepad is connected.
    This attribute is NOT REQUIRED, if not included, the Image will not disappear if there is no controller.

Functions

  • ConsoleIcons.GetConsoleIcon(keyCodeName : string, customConsoleType : string)
    This function gets the asset id for a specific console icon
    If customConsoleType is left as nil, the icon returned will be based on which controller the player is using.
  • ConsoleIcons.RegisterImage(img : ImageLabel | ImageButton)
    This function gets the asset id for a specific console icon
    If customConsoleType is left as nil, the icon returned will be based on which controller the player is using.

If you find any bugs, pls tell me

Is this resource useful to you?
  • Very useful
  • I’d probably use it
  • Not useful at all (if you picked this pls tell me why)

0 voters

6 Likes

Asset is private, so can’t download it.

1 Like

i made it public, it should hopefully work now

1 Like