Fixes to split toolbar

This commit is contained in:
pelya
2014-06-02 01:58:58 +03:00
parent 9923ecfed0
commit 9bdda2756b
3 changed files with 11 additions and 2 deletions

View File

@@ -1897,7 +1897,7 @@ struct MainToolbarWindow : Window {
ShowLandInfo(tile);
break;
default: NOT_REACHED();
default: return; //NOT_REACHED();
}
}
@@ -2099,7 +2099,7 @@ static const NWidgetPart _nested_toolbar_vertical_right_widgets[] = {
static WindowDesc _toolb_vertical_right_desc(
WDP_MANUAL, NULL, 22, 480,
WC_MAIN_TOOLBAR, WC_NONE,
WC_MAIN_TOOLBAR_RIGHT, WC_NONE,
WDF_NO_FOCUS,
_nested_toolbar_vertical_right_widgets, lengthof(_nested_toolbar_vertical_right_widgets),
&MainToolbarWindow::hotkeys

View File

@@ -1222,6 +1222,7 @@ static inline bool IsVitalWindow(const Window *w)
{
switch (w->window_class) {
case WC_MAIN_TOOLBAR:
case WC_MAIN_TOOLBAR_RIGHT:
case WC_STATUS_BAR:
case WC_NEWS_WINDOW:
case WC_SEND_NETWORK_MSG:
@@ -3373,6 +3374,7 @@ restart_search:
void HideVitalWindows()
{
DeleteWindowById(WC_MAIN_TOOLBAR, 0);
DeleteWindowById(WC_MAIN_TOOLBAR_RIGHT, 0);
DeleteWindowById(WC_STATUS_BAR, 0);
}

View File

@@ -52,6 +52,13 @@ enum WindowClass {
*/
WC_MAIN_TOOLBAR,
/**
* Right part of split main toolbar; %Window numbers:
* - 0 = #ToolbarNormalWidgets
* - 0 = #ToolbarEditorWidgets
*/
WC_MAIN_TOOLBAR_RIGHT,
/**
* Statusbar (at the bottom of your screen); %Window numbers:
* - 0 = #StatusbarWidgets