Changeset - r12053:41146bdebc83
[Not reviewed]
master
0 2 0
alberth - 15 years ago 2009-05-30 11:30:25
alberth@openttd.org
(svn r16465) -Codechange: Eliminated GetGloballyFocusedWidget(), it was used only once.
2 files changed with 1 insertions and 11 deletions:
0 comments (0 inline, 0 general)
src/window.cpp
Show inline comments
 
@@ -112,22 +112,13 @@ void SetFocusedWindow(Window *w)
 
}
 

	
 
/**
 
 * Gets the globally focused widget. Which is the focused widget of the focused window.
 
 * @return A pointer to the globally focused Widget, or NULL if there is no globally focused widget.
 
 */
 
const Widget *GetGloballyFocusedWidget()
 
{
 
	return _focused_window != NULL ? _focused_window->focused_widget : NULL;
 
}
 

	
 
/**
 
 * Check if an edit box is in global focus. That is if focused window
 
 * has a edit box as focused widget, or if a console is focused.
 
 * @return returns true if an edit box is in global focus or if the focused window is a console, else false
 
 */
 
bool EditBoxInGlobalFocus()
 
{
 
	const Widget *wi = GetGloballyFocusedWidget();
 
	const Widget *wi = (_focused_window != NULL) ? _focused_window->focused_widget : NULL;
 

	
 
	/* The console does not have an edit box so a special case is needed. */
 
	return (wi != NULL && wi->type == WWT_EDITBOX) ||
src/window_gui.h
Show inline comments
 
@@ -657,7 +657,6 @@ enum SpecialMouseMode {
 
Window *GetCallbackWnd();
 

	
 
void SetFocusedWindow(Window *w);
 
const Widget *GetGloballyFocusedWidget();
 
bool EditBoxInGlobalFocus();
 

	
 
void ScrollbarClickHandler(Window *w, const Widget *wi, int x, int y);
0 comments (0 inline, 0 general)