forked from itdelatrisu/opsu
-
Notifications
You must be signed in to change notification settings - Fork 18
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
fd
committed
Sep 26, 2015
1 parent
a158558
commit c23a39b
Showing
35 changed files
with
303 additions
and
188 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,5 @@ public UnicodeFont(Font font) { | |
super(font.name, font.style, font.size, font.file); | ||
} | ||
|
||
|
||
} |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package fluddokt.opsu.fake.gui; | ||
|
||
import fluddokt.opsu.fake.Graphics; | ||
import fluddokt.opsu.fake.InputListener; | ||
import fluddokt.opsu.fake.SlickException; | ||
|
||
public abstract class AbstractComponent { | ||
|
||
public AbstractComponent(GUIContext container) { | ||
container.addInputListener(new InputListener() { | ||
|
||
@Override | ||
public void touchUp(int screenX, int screenY, int pointer, int button) { | ||
mouseReleased(button, screenX, screenY); | ||
} | ||
|
||
@Override | ||
public void touchDragged(int screenX, int screenY, int pointer) { | ||
} | ||
|
||
@Override | ||
public void touchDown(int screenX, int screenY, int pointer, int button) { | ||
mousePressed(button, screenX, screenY); | ||
} | ||
|
||
@Override | ||
public void keyUp(int keycode) { | ||
} | ||
|
||
@Override | ||
public void keyType(char character) { | ||
} | ||
|
||
@Override | ||
public void keyDown(int keycode) { | ||
} | ||
}); | ||
} | ||
|
||
public abstract int getWidth(); | ||
|
||
public abstract int getHeight(); | ||
|
||
public abstract int getY(); | ||
|
||
public abstract int getX(); | ||
|
||
public abstract void mousePressed(int button, int x, int y); | ||
|
||
public abstract void mouseReleased(int button, int x, int y); | ||
|
||
public abstract void render(GUIContext container, Graphics g) throws SlickException; | ||
|
||
public abstract void setFocus(boolean focus); | ||
|
||
public abstract void setLocation(int x, int y); | ||
|
||
public void consumeEvent(){ | ||
|
||
} | ||
|
||
|
||
} |
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 fluddokt.opsu.fake.gui; | ||
|
||
import com.badlogic.gdx.utils.TimeUtils; | ||
|
||
import fluddokt.opsu.fake.Input; | ||
import fluddokt.opsu.fake.InputListener; | ||
|
||
public abstract class GUIContext { | ||
Input input = new Input(); | ||
public Input getInput() { | ||
return input; | ||
} | ||
|
||
public abstract void addInputListener(InputListener listener); | ||
public abstract void removeInputListener(InputListener listener); | ||
|
||
public long getTime() { | ||
return TimeUtils.millis(); | ||
} | ||
|
||
} |
Oops, something went wrong.