This template is a replacement for the previous VerbCoin template, with the aim of dropping legacy features and offering a simpler base to build upon.
The main changes are:
As a general guide, left click on things to open the Verbcoin, right click to open the inventory window.
The script module functions are mostly to register the interface components used for displaying the VerbCoin and managing the inventory window.
Example:
// setup VerbCoin GUI and buttons
VerbCoin.InterfaceGui = gVerbCoin;
VerbCoin.RegisterButton(btnLook, eVerbCoinPositionNorth, eModeLookat, "Look at");
VerbCoin.RegisterButton(btnTalk, eVerbCoinPositionEast, eModeTalkto, "Talk to");
VerbCoin.RegisterButton(btnInteract, eVerbCoinPositionSouth, eModeInteract, "Use");
VerbCoin.RegisterButton(btnPickup, eVerbCoinPositionWest, eModePickup, "Pick up");
// select the inventory GUI and action label
VerbCoin.InventoryGui = gInventory;
VerbCoin.ActionLabel = lblAction;
// disable buttons where click events would be unhandled
VerbCoin.ButtonAutoDisable = true;
int VerbCoin.Radius
Sets the radius used when drawing the circle that renders the VerbCoin.
int VerbCoin.BackgroundTransparency
Sets the background transparency level (from 0 to 100) for the VerbCoin
int VerbCoin.BackgroundColor
Sets the background color (0 to 65535) for the VerbCoin.
int VerbCoin.BorderColor
Sets the border color (0 to 65535) for the VerbCoin
int VerbCoin.BorderWidth;
Sets the border width for the VerbCoin.
VerbCoin.OnClick(GUIControl* control, MouseButton button);
Since click handlers can currently only be implemented in the global script, this function is used to pass the event back into the VerbCoin module.
GUI* VerbCoin.InterfaceGui
Registers the GUI used for the VerbCoin.
GUI* VerbCoin.InventoryGui
Registers the GUI used for the inventory window.
Label* VerbCoin.ActionLabel
Registers the Label used to display text descriptions.
VerbCoin.Enable();
Enables the VerbCoin interface.
VerbCoin.Disable();
Disables the VerbCoin interface.
VerbCoin.IsEnabled();
Returns true if the VerbCoin interface is currently enabled, else returns false.
VerbCoin.Open();
Opens the VerbCoin interface (i.e. show its GUI).
VerbCoin.Close();
Closes the VerbCoin interface (i.e. hide its GUI)
VerbCoin.IsOpen();
Returns true if the VerbCoin interface is currently open, else returns false.