summaryrefslogtreecommitdiff
path: root/main_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-02-21 18:59:54 +0000
committerDarkvater <Darkvater@openttd.org>2005-02-21 18:59:54 +0000
commitfb78ca8a62c69a51903416f5a4062a8972c1e98d (patch)
treeac473756965e88790f53e13ff4589035499ce9c1 /main_gui.c
parentf13bfccc37237e612d1eb5194d41246072bbc20f (diff)
downloadopenttd-fb78ca8a62c69a51903416f5a4062a8972c1e98d.tar.xz
(svn r1894) - Codechange: cleaned up the console a bit, wholly unified handling of text with that of editboxes
- Codechange: Introduction of Textbuf struct which not only holds physical data as length but also pixel-constrains (width) and information about the caret - Codechange: Move Clipboard function to OS specific file. Currently only Windows has clipboard actions - Feature: Editboxes, console and exit screen also accept the numeric-enter as a yes - Feature: Navigation through text with cursor keys is possible, as well as arbitrary insertion (also paste) and deletion; both backspace and del keys. Functions DeleteTextBufferChar, InsertTextBufferChar and InsertTextBufferClipboard handle input and deletion. Navigation is done through MoveTextBufferPos. - Fix: OTTD crash when opening 'add server' editbox - CodeChange: fix up some stringwidth calculations in gfx.c. You can get the width in pixels of a character by calling GetCharacterWidth().
Diffstat (limited to 'main_gui.c')
-rw-r--r--main_gui.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main_gui.c b/main_gui.c
index a6be5e26a..869ad9bbe 100644
--- a/main_gui.c
+++ b/main_gui.c
@@ -2252,7 +2252,7 @@ static const int8 scrollamt[16][2] = {
void HandleKeyScrolling(void)
{
- if (_dirkeys && _iconsole_win == NULL) {
+ if (_dirkeys && _iconsole_win == NULL && _editbox_win == NULL) {
int factor = _shift_pressed ? 50 : 10;
ScrollMainViewport(scrollamt[_dirkeys][0] * factor, scrollamt[_dirkeys][1] * factor);
}