boe.party.cpp: fix target display in pick_spell
winutil.mac.mm: check that session is initialised.
This commit is contained in:
@@ -1979,7 +1979,7 @@ eSpell pick_spell(short pc_num,eSkill type) { // 70 - no spell OW spell num
|
||||
cDialog castSpell("cast-spell");
|
||||
|
||||
castSpell.attachClickHandlers(std::bind(pick_spell_caster, _1, _2, type, std::ref(dark), std::ref(former_spell)), {"caster1","caster2","caster3","caster4","caster5","caster6"});
|
||||
castSpell.attachClickHandlers(std::bind(pick_spell_target,_1,_2, type, dark, former_spell), {"target1","target2","target3","target4","target5","target6"});
|
||||
castSpell.attachClickHandlers(std::bind(pick_spell_target,_1,_2, type, std::ref(dark), former_spell), {"target1","target2","target3","target4","target5","target6"});
|
||||
castSpell.attachClickHandlers(std::bind(pick_spell_event_filter, _1, _2, type, former_spell), {"other", "help"});
|
||||
castSpell["cast"].attachClickHandler(std::bind(finish_pick_spell, _1, false, former_target, std::ref(former_spell), type));
|
||||
castSpell["cancel"].attachClickHandler(std::bind(finish_pick_spell, _1, true, former_target, std::ref(former_spell), type));
|
||||
|
@@ -108,11 +108,13 @@ ModalSession::ModalSession(sf::Window& win, sf::Window& /*parent*/) {
|
||||
}
|
||||
|
||||
ModalSession::~ModalSession() {
|
||||
if (!session) return;
|
||||
NSModalSession nsHandle = (NSModalSession)session;
|
||||
[[NSApplication sharedApplication] endModalSession: nsHandle];
|
||||
}
|
||||
|
||||
void ModalSession::pumpEvents() {
|
||||
if (!session) return;
|
||||
NSModalSession nsHandle = (NSModalSession)session;
|
||||
[[NSApplication sharedApplication] runModalSession: nsHandle];
|
||||
}
|
||||
|
Reference in New Issue
Block a user