-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
6b17c98
commit 72b132c
Showing
2 changed files
with
49 additions
and
29 deletions.
There are no files selected for viewing
29 changes: 23 additions & 6 deletions
29
src/bluearchive/ui/dialogs/ArchivDLive2DSelectionDialog.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 |
---|---|---|
@@ -1,26 +1,43 @@ | ||
package bluearchive.ui.dialogs; | ||
|
||
import arc.Core; | ||
import arc.scene.actions.Actions; | ||
import arc.scene.ui.*; | ||
import arc.scene.ui.layout.*; | ||
import bluearchive.ui.ArchivDBackground; | ||
import mindustry.gen.*; | ||
import mindustry.graphics.*; | ||
import mindustry.ui.*; | ||
|
||
|
||
public class ArchivDLive2DSelectionDialog extends Dialog { | ||
private static TextButton a,b,c; | ||
public ArchivDLive2DSelectionDialog() { | ||
super(); | ||
row(); | ||
add(Core.bundle.get("ba-caution")).color(Pal.techBlue).style(Styles.techLabel).fontScale(2f).row(); | ||
image(Tex.whiteui, Pal.techBlue).width(450f).height(3f).pad(4f).center().row(); | ||
add(Core.bundle.get("ba-caution-text")).style(Styles.defaultLabel).row(); | ||
TextButton a = button(Core.bundle.get("ba-l2dInstallLocally"), Icon.download, () -> { this.hide(); Core.settings.put("live2dinstalled", true);}).padLeft(8f).growX().padTop(3f).get(); | ||
row(); | ||
TextButton b = button(Core.bundle.get("ba-l2dInstallRepo"), Icon.download, ArchivDBackground::downloadLive2D).padLeft(8f).growX().padTop(3f).get(); | ||
row(); | ||
TextButton c = button(Core.bundle.get("cancel"), Icon.left, this::hide).padLeft(8f).padTop(3f).width(250f).get(); | ||
table(t -> { | ||
a = t.button(Core.bundle.get("ba-l2dInstallLocally"), Icon.download, () -> { this.hide(); Core.settings.put("live2dinstalled", true);}).padLeft(8f).padTop(3f).width(250f).get(); | ||
b = t.button(Core.bundle.get("ba-l2dInstallRepo"), Icon.download, ArchivDBackground::downloadLive2D).padLeft(8f).padTop(3f).width(250f).get(); | ||
c = t.button(Core.bundle.get("cancel"), Icon.left, this::hide).padLeft(8f).padTop(3f).width(250f).get(); | ||
}).center(); | ||
show(); | ||
} | ||
|
||
@Override | ||
public Dialog show() { | ||
a.actions(Actions.fadeIn(1f), Actions.visible(true)); | ||
b.actions(Actions.fadeIn(2f), Actions.visible(true)); | ||
c.actions(Actions.fadeIn(3f), Actions.visible(true)); | ||
return super.show(); | ||
} | ||
|
||
@Override | ||
public void hide() { | ||
a.clearActions(); | ||
b.clearActions(); | ||
c.clearActions(); | ||
super.hide(); | ||
} | ||
} |
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