projects
/
sixth-3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Code refactoring
[sixth-3d.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
sixth
/
e3d
/
gui
/
textEditorComponent
/
TextEditComponent.java
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextEditComponent.java
b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextEditComponent.java
index
ee4def7
..
8e69c95
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextEditComponent.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextEditComponent.java
@@
-1,5
+1,5
@@
/*
/*
- * Sixth 3D engine. Copyright ©2012-20
18
, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-20
20
, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 3 of the GNU Lesser General Public License
@@
-47,8
+47,8
@@
public class TextEditComponent extends GuiComponent implements ClipboardOwner {
// initialize visual panel
// initialize visual panel
- final int columns = (int) (size.x / TextCanvas.FONT_CHAR_WIDTH);
- final int rows = (int) (size.y / TextCanvas.FONT_CHAR_HEIGHT);
+ final int columns = (int) (size.x / TextCanvas.FONT_CHAR_WIDTH
_PIXELS
);
+ final int rows = (int) (size.y / TextCanvas.FONT_CHAR_HEIGHT
_PIXELS
);
textCanvas = new TextCanvas(new Transform(), new TextPointer(rows,
columns), Color.WHITE, colorConfig.normalBack);
textCanvas = new TextCanvas(new Transform(), new TextPointer(rows,
columns), Color.WHITE, colorConfig.normalBack);
@@
-249,7
+249,7
@@
public class TextEditComponent extends GuiComponent implements ClipboardOwner {
* Parse key presses.
*/
@Override
* Parse key presses.
*/
@Override
- public
void
keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
+ public
boolean
keyPressed(final KeyEvent event, final ViewPanel viewPanel) {
super.keyPressed(event, viewPanel);
processKeyEvent(event);
super.keyPressed(event, viewPanel);
processKeyEvent(event);
@@
-259,6
+259,7
@@
public class TextEditComponent extends GuiComponent implements ClipboardOwner {
checkCursorBoundaries();
repaintWhatNeeded();
checkCursorBoundaries();
repaintWhatNeeded();
+ return true;
}
/**
}
/**