link controls auto-add click handler
This commit is contained in:
@@ -246,17 +246,7 @@ void show_dialog_action(std::string xml_file) {
|
||||
record_action("show_dialog_action", xml_file);
|
||||
}
|
||||
|
||||
cChoiceDlog dlog(xml_file);
|
||||
|
||||
// Dialogs with hyperlinks need special handling:
|
||||
if(xml_file == "about-boe"){
|
||||
dlog->attachClickHandlers([](cDialog& self, std::string clicked, eKeyMod) {
|
||||
launchURL(self[clicked].getText());
|
||||
return false;
|
||||
}, {"src", "issues"});
|
||||
}
|
||||
|
||||
dlog.show();
|
||||
cChoiceDlog(xml_file).show();
|
||||
}
|
||||
|
||||
bool prime_time() {
|
||||
|
@@ -689,15 +689,7 @@ void init_boe(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
void showWelcome() {
|
||||
if(recording){
|
||||
record_action("showWelcome", "");
|
||||
}
|
||||
cChoiceDlog welcome("welcome");
|
||||
welcome->attachClickHandlers([](cDialog& self, std::string clicked, eKeyMod) {
|
||||
launchURL(self[clicked].getText());
|
||||
return false;
|
||||
}, {"spidweb", "scen", "forum", "home", "src"});
|
||||
welcome.show();
|
||||
show_dialog_action("welcome");
|
||||
}
|
||||
|
||||
using Key = sf::Keyboard::Key;
|
||||
|
Reference in New Issue
Block a user