Calculate and store widget parent id and position when the interfaces are rendered
This removes the need to calculate widget bounds and parent on demand by traversing up the widget tree.
This commit is contained in:
@@ -156,6 +156,15 @@ public interface RSClient extends RSGameEngine, Client
|
||||
@Import("widgets")
|
||||
RSWidget[][] getWidgets();
|
||||
|
||||
/**
|
||||
* Gets an array of widgets that correspond to the passed group ID.
|
||||
*
|
||||
* @param groupId the group ID
|
||||
* @return the widget group
|
||||
* @see net.runelite.api.widgets.WidgetID
|
||||
*/
|
||||
RSWidget[] getGroup(int groupId);
|
||||
|
||||
@Import("region")
|
||||
@Override
|
||||
RSRegion getRegion();
|
||||
|
||||
@@ -40,6 +40,12 @@ public interface RSWidget extends Widget
|
||||
@Override
|
||||
int getId();
|
||||
|
||||
void setRenderParentId(int parentId);
|
||||
|
||||
void setRenderX(int x);
|
||||
|
||||
void setRenderY(int y);
|
||||
|
||||
@Import("parentId")
|
||||
int getRSParentId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user