# GoldScreen Methods to interact with the gold‑crafting **Gold Screen** interface. ```{figure} ../../images/GoldScreen_interface.png ``` ```{note} Credits to Flight and Skunkworks ``` - - - ## ERSGoldItem ```pascal ERSGoldItem = enum(GOLD_RING..ZENYTE_BRACELET); ``` Enum of all jewellery items that can be crafted on the {ref}`GoldScreen`. - - - ## TRSGoldScreen Main record to interact with the {ref}`GoldScreen` interface. - - - ## GoldScreen.SetupInterface ```pascal procedure TRSGoldScreen.SetupInterface(); ``` Internal method used to setup the {ref}`TRSGoldScreen` coordinates. Automatically called for you on the `GoldScreen` variable. - - - ## GoldScreen.GetButtons ```pascal function TRSGoldScreen.GetButtons(): TRSButtonArray; ``` Returns an array with all cached quantity‑selection buttons. Or caches it. - - - ## GoldScreen.GetButton ```pascal function TRSGoldScreen.GetButton(B: ERSGoldScreenButton): TRSButton; ``` Returns the specific quantity button requested. - - - ## GoldScreen.IsOpen ```pascal function TRSGoldScreen.IsOpen(): Boolean; ``` Returns `True` if the gold‑crafting interface is visible. - - - ## GoldScreen.WaitOpen ```pascal function TRSGoldScreen.WaitOpen(time: Int32 = 600; interval: Int32 = -1): Boolean; ``` Waits up to `time` ms for the interface to appear. - - - ## GoldScreen.Close ```pascal function TRSGoldScreen.Close(PressEscape: Boolean = False): Boolean; ``` Closes the interface via its close button or by pressing **Escape**. - - - ## GoldScreen.SetQuantity ```pascal function TRSGoldScreen.SetQuantity(Amount: Int32): Boolean; ``` Selects the desired quantity button (1/5/10/X/All). Pass `-1` for **All**. - - - ## GoldScreen.CanCraftItem ```pascal function TRSGoldScreen.CanCraftItem(Item: ERSGoldItem): Boolean; ``` Returns `True` if the given item icon is available for crafting. - - - ## GoldScreen.IsItemHighlighted ```pascal function TRSGoldScreen.IsItemHighlighted(Item: ERSGoldItem): Boolean; ``` Returns `True` if the given item is currently highlighted. - - - ## GoldScreen.CraftItem ```pascal function TRSGoldScreen.CraftItem(Item: ERSGoldItem; Quantity: Int32; UseSpaceBar: Boolean = False): Boolean; ``` Sets the quantity then crafts the requested item. If `UseSpaceBar = True` and the item is highlighted it presses **Space**, otherwise it clicks the item icon. - - - ## GoldScreen.Draw ```pascal procedure TRSGoldScreen.Draw(Bmp: TMufasaBitmap); ``` Debug‑draws bounds, item slots, and quantity buttons on `Bmp`. - - - ## GoldScreen variable Global {ref}`TRSGoldScreen` variable.