Merge branch 'master' of https://github.com/wesnoth/wesnoth-old
This commit is contained in:
commit
dd33333f01
3 changed files with 89 additions and 81 deletions
|
@ -325,54 +325,82 @@
|
|||
[column]
|
||||
horizontal_alignment = "left"
|
||||
|
||||
[grid]
|
||||
[stacked_widget]
|
||||
|
||||
[row]
|
||||
[stack]
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_grow = "true"
|
||||
[layer]
|
||||
|
||||
[text_box]
|
||||
id = "url"
|
||||
definition = "default"
|
||||
label = ""
|
||||
[/text_box]
|
||||
[row]
|
||||
|
||||
[/column]
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "left"
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "right"
|
||||
[label]
|
||||
id = "url_none"
|
||||
label = _ "url^None"
|
||||
[/label]
|
||||
|
||||
[button]
|
||||
id = "url_copy"
|
||||
definition = "action_copy"
|
||||
label = _ "url^Copy"
|
||||
tooltip = _ "Copy this URL to clipboard"
|
||||
[/button]
|
||||
[/column]
|
||||
|
||||
[/column]
|
||||
[/row]
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "right"
|
||||
[/layer]
|
||||
|
||||
[button]
|
||||
id = "url_go"
|
||||
definition = "action_go"
|
||||
label = _ "url^Go"
|
||||
tooltip = _ "Visit this URL with a web browser"
|
||||
[/button]
|
||||
[layer]
|
||||
|
||||
[/column]
|
||||
[row]
|
||||
|
||||
[/row]
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_grow = "true"
|
||||
|
||||
[/grid]
|
||||
[text_box]
|
||||
id = "url"
|
||||
definition = "default"
|
||||
label = ""
|
||||
[/text_box]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "right"
|
||||
|
||||
[button]
|
||||
id = "url_copy"
|
||||
definition = "action_copy"
|
||||
label = _ "url^Copy"
|
||||
tooltip = _ "Copy this URL to clipboard"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "right"
|
||||
|
||||
[button]
|
||||
id = "url_go"
|
||||
definition = "action_go"
|
||||
label = _ "url^Go"
|
||||
tooltip = _ "Visit this URL with a web browser"
|
||||
[/button]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/layer]
|
||||
|
||||
[/stack]
|
||||
|
||||
[/stacked_widget]
|
||||
|
||||
[/column]
|
||||
|
||||
|
|
|
@ -91,23 +91,6 @@
|
|||
|
||||
[/row]
|
||||
|
||||
|
||||
[/grid]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
|
||||
horizontal_grow = "true"
|
||||
|
||||
[grid]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
|
@ -143,23 +126,6 @@
|
|||
|
||||
[/row]
|
||||
|
||||
|
||||
[/grid]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
|
||||
horizontal_grow = "true"
|
||||
|
||||
[grid]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
|
@ -193,18 +159,10 @@
|
|||
|
||||
[/column]
|
||||
[/row]
|
||||
[/grid]
|
||||
[/column]
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
grow_factor = 0
|
||||
[column]
|
||||
grow_factor = 1
|
||||
horizontal_grow = "true"
|
||||
[grid]
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
[column]
|
||||
grow_factor = 0
|
||||
border = "all"
|
||||
|
@ -215,6 +173,7 @@
|
|||
label = _ "Experience modifier:"
|
||||
[/label]
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
border = "all"
|
||||
|
@ -224,14 +183,17 @@
|
|||
id = "experience_modifier"
|
||||
definition = "default"
|
||||
best_slider_length = 250
|
||||
minimum_value = -1
|
||||
minimum_value = 30
|
||||
maximum_value = 200
|
||||
step_size = 1
|
||||
step_size = 5
|
||||
[/slider]
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
grow_factor = 1
|
||||
|
||||
[column]
|
||||
grow_factor = 0
|
||||
border = "all"
|
||||
|
@ -242,11 +204,13 @@
|
|||
label = _ "Turns:"
|
||||
[/label]
|
||||
[/column]
|
||||
|
||||
[column]
|
||||
grow_factor = 1
|
||||
border = "all"
|
||||
border_size = 5
|
||||
horizontal_alignment = "left"
|
||||
|
||||
[slider]
|
||||
id = "turns"
|
||||
definition = "default"
|
||||
|
@ -256,9 +220,13 @@
|
|||
step_size = 1
|
||||
[/slider]
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[/grid]
|
||||
|
||||
[/column]
|
||||
|
||||
[/row]
|
||||
|
||||
[row]
|
||||
|
|
|
@ -255,6 +255,10 @@ namespace gui2 {
|
|||
* Button for copying the add-on's feedback page URL to clipboard if
|
||||
* provided by the server. $
|
||||
*
|
||||
* url_none & & control & m &
|
||||
* Label displayed instead of the other url_* widgets when no URL is
|
||||
* provided by the server.
|
||||
*
|
||||
* @end{table}
|
||||
*/
|
||||
|
||||
|
@ -314,6 +318,8 @@ void taddon_description::copy_url_callback()
|
|||
|
||||
void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
||||
{
|
||||
tcontrol& url_none =
|
||||
find_widget<tcontrol>(&window, "url_none", false);
|
||||
tbutton& url_go_button =
|
||||
find_widget<tbutton>(&window, "url_go", false);
|
||||
tbutton& url_copy_button =
|
||||
|
@ -325,6 +331,8 @@ void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
|||
url_textbox.set_active(false);
|
||||
|
||||
if(!feedback_url_.empty()) {
|
||||
url_none.set_visible(tcontrol::tvisible::invisible);
|
||||
|
||||
connect_signal_mouse_left_click(url_go_button,
|
||||
boost::bind(&taddon_description::browse_url_callback, this));
|
||||
connect_signal_mouse_left_click(url_copy_button,
|
||||
|
@ -332,6 +340,10 @@ void taddon_description::pre_show(CVideo& /*video*/, twindow& window)
|
|||
} else {
|
||||
url_go_button.set_active(false);
|
||||
url_copy_button.set_active(false);
|
||||
|
||||
url_go_button.set_visible(tcontrol::tvisible::invisible);
|
||||
url_copy_button.set_visible(tcontrol::tvisible::invisible);
|
||||
url_textbox.set_visible(tcontrol::tvisible::invisible);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue