added play single move replay button with callbacks to the function in replay_controller

This commit is contained in:
Zappaman 2014-08-29 21:37:14 +03:00
parent d2dedd52de
commit e55e596c9d
11 changed files with 37 additions and 3 deletions

View File

@ -465,10 +465,25 @@
yanchor=fixed
[/action]
[/add]
[add]
[action]
id=button-nextmove
ref=button-nextside
type=image
image=button_square/button_square_30
overlay=icons/action/play_move_30
title= _ "Next Move"
tooltip= _ "play single move"
items=replaynextmove
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/action]
[/add]
[add]
[menu]
id=show-what
ref=button-nextside
ref=button-nextmove
image=button_normal/button_H22
title= _ "Point of view"
items=replayshowteam1,replayshoweach,replayshoweverything
@ -591,10 +606,24 @@
yanchor=fixed
[/action]
[/add]
[add]
[action]
id=button-nextmove
ref=button-nextside
type=image
image=classic/play-move
title= _ "Next Move"
tooltip= _ "play single move"
items=replaynextmove
rect="+4,=,+23,="
xanchor=fixed
yanchor=fixed
[/action]
[/add]
[add]
[menu]
id=show-what
ref=button-nextside
ref=button-nextmove
image=classic/lite
title= _ "Point of view"
items=replayshowteam1,replayshoweach,replayshoweverything

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 479 B

View File

@ -209,6 +209,9 @@ bool command_executor::execute_command(const hotkey_command& cmd, int /*index*/
case HOTKEY_REPLAY_NEXT_SIDE:
replay_next_side();
break;
case HOTKEY_REPLAY_NEXT_MOVE:
replay_next_move();
break;
case HOTKEY_REPLAY_SHOW_EVERYTHING:
replay_show_everything();
break;

View File

@ -84,6 +84,7 @@ public:
virtual void stop_replay() {}
virtual possible_end_play_signal replay_next_turn() { return boost::none; }
virtual possible_end_play_signal replay_next_side() { return boost::none; }
virtual possible_end_play_signal replay_next_move() { return boost::none; }
virtual void replay_show_everything() {}
virtual void replay_show_each() {}
virtual void replay_show_team1() {}

View File

@ -100,6 +100,7 @@ hotkey::hotkey_command_temp hotkey_list_[] = {
{ hotkey::HOTKEY_REPLAY_STOP, "stopreplay", N_("Stop Replay"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_NEXT_TURN, "replaynextturn", N_("Next Turn"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_NEXT_SIDE, "replaynextside", N_("Next Side"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_NEXT_MOVE, "replaynextmove", N_("Next Move"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_SHOW_EVERYTHING, "replayshoweverything", N_("Full Map"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_SHOW_EACH, "replayshoweach", N_("Each Team"), false, scope_game, "" },
{ hotkey::HOTKEY_REPLAY_SHOW_TEAM1, "replayshowteam1", N_("Team 1"), false, scope_game, "" },

View File

@ -56,7 +56,7 @@ enum HOTKEY_COMMAND {
// Replay
HOTKEY_REPLAY_PLAY, HOTKEY_REPLAY_RESET, HOTKEY_REPLAY_STOP, HOTKEY_REPLAY_NEXT_TURN,
HOTKEY_REPLAY_NEXT_SIDE, HOTKEY_REPLAY_SHOW_EVERYTHING,
HOTKEY_REPLAY_NEXT_SIDE, HOTKEY_REPLAY_NEXT_MOVE, HOTKEY_REPLAY_SHOW_EVERYTHING,
HOTKEY_REPLAY_SHOW_EACH, HOTKEY_REPLAY_SHOW_TEAM1,
HOTKEY_REPLAY_SKIP_ANIMATION,