Changeset - r209:a4234b5906f4
[Not reviewed]
master
0 1 0
signde - 20 years ago 2004-09-12 10:23:35
signde@openttd.org
(svn r210) -Fix: Console key closes window in front
-Fix: Console events were processed in wrong window
-Fix: Console unresponsive when you activated another window
1 file changed with 4 insertions and 2 deletions:
0 comments (0 inline, 0 general)
console.c
Show inline comments
 
@@ -63,10 +63,12 @@ SetWindowDirty(_iconsole_win);
 

	
 
static void IConsoleWndProc(Window *w, WindowEvent *e)
 
{
 
	// only do window events with the console
 
	w = FindWindowById(WC_CONSOLE, 0);
 

	
 
	switch(e->event) {
 

	
 
	case WE_PAINT:
 

	
 
		GfxFillRect(w->left,w->top,w->width,w->height-1,0);
 
		{
 
		int i=_iconsole_scroll;
 
@@ -252,7 +254,7 @@ void IConsoleSwitch()
 
		_iconsole_mode=ICONSOLE_OPENED;
 
		} else
 
	if (_iconsole_mode==ICONSOLE_OPENED) {
 
		DeleteWindow(_iconsole_win);
 
		DeleteWindowById(WC_CONSOLE,0);
 
		_iconsole_win=NULL;
 
		_iconsole_mode=ICONSOLE_CLOSED;
 
		}
0 comments (0 inline, 0 general)