-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release 3.5.9 & Fix display bug for Rect.startDrawing (Disabled ALPHA…
…_TEST) & Add more method to GifImage for better control & Add CursorHolder to UI & Add more method to control UI Component styles
- Loading branch information
Showing
10 changed files
with
141 additions
and
28 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
42 changes: 42 additions & 0 deletions
42
src/main/java/cn/mccraft/pangu/core/client/ui/CursorHolder.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,42 @@ | ||
package cn.mccraft.pangu.core.client.ui; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class CursorHolder { | ||
protected String type; | ||
protected Object object; | ||
|
||
public boolean isPresent() { | ||
return object != null; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public boolean check(String type) { | ||
return isPresent() && type.equals(this.type); | ||
} | ||
|
||
public Object peek() { | ||
return object; | ||
} | ||
|
||
public Object pop() { | ||
Object obj = object; | ||
clear(); | ||
return obj; | ||
} | ||
|
||
public Object push(@Nonnull String type, @Nonnull Object object) { | ||
Object old = this.object; | ||
this.type = type; | ||
this.object = object; | ||
return old; | ||
} | ||
|
||
public void clear() { | ||
object = null; | ||
type = null; | ||
} | ||
} |
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
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