Apply BASE attribute methods improvements

This commit is contained in:
2022-11-23 16:31:19 +01:00
parent 6fefa32c7d
commit 898582fdb1
4 changed files with 12 additions and 13 deletions

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -78,13 +78,12 @@ public class ItemIconView extends IconView {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Attribute("placeholder") @Attribute(value = "placeholder", separator = ",")
public void setPlaceholderIcon(String icon) { public void setPlaceholderIcon(String icon, int row, int column) {
this.placeholderIconPaint = gui.createPaint(); this.placeholderIconPaint = gui.createPaint();
var parts = icon.split(","); this.placeholderIconSet = gui.getIconSet(A.iconsets.get(icon).uid);
this.placeholderIconSet = gui.getIconSet(A.iconsets.get(parts[0]).uid); this.placeholderIconSetRow = row;
this.placeholderIconSetRow = Integer.parseInt(parts[1]); this.placeholderIconSetColumn = column;
this.placeholderIconSetColumn = Integer.parseInt(parts[2]);
} }
private void handleKeyEvent(KeyEvent event) { private void handleKeyEvent(KeyEvent event) {

View File

@@ -17,7 +17,7 @@
</base:BorderLayout-TopLeft> </base:BorderLayout-TopLeft>
<base:BorderLayout-TopRight> <base:BorderLayout-TopRight>
<base:FPSMonitor monitor="5|40" padding="15f" width="150" height="100f"/> <base:FPSMonitor monitor="5,40" padding="15f" width="150" height="100f"/>
</base:BorderLayout-TopRight> </base:BorderLayout-TopRight>
<base:BorderLayout-BottomLeft> <base:BorderLayout-BottomLeft>