Add close button to scenario window titlebar
This commit is contained in:
@@ -136,8 +136,7 @@ void Initialize(void) {
|
|||||||
|
|
||||||
windRect.inset((windRect.right - 584) / 2,(windRect.bottom - height) / 2);
|
windRect.inset((windRect.right - 584) / 2,(windRect.bottom - height) / 2);
|
||||||
windRect.offset(0,18);
|
windRect.offset(0,18);
|
||||||
// TODO: I think it should have a close button as well
|
mainPtr.create(sf::VideoMode(windRect.width(), windRect.height()), "Blades of Exile Scenario Editor", sf::Style::Titlebar | sf::Style::Close);
|
||||||
mainPtr.create(sf::VideoMode(windRect.width(), windRect.height()), "Blades of Exile Scenario Editor", sf::Style::Titlebar);
|
|
||||||
mainPtr.setPosition(windRect.topLeft());
|
mainPtr.setPosition(windRect.topLeft());
|
||||||
init_menubar();
|
init_menubar();
|
||||||
right_sbar_rect.top = RIGHT_AREA_UL_Y - 1;
|
right_sbar_rect.top = RIGHT_AREA_UL_Y - 1;
|
||||||
@@ -188,6 +187,12 @@ void Handle_One_Event() {
|
|||||||
mouse_button_held = false;
|
mouse_button_held = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case sf::Event::Closed:
|
||||||
|
if(!save_check("save-before-quit"))
|
||||||
|
break;
|
||||||
|
All_Done = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user