fixed theme bug and updated replay in dfool theme

This commit is contained in:
John W. C. McNabb 2005-12-14 18:39:22 +00:00
parent b3128abe01
commit 2bcd3491af
4 changed files with 130 additions and 99 deletions

View file

@ -557,7 +557,6 @@ height=768
[/menu]
[/add]
[/replay]
[/resolution]

View file

@ -80,23 +80,12 @@ height=768
yanchor=bottom
[/panel]
[panel]
id=replay-panel
image=misc/top-bg.png
ref=top-panel
rect="=,+0,+882,+26"
xanchor=left
yanchor=fixed
[/panel]
{themes/macros.cfg}
{REPLAY_THEME}
[main_map]
id=main-map
rect="=,+0,+882,768"
xanchor=left
yanchor=top
ref=replay-panel
ref=top-panel
[/main_map]
[mini_map]
@ -517,6 +506,134 @@ height=768
[/unit_advancement_options]
[/status]
[replay]
[change]
id=main-map
ref=top-panel
rect="=,+26,+882,768"
[/change]
[add]
[panel]
id=replay-panel
image=misc/top-bg.png
ref=top-panel
rect="=,+0,+882,+26"
xanchor=left
yanchor=fixed
[/panel]
[/add]
[add]
[label]
id=replay-label
text= _ "Replay"
ref=replay-panel
rect="=+3,=+1,+60,=-4"
xanchor=fixed
yanchor=fixed
[/label]
[/add]
[add]
[menu]
id=button-playreplay
ref=replay-label
type=image
image=play
title= _ "Play"
items=playreplay
rect="+4,=-2,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=button-stopreplay
ref=button-playreplay
type=image
image=pause
title= _ "Stop"
items=stopreplay
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=button-resetreplay
ref=button-stopreplay
type=image
image=stop
title= _ "Reset"
items=resetreplay
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=button-nextturn
ref=button-resetreplay
type=image
image=fast-fwd
title= _ "Next Turn"
items=replaynextturn
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=button-nextside
ref=button-nextturn
type=image
image=frame-fwd
title= _ "Next Side"
items=replaynextside
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=check-shroud
ref=button-nextside
type=checkbox
title= _ "Shroud"
items=replayswitchshroud
rect="+15,=+3,+180,+10"
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=check-fog
ref=check-shroud
type=checkbox
title= _ "Fog"
items=replayswitchfog
rect="+5,=,+80,+10"
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[add]
[menu]
id=skip-animation
ref=check-fog
type=checkbox
title= _ "Skip animation"
items=replayskipanimation
rect="+5,=,+80,+10"
xanchor=fixed
yanchor=fixed
[/menu]
[/add]
[/replay]
[/resolution]
[partialresolution]

View file

@ -1,87 +1,2 @@
#define REPLAY_THEME
[label]
id=replay-label
text= _ "Replay"
ref=replay-panel
rect="=+3,=+1,+60,=-4"
xanchor=fixed
yanchor=fixed
[/label]
[menu]
id=button-playreplay
type=image
image=play
title= _ "Play"
items=playreplay
rect="+4,=-1,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=button-stopreplay
type=image
image=pause
title= _ "Stop"
items=stopreplay
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=button-resetreplay
type=image
image=stop
title= _ "Reset"
items=resetreplay
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=button-nextturn
type=image
image=fast-fwd
title= _ "Next Turn"
items=replaynextturn
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=button-nextside
type=image
image=frame-fwd
title= _ "Next Side"
items=replaynextside
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=check-shroud
type=checkbox
title= _ "Shroud"
items=replayswitchshroud
rect="+15,=+3,+180,+10"
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=check-fog
type=checkbox
title= _ "Fog"
items=replayswitchfog
rect="+5,=,+80,+10"
xanchor=fixed
yanchor=fixed
[/menu]
[menu]
id=skip-animation
type=checkbox
title= _ "Skip animation"
items=replayskipanimation
rect="+5,=,+80,+10"
xanchor=fixed
yanchor=fixed
[/menu]
#enddef

View file

@ -827,7 +827,7 @@ bool show_theme_dialog(display& disp)
if(options.size()){
std::string current_theme=_("Saved Theme Preference: ")+preferences::theme();
action = gui::show_dialog(disp,NULL,"",current_theme,gui::OK_CANCEL,&options);
if(action == 0){
if(action >= 0){
preferences::set_theme(options[action]);
//it would be preferable for the new theme to take effect
//immediately, however, this will have to do for now.