mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
More window chrome improvements
This commit is contained in:
@@ -244,12 +244,12 @@ void OpenLinkWindow (void)
|
||||
basicState.m_text.Set(4, "Link");
|
||||
basicState.m_window = linkWindow;
|
||||
|
||||
linkControl = PortabilityLayer::ButtonWidget::Create(basicState);
|
||||
linkControl = PortabilityLayer::ButtonWidget::Create(basicState, nullptr);
|
||||
|
||||
basicState.m_rect = Rect::Create(5, 5, 25, 59);
|
||||
basicState.m_text.Set(6, "Unlink");
|
||||
basicState.m_window = linkWindow;
|
||||
unlinkControl = PortabilityLayer::ButtonWidget::Create(basicState);
|
||||
unlinkControl = PortabilityLayer::ButtonWidget::Create(basicState, nullptr);
|
||||
|
||||
linkWindow->DrawControls();
|
||||
|
||||
|
@@ -430,7 +430,7 @@ void OpenMapWindow (void)
|
||||
state.m_window = mapWindow;
|
||||
state.m_max = kMaxNumRoomsH - mapRoomsWide;
|
||||
state.m_state = mapLeftRoom;
|
||||
mapHScroll = PortabilityLayer::ScrollBarWidget::Create(state);
|
||||
mapHScroll = PortabilityLayer::ScrollBarWidget::Create(state, nullptr);
|
||||
}
|
||||
|
||||
if (mapHScroll == nil)
|
||||
@@ -443,7 +443,7 @@ void OpenMapWindow (void)
|
||||
state.m_window = mapWindow;
|
||||
state.m_max = kMaxNumRoomsV - mapRoomsHigh;
|
||||
state.m_state = mapTopRoom;
|
||||
mapVScroll = PortabilityLayer::ScrollBarWidget::Create(state);
|
||||
mapVScroll = PortabilityLayer::ScrollBarWidget::Create(state, nullptr);
|
||||
}
|
||||
|
||||
if (mapVScroll == nil)
|
||||
|
@@ -474,7 +474,7 @@ void DoRoomInfo(void)
|
||||
state.m_resID = kBackgroundsMenuID;
|
||||
state.m_enabled = true;
|
||||
|
||||
PortabilityLayer::PopupMenuWidget *roomPopupWidget = PortabilityLayer::PopupMenuWidget::Create(state);
|
||||
PortabilityLayer::PopupMenuWidget *roomPopupWidget = PortabilityLayer::PopupMenuWidget::Create(state, nullptr);
|
||||
roomInfoDialog->ReplaceWidget(kRoomPopupItem - 1, roomPopupWidget);
|
||||
|
||||
if (HouseHasOriginalPicts())
|
||||
|
@@ -17,6 +17,7 @@
|
||||
#include "Externs.h"
|
||||
#include "Environ.h"
|
||||
#include "House.h"
|
||||
#include "WindowManager.h"
|
||||
|
||||
|
||||
#define kMainPrefsDialID 1012
|
||||
@@ -1237,6 +1238,10 @@ void DoSettingsMain (void)
|
||||
|
||||
leaving = false;
|
||||
nextRestartChange = false;
|
||||
|
||||
Window* exclWindow = prefDlg->GetWindow();
|
||||
|
||||
PortabilityLayer::WindowManager::GetInstance()->SwapExclusiveWindow(exclWindow); // Push exclusive window
|
||||
|
||||
while (!leaving)
|
||||
{
|
||||
@@ -1284,7 +1289,9 @@ void DoSettingsMain (void)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PortabilityLayer::WindowManager::GetInstance()->SwapExclusiveWindow(exclWindow); // Pop exclusive window
|
||||
|
||||
prefDlg->Destroy();
|
||||
|
||||
if (nextRestartChange)
|
||||
|
@@ -330,7 +330,7 @@ void OpenToolsWindow (void)
|
||||
state.m_resID = 141;
|
||||
state.m_window = toolsWindow;
|
||||
|
||||
classPopUp = PortabilityLayer::PopupMenuWidget::Create(state);
|
||||
classPopUp = PortabilityLayer::PopupMenuWidget::Create(state, nullptr);
|
||||
}
|
||||
|
||||
toolsWindow->DrawControls();
|
||||
|
@@ -18,6 +18,7 @@
|
||||
|
||||
|
||||
WindowPtr mssgWindow;
|
||||
WindowPtr mssgWindowExclusiveStack;
|
||||
|
||||
|
||||
//============================================================== Functions
|
||||
@@ -129,6 +130,10 @@ void OpenMessageWindow (const PLPasStr &title)
|
||||
|
||||
surface->SetSystemFont(12, 0);
|
||||
}
|
||||
|
||||
mssgWindowExclusiveStack = mssgWindow;
|
||||
|
||||
wm->SwapExclusiveWindow(mssgWindowExclusiveStack); // Push exclusive window
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- SetMessageWindowMessage
|
||||
@@ -161,6 +166,11 @@ void SetMessageWindowMessage (StringPtr message, const PortabilityLayer::RGBACol
|
||||
|
||||
void CloseMessageWindow (void)
|
||||
{
|
||||
PortabilityLayer::WindowManager::GetInstance()->SwapExclusiveWindow(mssgWindowExclusiveStack); // Pop exclusive window
|
||||
assert(mssgWindowExclusiveStack == mssgWindow);
|
||||
|
||||
mssgWindowExclusiveStack = nullptr;
|
||||
|
||||
CloseThisWindow(&mssgWindow);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user