-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from Goodbird-git/screen-size
Implemented the ability to get the screen size from server
- Loading branch information
Showing
6 changed files
with
67 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
package noppes.npcs.constants; | ||
|
||
public enum EnumPlayerPacket { | ||
FollowerHire,FollowerExtend,Trader, FollowerState, Transport, BankUnlock, BankUpgrade, Dialog, QuestLog, CheckQuestCompletion, BankSlotOpen, FactionsGet, MailGet, MailDelete, MailSend, MailRead, MailboxOpenMail, SignSave, SaveBook, CompanionOpenInv, RoleGet, KeyPressed, MouseClicked, CompanionTalentExp | ||
FollowerHire,FollowerExtend,Trader, FollowerState, Transport, BankUnlock, BankUpgrade, Dialog, QuestLog, CheckQuestCompletion, BankSlotOpen, FactionsGet, MailGet, MailDelete, MailSend, MailRead, MailboxOpenMail, SignSave, SaveBook, CompanionOpenInv, RoleGet, KeyPressed, MouseClicked, CompanionTalentExp, ScreenSize | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
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); | ||
} | ||
} |
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