mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-14 12:51:07 +00:00
Remove register_bool2.
The function register_bool now has the same interface so removed the duplicate and modify all its callers.
This commit is contained in:
parent
12c17f7675
commit
44d5432e7d
@ -103,14 +103,6 @@ tfield_bool* tdialog::register_bool(const std::string& id
|
||||
return field;
|
||||
}
|
||||
|
||||
tfield_bool* tdialog::register_bool2(const std::string& id
|
||||
, const bool mandatory
|
||||
, bool& linked_variable
|
||||
, void (*callback_change) (twidget* widget))
|
||||
{
|
||||
return register_bool(id, mandatory, linked_variable, callback_change);
|
||||
}
|
||||
|
||||
tfield_integer* tdialog::register_integer(
|
||||
const std::string& id
|
||||
, const bool mandatory
|
||||
|
@ -215,26 +215,6 @@ protected:
|
||||
, bool& linked_variable
|
||||
, void (*callback_change) (twidget* widget) = NULL);
|
||||
|
||||
/**
|
||||
* Creates a new boolean field.
|
||||
*
|
||||
* The field created is owned by tdialog, the returned pointer can be used
|
||||
* in the child classes as access to a field.
|
||||
*
|
||||
* @param id Id of the widget, same value as in WML.
|
||||
* @param mandatory Is the widget mandatory or optional.
|
||||
* @param linked_variable The variable the widget is linked to. See
|
||||
* @ref tfield::tfield for more information.
|
||||
* @param callback_change When the value of the widget changes this
|
||||
* callback is called.
|
||||
*
|
||||
* @returns Pointer to the created widget.
|
||||
*/
|
||||
tfield_bool* register_bool2(const std::string& id
|
||||
, const bool mandatory
|
||||
, bool& linked_variable
|
||||
, void (*callback_change) (twidget* widget) = NULL);
|
||||
|
||||
/**
|
||||
* Creates a new integer field.
|
||||
*
|
||||
|
@ -49,7 +49,7 @@ REGISTER_DIALOG(edit_label)
|
||||
tedit_label::tedit_label(std::string& label, bool& team_only)
|
||||
{
|
||||
register_text2("label", true, label, true);
|
||||
register_bool2("team_only_toggle", true, team_only);
|
||||
register_bool("team_only_toggle", true, team_only);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ tgame_save_oos::tgame_save_oos(
|
||||
register_label2("lblTitle", true, title);
|
||||
register_label2("txtFilename", false, filename);
|
||||
register_label2("lblMessage", true, message);
|
||||
register_bool2("ignore_all", true, ignore_all);
|
||||
register_bool("ignore_all", true, ignore_all);
|
||||
}
|
||||
|
||||
} // namespace gui2
|
||||
|
Loading…
x
Reference in New Issue
Block a user