-
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
Showing
4 changed files
with
10 additions
and
21 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 |
---|---|---|
|
@@ -155,3 +155,5 @@ gradle-app.setting | |
.DS_Store | ||
Thumbs.db | ||
android/libs/ | ||
.vscode/settings.json | ||
.gitignore |
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 |
---|---|---|
|
@@ -12,6 +12,7 @@ repositories{ | |
|
||
java{ | ||
targetCompatibility = 8 | ||
|
||
sourceCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
|
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,36 +1,18 @@ | ||
package example; | ||
|
||
import arc.*; | ||
import arc.util.*; | ||
import mindustry.*; | ||
import mindustry.content.*; | ||
import mindustry.game.EventType.*; | ||
import mindustry.gen.*; | ||
import mindustry.mod.*; | ||
import mindustry.ui.dialogs.*; | ||
|
||
public class ExampleJavaMod extends Mod{ | ||
|
||
public ExampleJavaMod(){ | ||
Log.info("Loaded ExampleJavaMod constructor."); | ||
|
||
//listen for game load event | ||
Events.on(ClientLoadEvent.class, e -> { | ||
//show dialog upon startup | ||
Time.runTask(10f, () -> { | ||
BaseDialog dialog = new BaseDialog("frog"); | ||
dialog.cont.add("behold").row(); | ||
//mod sprites are prefixed with the mod name (this mod is called 'example-java-mod' in its config) | ||
dialog.cont.image(Core.atlas.find("example-java-mod-frog")).pad(20f).row(); | ||
dialog.cont.button("I see", dialog::hide).size(100f, 50f); | ||
dialog.show(); | ||
}); | ||
}); | ||
} | ||
|
||
@Override | ||
public void loadContent(){ | ||
Log.info("Loading some example content."); | ||
|
||
|
||
} | ||
|
||
|
||
} |