- Timestamp:
- Feb 23, 2021, 1:58:57 AM (4 years ago)
- Branches:
- master
- Children:
- 8e945fc
- Parents:
- 4d8825f
- Location:
- gamegui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gamegui/Listable.java
r4d8825f r3d64884 5 5 public interface Listable { 6 6 7 void draw(int paramInt1, int paramInt2, Graphics paramGraphics);7 void draw(int x, int y, Graphics g); 8 8 int getHeight(); 9 9 int getWidth(); -
gamegui/ScrollList.java
r4d8825f r3d64884 103 103 if (this.lstObjects.size() > 0) { 104 104 e = this.lstObjects.get(0); 105 listHeight = e.getHeight() * (int)Math.ceil(this.lstObjects.size() / ( getWidth() / e.getWidth())) + e.getYOffset();105 listHeight = e.getHeight() * (int)Math.ceil(this.lstObjects.size() / (float)(getWidth() / e.getWidth())) + e.getYOffset(); 106 106 } 107 107 int numPerRow = 0; … … 110 110 } 111 111 for (int x = 0; x < this.lstObjects.size(); x++) { 112 ((Listable)this.lstObjects.get(x)).draw(e.get Height() * x % numPerRow+ e.getXOffset(), this.fontHeight + x / numPerRow * e.getHeight() - this.textStart, srcGraphics);112 ((Listable)this.lstObjects.get(x)).draw(e.getWidth() * (x % numPerRow) + e.getXOffset(), this.fontHeight + x / numPerRow * e.getHeight() - this.textStart, srcGraphics); 113 113 } 114 114 g.drawImage(source, getX(), getY(), null);
Note:
See TracChangeset
for help on using the changeset viewer.