aboutsummaryrefslogtreecommitdiff
path: root/gui/console.h
diff options
context:
space:
mode:
authorMax Horn2006-09-16 15:19:23 +0000
committerMax Horn2006-09-16 15:19:23 +0000
commit1add07becae0179e026a90924b419b74ffb1078f (patch)
treee65b6ba0264822f2addd19feedb7225c0a3c22cc /gui/console.h
parenta2dc897fe58e5521361a07b1e39a8b4c84d0dacf (diff)
downloadscummvm-rg350-1add07becae0179e026a90924b419b74ffb1078f.tar.gz
scummvm-rg350-1add07becae0179e026a90924b419b74ffb1078f.tar.bz2
scummvm-rg350-1add07becae0179e026a90924b419b74ffb1078f.zip
Renamed kLineWidth to kCharsPerLine, and moved some enum constants into class ConsoleDialog (to avoid name clashes with other code)
svn-id: r23889
Diffstat (limited to 'gui/console.h')
-rw-r--r--gui/console.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/console.h b/gui/console.h
index 8d81d26e03..d6ac4e3350 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -29,14 +29,6 @@
namespace GUI {
-enum {
- kBufferSize = 32768,
- kLineWidth = 128,
- kLineBufferSize = 256,
-
- kHistorySize = 20
-};
-
class ScrollBarWidget;
class ConsoleDialog : public Dialog {
@@ -45,6 +37,14 @@ public:
typedef bool (*CompletionCallbackProc)(ConsoleDialog* console, const char *input, char*& completion, void *refCon);
protected:
+ enum {
+ kBufferSize = 32768,
+ kCharsPerLine = 128,
+ kLineBufferSize = 256,
+
+ kHistorySize = 20
+ };
+
const Graphics::Font *_font;
char _buffer[kBufferSize];
@@ -131,7 +131,7 @@ protected:
void init();
- int pos2line(int pos) { return (pos - (_scrollLine - _linesPerPage + 1) * kLineWidth) / kLineWidth; }
+ int pos2line(int pos) { return (pos - (_scrollLine - _linesPerPage + 1) * kCharsPerLine) / kCharsPerLine; }
void drawLine(int line, bool restoreBg = true);
void drawCaret(bool erase);