TBD docs.
The name of the subject that the ops belonging to this IfType act on.
TBD docs/examples.
All the direct children of this IfType. Note that only LAYER-type IfTypes have children. EXPENSIVE. Please cache the return value before iterating. TBD example.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
The index of the ultimate static parent component of this IFType in its interface group. TBD example: RetrieveIfType.
TBD docs
TBD docs
TBD docs
TBD docs
TBD docs/examples.
TBD docs.
TBD docs.
TBD docs/examples.
The id number of the sprite displayed by a GRAPHIC type IfType.
id number of additional graphic sprite. TBD more details and examples.
TBD docs/examples (read-only).
The height of the IfType.
local ifType = osrs.IfType.retrieveIfType(728, 6)
if(ifType.type == osrs.IfType.IfTypes.LAYER) then
local table = ifType:getChildren()
for index, ifTypeChild in ipairs(table) do
osrs.print(ifTypeChild.graphic)
osrs.print("WIDTH: " .. ifTypeChild.width .. ", Height: " .. ifTypeChild.height)
end
end
TBD docs/examples
Boolean indicating whether to display the IfType and its children.
the id of the interface group this IFType belongs to. TBD example.
Is this IfType part of the Entity Overlay system? TBD: add details once Entity Overlay system is exposed.
TBD docs. Not expected to be of much use for plugin API.
Returns true if the IfType is currently rendering to the screen. There is no event to monitor this, so you will have to poll it to detect changes. TBD example.
Returns true if the IfType is a static component (equivalent to subId==-1). TBD: example.
TBD docs.
This is an opaque identifier for this IfType's direct parent, or -1 if it is a top-level static layer. Read-only.
See layerIdXMin.
Dynamic layers will have this filled out. It denotes the range of subids in the ultimate static parent that might belong to us. Likely low relevance to PluginAPI.
TBD docs/examples.
TBD docs/examples. (Will be one of osrs.gamevals.objtypes). This will tell you what's in each inventory cell.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
TBD docs/examples.
Represents the alignment of the X-Coordinate of the IfType.
Represents the alignment of the Y-Coordinate of the IfType.
The list of ops belonging to this IfType.
TBD docs/examples (this may refer to orthographic rendering of the model).
TBD docs/examples.
TBD docs. Read-only.
TBD docs. Read-only.
Gets this IfType's direct parent. If this IfType is a static component, returns nil.
TBD docs/examples.
Returns the screen coordinates of the upper left corner of this IfType. This value is computed every time it is accessed (by summing the offsets of all parents).
TBD docs. Read-only.
TBD docs. Read-only.
TBD docs/examples
The label of the IfType descriptor, if top-level IfType. Otherwise, is empty. TBD: Confirm that this is available in retail builds.
TBD docs/examples (0-65535 range)
Gets this IfType's ultimate static parent, or itself if it is static.
TBD docs/examples (0-65535 range)
TBD docs/examples
-1 for static components. For dynamic components, this is the array index into the ultimate static parent component's children array.
The string to display by a TEXT type IfType.
Secondary text string. TBD: example.
TBD docs/examples.
How transparent the IfType should be. 0 - Fully Opaque, 255 - Transparent
local changePerSecond = 4
local ifType = osrs.IfType.retrieveIfType(728, 6)
local table = ifType:getChildren()
local lastChange = 0
local transparencyValue = 0
-- Gradually makes the sidebar icons transparent
local loopTransparent = function()
local currentTime = osrs.getTime()
if (currentTime - lastChange >= (1/changePerSecond)) then
for index, value in ipairs(table) do
value.transparency = transparencyValue
end
transparencyValue = transparencyValue + 5
osrs.print("Transparency Value: " .. transparencyValue)
lastChange = currentTime
if(transparencyValue > 255) then
return false
end
end
return true
end
drawToken = osrs.setInterval(loopTransparent, 0, drawToken)
The category of IfType this object belongs to.
TBD docs/examples
The width of the IfType.
local ifType = osrs.IfType.retrieveIfType(728, 6)
if(ifType.type == osrs.IfType.IfTypes.LAYER) then
local table = ifType:getChildren()
for index, ifTypeChild in ipairs(table) do
osrs.print(ifTypeChild.graphic)
osrs.print("WIDTH: " .. ifTypeChild.width .. ", Height: " .. ifTypeChild.height)
end
end
The x-coordinate of the IfType, relative to its parent.
The y-coordinate of the IfType, relative to its parent.
Subscribe to a UI event. It is legal for the same function to be subscribed to DIFFERENT events, but double-subscribing to the same even will fail, and return false.
the callback that will be invoked. The exact callback type is dependent on the event.
The Id of the event to subscribe to.
true if the subscription succeeded (can fail because of double-registration, or because event doesn't exist--check debug console).
Unsubscribe from a UI Event.
The same callback you used to register for the event.
The event the callback was registered for.
true if the subscription was successfully found and removed.
Represents a single component in an IfGroup. IfTypes can be "static" meaning they are created at design time and deserialized from dat files, or "dynamic" meaning they are created at runtime by script. The IfType class is monolithic, and contains the entire set of data fields used by all IfType.IfTypes, although fields will be ignored if they are not relevant for a given type.