mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 21:17:32 +00:00
38 lines
782 B
Java
38 lines
782 B
Java
package noppes.npcs.scripted;
|
|||
|
|
|
||
|
|
import noppes.npcs.api.IScreenSize;
|
||
|
|
|
||
|
|
public class ScreenSize implements IScreenSize {
|
||
|
|
private int width;
|
||
|
|
private int height;
|
||
|
|
|
||
|
|
public ScreenSize(int width, int height) {
|
||
|
|
this.width = width;
|
||
|
|
this.height = height;
|
||
|
|
}
|
||
|
|
|
||
|
|
public void setSize(int width, int height) {
|
||
|
|
this.width = width;
|
||
|
|
this.height = height;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getWidth() {
|
||
|
|
return width;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getHeight() {
|
||
|
|
return height;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getWidthPercent(double percent) {
|
||
|
|
return (int) (((double)width)*percent/100);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public int getHeightPercent(double percent) {
|
||
|
|
return (int) (((double)height)*percent/100);
|
||
|
|
}
|
||
|
|
}
|