예제 #1
0
파일: helper.cpp 프로젝트: aquileia/wesnoth
game_logic::map_formula_callable get_screen_size_variables()
{
	game_logic::map_formula_callable result;
	get_screen_size_variables(result);

	return result;
}
예제 #2
0
widget* builder_spacer::build() const
{
	spacer* widget = new spacer();

	init_control(widget);

	const game_logic::map_formula_callable& size = get_screen_size_variables();

	const unsigned width = width_(size);
	const unsigned height = height_(size);

	if(width || height) {
		widget->set_best_size(point(width, height));
	}

	DBG_GUI_G << "Window builder: placed spacer '" << id
			  << "' with definition '" << definition << "'.\n";

	return widget;
}
예제 #3
0
twidget* tbuilder_drawing::build() const
{
	tdrawing* widget = new tdrawing();

	init_control(widget);

	const game_logic::map_formula_callable& size = get_screen_size_variables();

	const unsigned w = width(size);
	const unsigned h = height(size);

	if(w || h) {
		widget->set_best_size(tpoint(w, h));
	}

	widget->canvas().front().set_cfg(draw);

	DBG_GUI_G << "Window builder: placed drawing '" << id
			  << "' with definition '" << definition << "'.\n";

	return widget;
}