use of net.runelite.api.widgets.Widget in project runelite by runelite.
the class XpDropPlugin method onWidgetHidden.
@Subscribe
public void onWidgetHidden(WidgetHiddenChanged event) {
Widget widget = event.getWidget();
int group = WidgetInfo.TO_GROUP(widget.getId());
if (group != WidgetID.EXPERIENCE_DROP_GROUP_ID) {
return;
}
if (widget.isHidden()) {
return;
}
if (config.hideSkillIcons() && widget.getSpriteId() > 0) {
widget.setHidden(true);
return;
}
PrayerType prayer = getActivePrayerType();
if (prayer == null) {
resetTextColor(widget);
return;
}
String text = widget.getText();
if (text != null) {
switch(prayer) {
case MELEE:
widget.setTextColor(config.getMeleePrayerColor().getRGB());
break;
case RANGE:
widget.setTextColor(config.getRangePrayerColor().getRGB());
break;
case MAGIC:
widget.setTextColor(config.getMagePrayerColor().getRGB());
break;
}
}
}
Aggregations