Fix goals game option not changing

This commit is contained in:
Sofia 2026-07-22 23:00:59 +03:00
parent 4bd34b4f50
commit 1dd5573729

View File

@ -167,14 +167,13 @@ impl IPanel for LobbyPanel {
spinbox.set_value(*value);
spinbox.set_editable(NetworkManager::singleton().bind().is_host());
let spinbox_clone = spinbox.clone();
let option = option.clone();
spinbox.signals().changed().connect_other(self, move |s| {
s.option_changed(
option,
GameOptionValue::Number(spinbox_clone.get_value()),
);
});
spinbox.signals().value_changed().connect_other(
self,
move |s, new_value| {
s.option_changed(option, GameOptionValue::Number(new_value));
},
);
spinbox.upcast()
}