Package dev.twilite.game.wrapper
Class IfComponent
java.lang.Object
dev.twilite.game.wrapper.IfComponent
- All Implemented Interfaces:
Id,Interactable
Interface component/widget wrapper.
-
Constructor Summary
ConstructorsConstructorDescriptionIfComponent(dev.twilite.game.internal.memory.RSIfComponent memory) Wraps a native interface component provider. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the absolute component screen bounds.intReturns the component client code.intReturns the component index within its group.Returns the generated gameval constant name forId.id(), or the numeric id as text when no constant is known.dynamicChild(int child) Returns a dynamic child by index.Returns a lazy view over dynamic children.intReturns the dynamic child index, or-1for non-dynamic components.intgroup()Returns the interface group id.intid()Returns the packed component id.voidEnqueues the primary component action when no option text is supplied.intitemId()Returns the component item id, or-1when no item is present.intReturns the component item stack size.layer()Resolves the raw layer component.intlayerId()Returns the raw parent layer id.intReturns the component material id.intmodelId()Returns the component model id.name()Returns standardized component name.options()Returns available standardized component menu and sub-menu options.Resolves the effective parent layer.intReturns the resolved parent layer id, including sub-interface parenting.point()Returns the absolute component screen point.booleanEnqueues the resume/pause-button action.booleanselect()Enqueues the component use/select action.intspriteId()Returns the component sprite id.booleantarget()Enqueues the component target action.text()Returns standardized component text.inttype()Returns the component type.booleanvisible()Returns whether the component is visible through its parent chain.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.twilite.game.trait.Interactable
option
-
Constructor Details
-
IfComponent
public IfComponent(dev.twilite.game.internal.memory.RSIfComponent memory) Wraps a native interface component provider.
-
-
Method Details
-
id
public int id()Returns the packed component id. -
constantName
Description copied from interface:IdReturns the generated gameval constant name forId.id(), or the numeric id as text when no constant is known.This is intended for logs and diagnostics where a stable symbolic name is easier to read than a raw number.
- Specified by:
constantNamein interfaceId
-
group
public int group()Returns the interface group id. -
component
public int component()Returns the component index within its group. -
dynamicIndex
public int dynamicIndex()Returns the dynamic child index, or-1for non-dynamic components. -
type
public int type()Returns the component type. -
clientCode
public int clientCode()Returns the component client code. -
layerId
public int layerId()Returns the raw parent layer id. -
parentLayerId
public int parentLayerId()Returns the resolved parent layer id, including sub-interface parenting. -
layer
Resolves the raw layer component. -
parentLayer
Resolves the effective parent layer. -
point
Returns the absolute component screen point. -
bounds
Returns the absolute component screen bounds. -
visible
public boolean visible()Returns whether the component is visible through its parent chain. -
materialId
public int materialId()Returns the component material id. -
spriteId
public int spriteId()Returns the component sprite id. -
modelId
public int modelId()Returns the component model id. -
text
Returns standardized component text. Standardized text is tag-stripped, trimmed, and lowercased. -
name
Returns standardized component name. Standardized text is tag-stripped, trimmed, and lowercased. -
options
Returns available standardized component menu and sub-menu options. Option text is tag-stripped, trimmed, and lowercased.- Specified by:
optionsin interfaceInteractable
-
interact
Enqueues the primary component action when no option text is supplied.- Specified by:
interactin interfaceInteractable
-
target
public boolean target()Enqueues the component target action.- Specified by:
targetin interfaceInteractable
-
select
public boolean select()Enqueues the component use/select action.- Specified by:
selectin interfaceInteractable
-
resumePause
public boolean resumePause()Enqueues the resume/pause-button action. -
itemId
public int itemId()Returns the component item id, or-1when no item is present. -
itemStackSize
public int itemStackSize()Returns the component item stack size. -
dynamicChildren
Returns a lazy view over dynamic children. -
dynamicChild
Returns a dynamic child by index.
-