User Guide: GUI Elements

From AFXWiki

Jump to: navigation, search

Contents


Gui Elements

AFX enhances Torque's cursor-driven mode of interaction and adds a few essential Gui controls. The primary goal of these Gui elements is to create a basic demo interface that operates somewhat like the interfaces experienced in many RPG games. In that respect, they work very well, but you may find them lacking somewhat for use in an actual game. At best, consider these as mere starting points for a more complete RPG game interface.

Gui Element Summaries

afxEventCatchAll

Gui controls catch or block all mouse events whether they need them or not. This can be a problem for non-interactive controls like text messages, since they will also steal the mouse events. afxEventCatchAll is an invisible control that captures and passes all of its mouse event up to its parent control. Controls placed directly under it will be visible but won't steal the mouse events.

afxSpellButton

A Gui button useful for casting spells organized in a spell book and presented as part of a bank of spell buttons.

When the cursor hovers over a spell button, it displays a message box of spell information. It can also display spell cooldown progress using a circular wipe overlay.

By convention, right-clicking a spell button reloads the script associated with the spell.

afxSpellCastBar

A simple progress bar control for displaying spellcasting progress.

afxStatusBar

A simple status bar which monitors a ShapeBase object's health or energy. Mouse-down events are passed to its parent which should be an afxStatusBox.

afxStatusBox

A simple variation of the Bitmap Control, modified to call a script method on mouse-down. Used to implement player selection by clicking a player's status control.

afxStatusLabel

A simple variation of a formatted text control. Mouse-down events are passed to its parent which should be an afxStatusBox.

afxGuiTextHud

A customized variation of the stock GuiShapeNameHud. It can be used in conjunction with afxGuiText effects to place choreographer controlled text effects on the heads-up-display.



Previous: User Guide: AFX Force System

Next: User Guide: Miscellaneous Useful Things

Up: AFX: Official Online Documentation

Personal tools