IconItem (of Object
)¶
-
class
IconItem
¶ Defined in IconItem.sc.
An icon that represents an action. These are used, for instance, in the main icon bar, or in the inventory dialog.
If you wish to do something in response to the icon being clicked, override the select(params) method in your IconItem instance like so:
(method (select) (if (super select: &rest) ; Do something here.... ) return 0 )
Subclasses: ControlIcon
, Slider
, InventoryItem
.
Properties¶
Inherited from Object
:
Property | Description |
---|---|
name |
Defined in IconItem:
Property | Description |
---|---|
view | The view for the icon |
loop | The loop for the icon |
cel | The cel for the icon |
nsLeft | |
nsTop | |
nsRight | |
nsBottom | |
state | |
cursor | Cursor number associated with the icon. |
type | |
message | A verb (e.g. V_LOOK) if type is evVERB. |
modifiers | |
signal | |
maskView | |
maskLoop | |
maskCel | |
highlightColor | |
lowlightColor | |
noun | The noun associated with this icon. |
modNum | |
helpVerb |
Methods¶
-
show
([left top]) Parameters: - left (number) – Optional parameter to set left position of icon.
- top (number) – Optional parameter to set top position of icon.
-
select
([fProcessEvents]) Parameters: fProcessEvents (boolean) – If TRUE, sets its state based on consuming mouse release events. If unspecified, just selects the control. Returns: TRUE if the icon was selected, FALSE otherwise.
-
highlight
(param1)
-
onMe
(param1)
-
mask
()