projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added showing virtual keyboard for playfield text input in editor (Android)
[rocksndiamonds.git]
/
src
/
editor.c
diff --git
a/src/editor.c
b/src/editor.c
index c993b6ea5803e052b90f3a1fb037dff3cf60e0e1..33e9dae57b849717be477ced9c6deb1acb9c2490 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-12376,6
+12376,8
@@
static int DrawLevelText(int sx, int sy, char letter, int mode)
case TEXT_SETCURSOR:
DrawEditorElement(last_sx, last_sy, Feld[lx][ly]);
DrawAreaBorder(sx, sy, sx, sy);
case TEXT_SETCURSOR:
DrawEditorElement(last_sx, last_sy, Feld[lx][ly]);
DrawAreaBorder(sx, sy, sx, sy);
+ StartTextInput(SX + sx * ed_tilesize, SY + sy * ed_tilesize,
+ ed_tilesize, ed_tilesize);
last_sx = sx;
last_sy = sy;
break;
last_sx = sx;
last_sy = sy;
break;
@@
-12411,7
+12413,7
@@
static int DrawLevelText(int sx, int sy, char letter, int mode)
break;
case TEXT_NEWLINE:
break;
case TEXT_NEWLINE:
- if (sy + 1 < ed_fieldy
- 1 && ly + 1 < lev_fieldy - 1
)
+ if (sy + 1 < ed_fieldy
&& ly + 1 < lev_fieldy
)
DrawLevelText(start_sx, sy + 1, 0, TEXT_SETCURSOR);
else
DrawLevelText(0, 0, 0, TEXT_END);
DrawLevelText(start_sx, sy + 1, 0, TEXT_SETCURSOR);
else
DrawLevelText(0, 0, 0, TEXT_END);
@@
-12420,6
+12422,7
@@
static int DrawLevelText(int sx, int sy, char letter, int mode)
case TEXT_END:
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
DrawEditorElement(sx, sy, Feld[lx][ly]);
case TEXT_END:
CopyLevelToUndoBuffer(UNDO_IMMEDIATE);
DrawEditorElement(sx, sy, Feld[lx][ly]);
+ StopTextInput();
typing = FALSE;
break;
typing = FALSE;
break;