Easier okaying/cancelling for Property tool Window
This commit is contained in:
parent
34e2ec2459
commit
fcc17ee652
@ -23,6 +23,7 @@ public:
|
||||
PropertyWindow(PropertyTool * tool_, Simulation * sim_, ui::Point position_);
|
||||
void SetProperty();
|
||||
virtual void OnDraw();
|
||||
virtual void OnTryExit(ExitMethod method);
|
||||
virtual ~PropertyWindow() {}
|
||||
class OkayAction: public ui::ButtonAction
|
||||
{
|
||||
@ -59,6 +60,7 @@ position(position_)
|
||||
okayButton->Appearance.BorderInactive = ui::Colour(200, 200, 200);
|
||||
okayButton->SetActionCallback(new OkayAction(this));
|
||||
AddComponent(okayButton);
|
||||
SetOkayButton(okayButton);
|
||||
|
||||
property = new ui::DropDown(ui::Point(8, 25), ui::Point(Size.X-16, 17));
|
||||
AddComponent(property);
|
||||
@ -177,6 +179,12 @@ void PropertyWindow::SetProperty()
|
||||
}
|
||||
}
|
||||
|
||||
void PropertyWindow::OnTryExit(ExitMethod method)
|
||||
{
|
||||
ui::Engine::Ref().CloseWindow();
|
||||
SelfDestruct();
|
||||
}
|
||||
|
||||
void PropertyWindow::OnDraw()
|
||||
{
|
||||
Graphics * g = ui::Engine::Ref().g;
|
||||
|
Loading…
Reference in New Issue
Block a user