mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-12 17:39:08 +00:00
Forgot to document a new function,
...added documentation renamed it and did some minor cleanups.
This commit is contained in:
parent
f2f84a592a
commit
dc4ed7241b
@ -532,7 +532,7 @@ void tlistbox::trow::init_in_grid(tgrid* grid,
|
||||
}
|
||||
} else if(panel) {
|
||||
panel->set_callback_mouse_left_click(callback_select_list_item);
|
||||
panel->set_data(data);
|
||||
panel->set_members(data);
|
||||
} else if(child_grid) {
|
||||
init_in_grid(child_grid, data);
|
||||
} else {
|
||||
|
@ -39,15 +39,15 @@
|
||||
|
||||
namespace gui2 {
|
||||
|
||||
void ttoggle_panel::set_data(const std::map<std::string /* widget id */, std::map<
|
||||
void ttoggle_panel::set_members(const std::map<std::string /* widget id */, std::map<
|
||||
std::string /* member id */, t_string /* member value */> >& data)
|
||||
{
|
||||
// typedef boost problem work around.
|
||||
typedef std::pair<std::string, std::map<std::string, t_string> > hack ;
|
||||
foreach(const hack& item, data) {
|
||||
tcontrol* widget = dynamic_cast<tcontrol*>(find_widget(item.first, false));
|
||||
if(widget) {
|
||||
widget->set_members(item.second);
|
||||
tcontrol* control = dynamic_cast<tcontrol*>(find_widget(item.first, false));
|
||||
if(control) {
|
||||
control->set_members(item.second);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,15 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void set_data(const std::map<std::string /* widget id */, std::map<
|
||||
/**
|
||||
* Sets the members of the child controls.
|
||||
*
|
||||
* Sets the members for all controls which have the proper member id. See
|
||||
* tcontrol::set_members for more info.
|
||||
*
|
||||
* @param data Map with the key value pairs to set the members.
|
||||
*/
|
||||
void set_members(const std::map<std::string /* widget id */, std::map<
|
||||
std::string /* member id */, t_string /* member value */> >& data);
|
||||
|
||||
/***** ***** ***** ***** Inherited ***** ***** ***** *****/
|
||||
|
Loading…
x
Reference in New Issue
Block a user