-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kurrycat
committed
Oct 24, 2022
1 parent
18445ec
commit d4d1679
Showing
7 changed files
with
109 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/main/java/io/github/kurrycat/mpkmod/gui/components/Rectangle.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.github.kurrycat.mpkmod.gui.components; | ||
|
||
import io.github.kurrycat.mpkmod.compatability.MCClasses.Renderer2D; | ||
import io.github.kurrycat.mpkmod.util.Vector2D; | ||
|
||
import java.awt.*; | ||
|
||
public class Rectangle extends Component { | ||
public Color color; | ||
|
||
public Rectangle(Vector2D pos, Vector2D size, Color color) { | ||
super(pos); | ||
this.setSize(size); | ||
this.color = color; | ||
} | ||
|
||
@Override | ||
public void render(Vector2D mouse) { | ||
Renderer2D.drawRect(getDisplayPos(), getSize(), color); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters