Added mobile copy/paste
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ allprojects {
|
|||||||
appName = 'Mindustry'
|
appName = 'Mindustry'
|
||||||
gdxVersion = '1.9.9'
|
gdxVersion = '1.9.9'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
uCoreVersion = '7eb80a9765557d025d589f28fa1910dffa3fc8ed'
|
uCoreVersion = '3dfb820142a0fc583ad19413a24fc5038aa29d89'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 195 B |
Binary file not shown.
|
After Width: | Height: | Size: 200 B |
+916
-926
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 103 KiB |
@@ -24,7 +24,6 @@ ButtonStyle: {
|
|||||||
},
|
},
|
||||||
TextButtonStyle: {
|
TextButtonStyle: {
|
||||||
default: {over: button-over, disabled: button, font: default-font, fontColor: white, disabledFontColor: gray, down: button-down, up: button},
|
default: {over: button-over, disabled: button, font: default-font, fontColor: white, disabledFontColor: gray, down: button-down, up: button},
|
||||||
left: {over: button-left-over, font: default-font, fontColor: white, disabledFontColor: gray, down: button-left-down, up: button-left},
|
|
||||||
right: {over: button-right-over, font: default-font, fontColor: white, disabledFontColor: gray, down: button-right-down, up: button-right},
|
right: {over: button-right-over, font: default-font, fontColor: white, disabledFontColor: gray, down: button-right-down, up: button-right},
|
||||||
wave: {font: default-font, fontColor: white, disabledFontColor: gray, up: button-edge-4},
|
wave: {font: default-font, fontColor: white, disabledFontColor: gray, up: button-edge-4},
|
||||||
clear: {over: flat-over, font: default-font, fontColor: white, disabledFontColor: gray, down: pane, up: flat},
|
clear: {over: flat-over, font: default-font, fontColor: white, disabledFontColor: gray, down: pane, up: flat},
|
||||||
|
|||||||
@@ -32,9 +32,22 @@ public abstract class Platform {
|
|||||||
dialog.setFillParent(true);
|
dialog.setFillParent(true);
|
||||||
dialog.content().top();
|
dialog.content().top();
|
||||||
dialog.content().defaults().height(65f);
|
dialog.content().defaults().height(65f);
|
||||||
|
|
||||||
|
TextField[] use = {null};
|
||||||
|
|
||||||
|
dialog.content().addImageButton("icon-copy", "clear", 16*3, () -> use[0].copy())
|
||||||
|
.visible(() -> !use[0].getSelection().isEmpty()).width(65f);
|
||||||
|
|
||||||
|
dialog.content().addImageButton("icon-paste", "clear", 16*3, () ->
|
||||||
|
use[0].paste(Gdx.app.getClipboard().getContents(), false))
|
||||||
|
.visible(() -> !Gdx.app.getClipboard().getContents().isEmpty()).width(65f);
|
||||||
|
|
||||||
TextField to = dialog.content().addField(field.getText(), t-> {}).pad(15).width(250f).get();
|
TextField to = dialog.content().addField(field.getText(), t-> {}).pad(15).width(250f).get();
|
||||||
to.setMaxLength(maxLength);
|
to.setMaxLength(maxLength);
|
||||||
to.keyDown(Keys.ENTER, () -> dialog.content().find("okb").fireClick());
|
to.keyDown(Keys.ENTER, () -> dialog.content().find("okb").fireClick());
|
||||||
|
|
||||||
|
use[0] = to;
|
||||||
|
|
||||||
dialog.content().addButton("$text.ok", () -> {
|
dialog.content().addButton("$text.ok", () -> {
|
||||||
field.clearText();
|
field.clearText();
|
||||||
field.appendText(to.getText());
|
field.appendText(to.getText());
|
||||||
|
|||||||
Reference in New Issue
Block a user