dialog: do not open dialog centered at 0x0
Character Editor[skill]: do not always display help, there is an help button...
This commit is contained in:
@@ -536,8 +536,8 @@ void cDialog::run(std::function<void(cDialog&)> onopen){
|
|||||||
view.setViewport(sf::FloatRect(0, 0, ui_scale, ui_scale));
|
view.setViewport(sf::FloatRect(0, 0, ui_scale, ui_scale));
|
||||||
win.setView(view);
|
win.setView(view);
|
||||||
|
|
||||||
// ASAN overflow
|
win.setPosition({std::max(0,parentPos.x + (int(parentSz.x) - wWidth) / 2),
|
||||||
win.setPosition({parentPos.x + (int(parentSz.x) - wWidth) / 2, parentPos.y + (int(parentSz.y) - wHeight) / 2});
|
std::max(0,parentPos.y + (int(parentSz.y) - wHeight) / 2)});
|
||||||
draw();
|
draw();
|
||||||
makeFrontWindow(parent ? parent-> win : mainPtr);
|
makeFrontWindow(parent ? parent-> win : mainPtr);
|
||||||
makeFrontWindow(win);
|
makeFrontWindow(win);
|
||||||
|
@@ -634,8 +634,6 @@ bool spend_xp(short pc_num, short mode, cDialog* parent) {
|
|||||||
xpDlog.attachClickHandlers(std::bind(spend_xp_navigate_filter,_1,_2,std::ref(save)),{"keep","cancel","left","right","help"});
|
xpDlog.attachClickHandlers(std::bind(spend_xp_navigate_filter,_1,_2,std::ref(save)),{"keep","cancel","left","right","help"});
|
||||||
xpDlog.attachClickHandlers(spend_xp_filter,{"sp-m","sp-p","hp-m","hp-p"});
|
xpDlog.attachClickHandlers(spend_xp_filter,{"sp-m","sp-p","hp-m","hp-p"});
|
||||||
|
|
||||||
give_help(10,11,xpDlog);
|
|
||||||
|
|
||||||
xpDlog.run();
|
xpDlog.run();
|
||||||
|
|
||||||
return xpDlog.getResult<bool>();
|
return xpDlog.getResult<bool>();
|
||||||
|
Reference in New Issue
Block a user