mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Most remaining level editor work
This commit is contained in:
@@ -136,11 +136,6 @@ void HiliteWindow(WindowPtr window, bool highlighted)
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void DisposeWindow(WindowPtr window)
|
||||
{
|
||||
PL_NotYetImplemented();
|
||||
}
|
||||
|
||||
void GetWindowBounds(WindowPtr window, WindowRegionType windowRegion, Rect *rect)
|
||||
{
|
||||
if (windowRegion == kWindowContentRgn)
|
||||
@@ -204,11 +199,6 @@ void ShowWindow(WindowPtr window)
|
||||
PortabilityLayer::WindowManager::GetInstance()->ShowWindow(window);
|
||||
}
|
||||
|
||||
void SetWTitle(WindowPtr window, const PLPasStr &title)
|
||||
{
|
||||
PL_NotYetImplemented_TODO("Editor");
|
||||
}
|
||||
|
||||
long MenuSelect(Point point)
|
||||
{
|
||||
int16_t menuID = 0;
|
||||
@@ -760,6 +750,29 @@ PortabilityLayer::Widget* Window::GetWidgetById() const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool Window::ReplaceWidget(PortabilityLayer::Widget *oldWidget, PortabilityLayer::Widget *newWidget)
|
||||
{
|
||||
for (size_t i = 0; i < m_numWidgets; i++)
|
||||
{
|
||||
if (m_widgets[i] == oldWidget)
|
||||
{
|
||||
assert(newWidget->GetWindow() == nullptr);
|
||||
|
||||
oldWidget->Destroy();
|
||||
m_widgets[i] = newWidget;
|
||||
newWidget->m_window = this;
|
||||
|
||||
newWidget->DrawControl(&m_surface);
|
||||
m_surface.m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void Window::FocusWidget(PortabilityLayer::Widget *widget)
|
||||
{
|
||||
if (m_widgetWithFocus != widget)
|
||||
|
||||
Reference in New Issue
Block a user