Skip to main content

SkinsScreen

Based on game build 714014 | Last updated: 2026-03-09

Overview

SkinsScreen is a UI screen that displays the player's skin collection, allowing browsing, filtering, and interaction with skin details. It provides access to related functionality such as character loadouts, trading, and set information via dedicated buttons and keyboard/controller input. It manages layout elements, a scrollable skin grid, a details panel, and dynamic help text, serving as the central interface for customization content.

Usage example

The SkinsScreen is constructed and pushed to the frontend by the game's UI system (typically when navigating to the skin collection). It is not added as a component to an entity; instead, it extends Screen and is instantiated directly:

TheFrontEnd:PushScreen(SkinsScreen(profile))

Dependencies & tags

Components used: None identified (this is a standalone UI screen, not an entity component). Tags: None identified (no entity tags are managed).

Properties

PropertyTypeDefault ValueDescription
profiletablenilThe player profile object used for loading skin data and updating persistent settings.
applied_filterstable{}Stores currently applied filters (e.g., skin groups to show).
list_widgetstablenilArray of widgets representing individual grid slots in the inventory list.
current_item_typestring/nilnilTracks the type of the currently selected skin item.
scroll_listTrueScrollListnilThe scrollable container for the skin grid.
details_panelWidgetnilPanel widget displaying details (name, image, rarity, set info) for a selected skin.
inventory_listWidgetnilWidget container for the skin grid and its frame.
chestUIAnimnilAnimated background element (a decorative chest).
loadout_buttonImageButtonnilButton to open the character loadout screen.
trade_buttonImageButtonnilButton to open the trading screen.
titleTextEditnilEditable text field for the collection title.
exit_buttonWidgetnilBack button (keyboard/mouse variant).
set_info_screenScreen/nilnilReference to the currently open set information popup screen.
sorry_popup, no_item_popup, usable_popupboolean/nilnilFlags to prevent duplicate popups during screen activation.
full_skins_list, skins_listtable{}Stored copies of the full and filtered skin lists.

Main functions

DoInit()

  • Description: Initializes the screen layout, including background, buttons, editable title, skin grid, details panel, and help systems. Disables graphics features like stencil and light maps for UI rendering.
  • Parameters: None.
  • Returns: Nothing.
  • Error states: May create and push a "sorry" popup or no-items popup during initialization if offline or inventory is empty.

BuildInventoryList()

  • Description: Creates the scrollable skin grid container (inventory_list), its frame, and the TrueScrollList for skin items using SkinGridListConstructor.
  • Parameters: None.
  • Returns: Nothing.

UpdateInventoryList()

  • Description: Fetches the current skin list via GetSkinsList() and updates the scroll list with the data.
  • Parameters: None.
  • Returns: Nothing.

GetSkinsList()

  • Description: Populates skins_list and full_skins_list by calling GetInventorySkinsList(true) and CopySkinsList(). Stores a legacy timestamp (currently unused).
  • Parameters: None.
  • Returns: Nothing.

BuildDetailsPanel()

  • Description: Constructs the details panel UI, including hanger image, item image, name, description, rarity, set title, and set info button.
  • Parameters: None.
  • Returns: Nothing.

OnItemSelect(type, item_type, item_id, itemimage)

  • Description: Updates the details panel when a skin item is selected or deselected. Displays skin name, rarity, description, and set progress if applicable.
  • Parameters:
    • type (string/nil) — Type of item: "base", "body", "item", or other. Controls shadow scale.
    • item_type (string/nil) — Internal skin type key. Used for fetching display strings.
    • item_id (string/nil) — Item instance ID (unused in logic).
    • itemimage (ItemImage/nil) — The UI item image widget (unused in logic).
  • Returns: Nothing.
  • Error states: Early return if type or item_type is nil, hiding the details panel and showing the hanger.

UnselectAll()

  • Description: Removes selection state from all inventory grid widgets.
  • Parameters: None.
  • Returns: Nothing.

Quit()

  • Description: Saves the current collection timestamp, fades out, and pops the screen.
  • Parameters: None.
  • Returns: Nothing.

OnBecomeActive()

  • Description: Handles screen activation logic, including offline/empty-inventory scenarios, popup management, and updating the inventory list. Supports resuming from sub-screens (e.g., set info, trade).
  • Parameters: None.
  • Returns: Nothing.

OnControl(control, down)

  • Description: Processes input events, including navigation controls (scrolling, back), menu button shortcuts (loadout, trade, set info, usable info), and scroll repeat logic.
  • Parameters:
    • control (string) — The control action (e.g., CONTROL_CANCEL, CONTROL_SCROLLFWD, CONTROL_MENU_START).
    • down (boolean) — Whether the control was pressed (true) or released (false).
  • Returns: true if the event was handled; false otherwise.

ScrollBack(control) / ScrollFwd(control)

  • Description: Implements scroll repeat logic for mouse wheel, keyboard, or controller inputs. Sets repeat time based on input device.
  • Parameters:
    • control (string) — The control action (e.g., CONTROL_SCROLLBACK, CONTROL_SCROLLFWD).
  • Returns: Nothing.

GetHelpText()

  • Description: Builds and returns a localized help text string for context-sensitive button hints (e.g., back, scroll, loadout, trade).
  • Parameters: None.
  • Returns: string — A concatenated help text string for display in the UI.

Events & listeners

  • Listens to: None identified (this screen does not register global or entity-specific events via inst:ListenForEvent).
  • Pushes: The screen itself does not fire custom events, but pushes new screens (e.g., CharacterLoadoutSelectScreen, TradeScreen, SetPopupDialog, PopupDialogScreen) via TheFrontEnd:PushScreen.