-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
e77b254
commit 6d040e7
Showing
15 changed files
with
355 additions
and
68 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Manifest-Version: 1.0 | ||
Main-Class: com.tres.DesktopLauncher | ||
Class-Path: ashley-1.7.4.jar lwjgl-jemalloc-3.3.1-natives-macos.jar vis- | ||
ui-1.4.11.jar lwjgl-3.3.1-natives-windows.jar lwjgl-jemalloc-3.3.1-nati | ||
ves-linux.jar lwjgl-glfw-3.3.1-natives-macos-arm64.jar box2dlights-1.5. | ||
jar gdx-bullet-1.11.0.jar lwjgl-3.3.1-natives-linux-arm64.jar lwjgl-jem | ||
alloc-3.3.1-natives-windows.jar lwjgl-3.3.1-natives-linux.jar lwjgl-stb | ||
-3.3.1-natives-windows.jar jlayer-1.0.1-gdx.jar lwjgl-stb-3.3.1-natives | ||
-linux-arm32.jar lwjgl-glfw-3.3.1.jar lwjgl-jemalloc-3.3.1-natives-wind | ||
ows-x86.jar lwjgl-opengl-3.3.1-natives-linux-arm64.jar lwjgl-openal-3.3 | ||
.1-natives-macos-arm64.jar lwjgl-jemalloc-3.3.1.jar lwjgl-stb-3.3.1-nat | ||
ives-macos.jar discord-rpc.jar lwjgl-opengl-3.3.1-natives-macos-arm64.j | ||
ar lwjgl-3.3.1.jar lwjgl-glfw-3.3.1-natives-windows-x86.jar lwjgl-jemal | ||
loc-3.3.1-natives-linux-arm64.jar lwjgl-glfw-3.3.1-natives-windows.jar | ||
gdx-freetype-1.11.0.jar lwjgl-opengl-3.3.1-natives-windows-x86.jar lwjg | ||
l-openal-3.3.1-natives-macos.jar gdx-controllers-core-2.2.1.jar lwjgl-o | ||
penal-3.3.1.jar gdx-box2d-platform-1.11.0-natives-desktop.jar lwjgl-jem | ||
alloc-3.3.1-natives-linux-arm32.jar lwjgl-glfw-3.3.1-natives-macos.jar | ||
lwjgl-openal-3.3.1-natives-windows-x86.jar jbump-1.0.1.jar lwjgl-glfw-3 | ||
.3.1-natives-linux-arm32.jar lwjgl-3.3.1-natives-macos.jar jorbis-0.0.1 | ||
7.jar lwjgl-stb-3.3.1-natives-linux-arm64.jar lwjgl-openal-3.3.1-native | ||
s-linux.jar lwjgl-openal-3.3.1-natives-windows.jar lwjgl-opengl-3.3.1.j | ||
ar gdx-bullet-platform-1.11.0-natives-desktop.jar lwjgl-3.3.1-natives-l | ||
inux-arm32.jar lwjgl-stb-3.3.1-natives-linux.jar gdx-jnigen-loader-2.3. | ||
1.jar lwjgl-opengl-3.3.1-natives-linux.jar lwjgl-3.3.1-natives-macos-ar | ||
m64.jar gdx-ai-1.8.2.jar gdx-box2d-1.11.0.jar lwjgl-opengl-3.3.1-native | ||
s-linux-arm32.jar lwjgl-stb-3.3.1-natives-macos-arm64.jar lwjgl-stb-3.3 | ||
.1.jar lwjgl-openal-3.3.1-natives-linux-arm32.jar gdx-freetype-platform | ||
-1.11.0-natives-desktop.jar lwjgl-3.3.1-natives-windows-x86.jar gdx-bac | ||
kend-lwjgl3-1.11.0.jar lwjgl-openal-3.3.1-natives-linux-arm64.jar jamep | ||
ad-2.0.14.1.jar lwjgl-opengl-3.3.1-natives-windows.jar gdx-1.11.0.jar g | ||
dx-controllers-desktop-2.2.1.jar lwjgl-glfw-3.3.1-natives-linux-arm64.j | ||
ar gdx-platform-1.11.0-natives-desktop.jar lwjgl-opengl-3.3.1-natives-m | ||
acos.jar lwjgl-glfw-3.3.1-natives-linux.jar lwjgl-jemalloc-3.3.1-native | ||
s-macos-arm64.jar lwjgl-stb-3.3.1-natives-windows-x86.jar | ||
|
28 changes: 28 additions & 0 deletions
28
core/src/com/tres/network/packet/protocol/AvailableGamesPacket.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,28 @@ | ||
package com.tres.network.packet.protocol; | ||
|
||
import com.tres.network.packet.Clientbound; | ||
import com.tres.network.packet.DataPacket; | ||
import com.tres.network.packet.PacketDecoder; | ||
import com.tres.network.packet.PacketEncoder; | ||
|
||
public class AvailableGamesPacket extends DataPacket implements Clientbound { | ||
@Override | ||
protected void decodePayload(PacketDecoder in) throws Exception { | ||
|
||
} | ||
|
||
@Override | ||
protected void encodePayload(PacketEncoder out) throws Exception { | ||
|
||
} | ||
|
||
@Override | ||
public String getName() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public ProtocolIds getProtocolId() { | ||
return ProtocolIds.AVAILABLE_GAMES_PACKET; | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.tres; | ||
|
||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; | ||
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; | ||
|
||
public class ApplicationThread extends Thread { | ||
|
||
protected TresApplication application; | ||
|
||
protected Lwjgl3Application window; | ||
|
||
protected Lwjgl3ApplicationConfiguration configuration; | ||
|
||
protected boolean disposed; | ||
|
||
public ApplicationThread(TresApplication application, Lwjgl3ApplicationConfiguration configuration) { | ||
this.application = application; | ||
this.configuration = configuration; | ||
this.disposed = false; | ||
|
||
configuration.setForegroundFPS(this.application.getSettings().getForegroundFPS()); | ||
} | ||
|
||
@Override | ||
public void run() { | ||
this.window = new Lwjgl3Application(this.application, this.configuration); | ||
this.disposed = true; | ||
} | ||
|
||
public TresApplication getApplication() { | ||
return application; | ||
} | ||
|
||
public Lwjgl3ApplicationConfiguration getConfiguration() { | ||
return configuration; | ||
} | ||
|
||
public boolean isDisposed() { | ||
return disposed; | ||
} | ||
|
||
@Override | ||
public void interrupt() { | ||
super.interrupt(); | ||
|
||
if (this.window != null) { | ||
this.window.exit(); | ||
} | ||
} | ||
} |
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,4 @@ | ||
package com.tres.client.ui; | ||
|
||
public class ActorUtils { | ||
} |
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,28 @@ | ||
package com.tres.client.ui.actor; | ||
|
||
import com.badlogic.gdx.graphics.Color; | ||
import com.badlogic.gdx.graphics.g2d.Batch; | ||
import com.badlogic.gdx.graphics.g2d.BitmapFont; | ||
import com.badlogic.gdx.scenes.scene2d.Actor; | ||
|
||
public class TextActor extends Actor { | ||
|
||
protected CharSequence text; | ||
|
||
protected BitmapFont font; | ||
protected Color color; | ||
|
||
public TextActor(CharSequence text, BitmapFont font, Color color) { | ||
this.text = text; | ||
this.font = font; | ||
this.color = color; | ||
} | ||
|
||
@Override | ||
public void draw(Batch batch, float parentAlpha) { | ||
super.draw(batch, parentAlpha); | ||
|
||
this.font.setColor(this.color); | ||
this.font.draw(batch, this.text, getX(), getY()); | ||
} | ||
} |
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,6 @@ | ||
package com.tres.client.ui.actor; | ||
|
||
import com.badlogic.gdx.scenes.scene2d.Actor; | ||
|
||
public class ToggleButtonActor extends Actor { | ||
} |
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 com.tres.client.ui.layout; | ||
|
||
import com.badlogic.gdx.math.Vector2; | ||
import com.badlogic.gdx.scenes.scene2d.Actor; | ||
|
||
import java.util.ArrayList; | ||
|
||
abstract public class Layout { | ||
|
||
protected Vector2 position; | ||
protected int width; | ||
protected int height; | ||
|
||
protected ArrayList<Actor> actors; | ||
|
||
public Layout(Vector2 position, int width, int height) { | ||
this.position = position; | ||
this.width = width; | ||
this.height = height; | ||
|
||
this.actors = new ArrayList<>(); | ||
} | ||
|
||
abstract public void set(Actor actor, int index); | ||
|
||
public void add(Actor actor) { | ||
this.actors.add(actor); | ||
|
||
int index = 0; | ||
|
||
for (Actor e : this.actors) { | ||
this.set(e, index); | ||
|
||
index++; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.