src/window.cpp
branchcpp_gui
changeset 6249 abafebc2fbce
parent 6248 24583caadfee
child 6250 5135b200b376
equal deleted inserted replaced
6248:24583caadfee 6249:abafebc2fbce
  1917 	REVERSED_FOR_ALL_WINDOWS(w) {
  1917 	REVERSED_FOR_ALL_WINDOWS(w) {
  1918 		w->CallEventNP(WE_TICK);
  1918 		w->CallEventNP(WE_TICK);
  1919 	}
  1919 	}
  1920 }
  1920 }
  1921 
  1921 
  1922 void DeleteNonVitalWindows(void)
  1922 void Window::DeleteNonVitalWindows(void)
  1923 {
  1923 {
  1924 
  1924 
  1925 restart_search:
  1925 restart_search:
  1926 	/* When we find the window to delete, we need to restart the search
  1926 	/* When we find the window to delete, we need to restart the search
  1927 	 * as deleting this window could cascade in deleting (many) others
  1927 	 * as deleting this window could cascade in deleting (many) others
  1945 /* It is possible that a stickied window gets to a position where the
  1945 /* It is possible that a stickied window gets to a position where the
  1946  * 'close' button is outside the gaming area. You cannot close it then; except
  1946  * 'close' button is outside the gaming area. You cannot close it then; except
  1947  * with this function. It closes all windows calling the standard function,
  1947  * with this function. It closes all windows calling the standard function,
  1948  * then, does a little hacked loop of closing all stickied windows. Note
  1948  * then, does a little hacked loop of closing all stickied windows. Note
  1949  * that standard windows (status bar, etc.) are not stickied, so these aren't affected */
  1949  * that standard windows (status bar, etc.) are not stickied, so these aren't affected */
  1950 void DeleteAllNonVitalWindows(void)
  1950 void Window::DeleteAllNonVitalWindows(void)
  1951 {
  1951 {
  1952 	/* Delete every window except for stickied ones, then sticky ones as well */
  1952 	/* Delete every window except for stickied ones, then sticky ones as well */
  1953 	DeleteNonVitalWindows();
  1953 	DeleteNonVitalWindows();
  1954 
  1954 
  1955 restart_search:
  1955 restart_search:
  1964 		}
  1964 		}
  1965 	}
  1965 	}
  1966 }
  1966 }
  1967 
  1967 
  1968 /* Delete all always on-top windows to get an empty screen */
  1968 /* Delete all always on-top windows to get an empty screen */
  1969 void HideVitalWindows(void)
  1969 void Window::HideVitalWindows(void)
  1970 {
  1970 {
  1971 	DeleteWindowById(WC_TOOLBAR_MENU, 0);
  1971 	DeleteWindowById(WC_TOOLBAR_MENU, 0);
  1972 	DeleteWindowById(WC_MAIN_TOOLBAR, 0);
  1972 	DeleteWindowById(WC_MAIN_TOOLBAR, 0);
  1973 	DeleteWindowById(WC_STATUS_BAR, 0);
  1973 	DeleteWindowById(WC_STATUS_BAR, 0);
  1974 }
  1974 }