From 983643bc5a87ef30d522613cc0a479392292d3a6 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 13 Jul 2005 14:38:26 +0000 Subject: Cache the blended background in a surface, so that the blending only needs to be made once, instead of whenever the console is redrawn. (This is the same trick as the About dialog uses.) It should speed up the drawing quite a bit, though it's not particularly noticeable on the computer I'm using at the moment, so I can't say for sure. svn-id: r18540 --- gui/console.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gui/console.h') diff --git a/gui/console.h b/gui/console.h index ac75e413d8..69b3f88d6a 100644 --- a/gui/console.h +++ b/gui/console.h @@ -43,6 +43,7 @@ public: typedef bool (*CompletionCallbackProc)(ConsoleDialog* console, const char *input, char*& completion, void *refCon); protected: + Graphics::Surface _canvas; char _buffer[kBufferSize]; int _linesInBuffer; @@ -92,9 +93,11 @@ public: ConsoleDialog(float widthPercent, float heightPercent); void open(); + void close(); void drawDialog(); void handleTickle(); + void handleScreenChanged(); void handleMouseWheel(int x, int y, int direction); void handleKeyDown(uint16 ascii, int keycode, int modifiers); void handleCommand(CommandSender *sender, uint32 cmd, uint32 data); -- cgit v1.2.3