Hey,
i’ve had troubles with the copy paste functionality.
So i saw the following line commented out in Screen.java:
[java]
@Override
public void setClipboardText(String text) {
…
// clipboard.setContents(stringSelection, this);
…
}
[/java]
I guess that is WIP so i’m just using the (placeholder?) variable clipboardText of Screen:
[java]
@Override
public void setClipboardText(String text) {
this.clipboardText = text;
}
[/java]
Works for the moment.
Another issue was CTRL+X and CTRL+A not working … as it is not yet implemented. Suggestion as follows in TextField.java:
[java]
@Override
public void onKeyPress(KeyInputEvent evt)
{
…
if (ctrl)
{
if (evt.getKeyCode() == KeyInput.KEY_C)
{
if (copy)
screen.setClipboardText(textRangeText);
}
else if (evt.getKeyCode() == KeyInput.KEY_V)
{
if (paste)
this.pasteTextInto();
}
else if (evt.getKeyCode() == KeyInput.KEY_A)
{
selectTextRangeAll();
}
else if (evt.getKeyCode() == KeyInput.KEY_X)
{
if (copy)
{
screen.setClipboardText(textRangeText);
this.setText("");
}
}
}
…
}
[/java]
…
Yep.