runelite-api: Update widget field names
This commit is contained in:
@@ -469,34 +469,6 @@ public interface Widget
|
|||||||
*/
|
*/
|
||||||
void setOriginalWidth(int originalWidth);
|
void setOriginalWidth(int originalWidth);
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the additional x-axis padding.
|
|
||||||
*
|
|
||||||
* @return the x-axis padding
|
|
||||||
*/
|
|
||||||
int getPaddingX();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the x-axis padding.
|
|
||||||
*
|
|
||||||
* @param paddingX the new padding
|
|
||||||
*/
|
|
||||||
void setPaddingX(int paddingX);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the additional y-axis padding.
|
|
||||||
*
|
|
||||||
* @return the y-axis padding
|
|
||||||
*/
|
|
||||||
int getPaddingY();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the y-axis padding.
|
|
||||||
*
|
|
||||||
* @param paddingY the new padding
|
|
||||||
*/
|
|
||||||
void setPaddingY(int paddingY);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the actions available on the widget.
|
* Gets the actions available on the widget.
|
||||||
*
|
*
|
||||||
@@ -566,14 +538,17 @@ public interface Widget
|
|||||||
void setFontId(int id);
|
void setFontId(int id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the border thickness of the widget
|
* Returns the border type of item/sprite on the widget
|
||||||
|
* 0 - No border
|
||||||
|
* 1 - 1px black border
|
||||||
|
* 2 - 1px black under 1px white border (selected item)
|
||||||
*/
|
*/
|
||||||
int getBorderThickness();
|
int getBorderType();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the border thickness of the widget
|
* @see #getBorderType
|
||||||
*/
|
*/
|
||||||
void setBorderThickness(int thickness);
|
void setBorderType(int thickness);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns if text is shadowed
|
* Returns if text is shadowed
|
||||||
|
|||||||
@@ -142,9 +142,7 @@ public class WidgetInfoTableModel extends AbstractTableModel
|
|||||||
out.add(new WidgetField<>("ScrollHeight", Widget::getScrollHeight, Widget::setScrollHeight, Integer.class));
|
out.add(new WidgetField<>("ScrollHeight", Widget::getScrollHeight, Widget::setScrollHeight, Integer.class));
|
||||||
out.add(new WidgetField<>("OriginalX", Widget::getOriginalX));
|
out.add(new WidgetField<>("OriginalX", Widget::getOriginalX));
|
||||||
out.add(new WidgetField<>("OriginalY", Widget::getOriginalY));
|
out.add(new WidgetField<>("OriginalY", Widget::getOriginalY));
|
||||||
out.add(new WidgetField<>("PaddingX", Widget::getPaddingX));
|
out.add(new WidgetField<>("BorderType", Widget::getBorderType, Widget::setBorderType, Integer.class));
|
||||||
out.add(new WidgetField<>("PaddingY", Widget::getPaddingY));
|
|
||||||
out.add(new WidgetField<>("BorderThickness", Widget::getBorderThickness, Widget::setBorderThickness, Integer.class));
|
|
||||||
out.add(new WidgetField<>("IsIf3", Widget::isIf3));
|
out.add(new WidgetField<>("IsIf3", Widget::isIf3));
|
||||||
out.add(new WidgetField<>("HasListener", Widget::hasListener, Widget::setHasListener, Boolean.class));
|
out.add(new WidgetField<>("HasListener", Widget::hasListener, Widget::setHasListener, Boolean.class));
|
||||||
|
|
||||||
|
|||||||
@@ -277,8 +277,8 @@ public abstract class RSWidgetMixin implements RSWidget
|
|||||||
}
|
}
|
||||||
|
|
||||||
int columns = getWidth(); // the number of item slot columns is stored here
|
int columns = getWidth(); // the number of item slot columns is stored here
|
||||||
int paddingX = getPaddingX();
|
int xPitch = getXPitch();
|
||||||
int paddingY = getPaddingY();
|
int yPitch = getYPitch();
|
||||||
int itemId = itemIds[index];
|
int itemId = itemIds[index];
|
||||||
int itemQuantity = itemQuantities[index];
|
int itemQuantity = itemQuantities[index];
|
||||||
|
|
||||||
@@ -291,8 +291,8 @@ public abstract class RSWidgetMixin implements RSWidget
|
|||||||
|
|
||||||
int row = index / columns;
|
int row = index / columns;
|
||||||
int col = index % columns;
|
int col = index % columns;
|
||||||
int itemX = widgetCanvasLocation.getX() + ((ITEM_SLOT_SIZE + paddingX) * col);
|
int itemX = widgetCanvasLocation.getX() + ((ITEM_SLOT_SIZE + xPitch) * col);
|
||||||
int itemY = widgetCanvasLocation.getY() + ((ITEM_SLOT_SIZE + paddingY) * row);
|
int itemY = widgetCanvasLocation.getY() + ((ITEM_SLOT_SIZE + yPitch) * row);
|
||||||
|
|
||||||
Rectangle bounds = new Rectangle(itemX - 1, itemY - 1, ITEM_SLOT_SIZE, ITEM_SLOT_SIZE);
|
Rectangle bounds = new Rectangle(itemX - 1, itemY - 1, ITEM_SLOT_SIZE, ITEM_SLOT_SIZE);
|
||||||
return new WidgetItem(itemId - 1, itemQuantity, index, bounds);
|
return new WidgetItem(itemId - 1, itemQuantity, index, bounds);
|
||||||
|
|||||||
@@ -29,9 +29,6 @@ import net.runelite.mapping.Import;
|
|||||||
|
|
||||||
public interface RSWidget extends Widget
|
public interface RSWidget extends Widget
|
||||||
{
|
{
|
||||||
@Import("dynamicValues")
|
|
||||||
int[][] getDynamicValues();
|
|
||||||
|
|
||||||
@Import("children")
|
@Import("children")
|
||||||
@Override
|
@Override
|
||||||
RSWidget[] getChildren();
|
RSWidget[] getChildren();
|
||||||
@@ -87,10 +84,10 @@ public interface RSWidget extends Widget
|
|||||||
@Import("text")
|
@Import("text")
|
||||||
String getRSText();
|
String getRSText();
|
||||||
|
|
||||||
@Import("opBase")
|
@Import("name")
|
||||||
String getRSName();
|
String getRSName();
|
||||||
|
|
||||||
@Import("opBase")
|
@Import("name")
|
||||||
void setRSName(String name);
|
void setRSName(String name);
|
||||||
|
|
||||||
@Import("text")
|
@Import("text")
|
||||||
@@ -218,13 +215,13 @@ public interface RSWidget extends Widget
|
|||||||
@Override
|
@Override
|
||||||
void setSpriteId(int spriteId);
|
void setSpriteId(int spriteId);
|
||||||
|
|
||||||
@Import("borderThickness")
|
@Import("borderType")
|
||||||
@Override
|
@Override
|
||||||
int getBorderThickness();
|
int getBorderType();
|
||||||
|
|
||||||
@Import("borderThickness")
|
@Import("borderType")
|
||||||
@Override
|
@Override
|
||||||
void setBorderThickness(int thickness);
|
void setBorderType(int type);
|
||||||
|
|
||||||
@Import("itemId")
|
@Import("itemId")
|
||||||
@Override
|
@Override
|
||||||
@@ -274,21 +271,11 @@ public interface RSWidget extends Widget
|
|||||||
@Override
|
@Override
|
||||||
void setOriginalWidth(int originalWidth);
|
void setOriginalWidth(int originalWidth);
|
||||||
|
|
||||||
@Import("paddingX")
|
@Import("xPitch")
|
||||||
@Override
|
int getXPitch();
|
||||||
int getPaddingX();
|
|
||||||
|
|
||||||
@Import("paddingX")
|
@Import("yPitch")
|
||||||
@Override
|
int getYPitch();
|
||||||
void setPaddingX(int paddingX);
|
|
||||||
|
|
||||||
@Import("paddingY")
|
|
||||||
@Override
|
|
||||||
int getPaddingY();
|
|
||||||
|
|
||||||
@Import("paddingY")
|
|
||||||
@Override
|
|
||||||
void setPaddingY(int paddingY);
|
|
||||||
|
|
||||||
void broadcastHidden(boolean hidden);
|
void broadcastHidden(boolean hidden);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user