Changeset - r1112:29f31a89e49d
[Not reviewed]
master
0 1 0
darkvater - 20 years ago 2005-01-23 13:42:26
darkvater@openttd.org
(svn r1613) -Fix: WE_CLICK event is not called on default actions. If special action is needed, use the other events like WE_RESIZE or WE_DESTROY, etc.
1 file changed with 9 insertions and 4 deletions:
0 comments (0 inline, 0 general)
window.c
Show inline comments
 
@@ -54,17 +54,22 @@ void DispatchLeftClickEvent(Window *w, i
 
				return;
 
			}
 

	
 
			if (e.click.widget == 1) /* 'Title bar' */
 
				StartWindowDrag(w);
 
			if (e.click.widget == 1) { /* 'Title bar' */
 
				StartWindowDrag(w); // if not return then w = StartWindowDrag(w); to get correct pointer
 
				return;
 
			}
 
		}
 

	
 
		if (w->desc_flags & WDF_RESIZABLE && wi->type == WWT_RESIZEBOX)
 
			w = StartWindowSizing(w);
 
		if (w->desc_flags & WDF_RESIZABLE && wi->type == WWT_RESIZEBOX) {
 
			StartWindowSizing(w); // if not return then w = StartWindowSizing(w); to get correct pointer
 
			return;
 
		}
 

	
 
		if (w->desc_flags & WDF_STICKY_BUTTON && wi->type == WWT_STICKYBOX) {
 
			TOGGLEBIT(w->click_state, e.click.widget);
 
			w->flags4 ^= WF_STICKY;
 
			InvalidateWidget(w, e.click.widget);
 
			return;
 
		}
 
	}
 

	
0 comments (0 inline, 0 general)