move hotkeys into game.cfg since english.cfg is not read any more
- prevents segfault when no hotkeys are found
This commit is contained in:
parent
74da1074dd
commit
6347bddaab
4 changed files with 172 additions and 172 deletions
169
data/game.cfg
169
data/game.cfg
|
@ -82,6 +82,175 @@
|
|||
|
||||
[/game_config]
|
||||
|
||||
[hotkey]
|
||||
command=preferences
|
||||
key=p
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=undo
|
||||
key=u
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=redo
|
||||
key=r
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=recruit
|
||||
key=r
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=repeatrecruit
|
||||
key=r
|
||||
ctrl=yes
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=recall
|
||||
key=r
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=cycle
|
||||
key=n
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=endunitturn
|
||||
key=" "
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=leader
|
||||
key=l
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomin
|
||||
key=z
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomout
|
||||
key=x
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomdefault
|
||||
key=c
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=fullscreen
|
||||
key=f
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=accelerated
|
||||
key=a
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=resistance
|
||||
key=d
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=describeunit
|
||||
key=d
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=renameunit
|
||||
key=n
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=terraintable
|
||||
key=t
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=save
|
||||
key=s
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=load
|
||||
key=l
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=statustable
|
||||
key=s
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=endturn
|
||||
key=e
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=togglegrid
|
||||
key=g
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=mute
|
||||
key=m
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=labelterrain
|
||||
key=l
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=showenemymoves
|
||||
key=v
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=bestenemymoves
|
||||
key=b
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=toggleshroud
|
||||
key=k
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=updateshroud
|
||||
key=k
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speak
|
||||
key=m
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=continue
|
||||
key=t
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=search
|
||||
key=/
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speaktoally
|
||||
key=m
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speaktoall
|
||||
key=m
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=help
|
||||
key=F1
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=command
|
||||
key=;
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
|
||||
[campaign]
|
||||
id=heir_throne
|
||||
icon=konrad-commander.png
|
||||
|
|
|
@ -2,175 +2,6 @@
|
|||
id=en
|
||||
language="English"
|
||||
|
||||
[hotkey]
|
||||
command=preferences
|
||||
key=p
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=undo
|
||||
key=u
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=redo
|
||||
key=r
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=recruit
|
||||
key=r
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=repeatrecruit
|
||||
key=r
|
||||
ctrl=yes
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=recall
|
||||
key=r
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=cycle
|
||||
key=n
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=endunitturn
|
||||
key=" "
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=leader
|
||||
key=l
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomin
|
||||
key=z
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomout
|
||||
key=x
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=zoomdefault
|
||||
key=c
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=fullscreen
|
||||
key=f
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=accelerated
|
||||
key=a
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=resistance
|
||||
key=d
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=describeunit
|
||||
key=d
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=renameunit
|
||||
key=n
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=terraintable
|
||||
key=t
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=save
|
||||
key=s
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=load
|
||||
key=l
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=statustable
|
||||
key=s
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=endturn
|
||||
key=e
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=togglegrid
|
||||
key=g
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=mute
|
||||
key=m
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=labelterrain
|
||||
key=l
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=showenemymoves
|
||||
key=v
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=bestenemymoves
|
||||
key=b
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=toggleshroud
|
||||
key=k
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=updateshroud
|
||||
key=k
|
||||
ctrl=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speak
|
||||
key=m
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=continue
|
||||
key=t
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=search
|
||||
key=/
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speaktoally
|
||||
key=m
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=speaktoall
|
||||
key=m
|
||||
alt=yes
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=help
|
||||
key=F1
|
||||
[/hotkey]
|
||||
[hotkey]
|
||||
command=command
|
||||
key=;
|
||||
shift=yes
|
||||
[/hotkey]
|
||||
|
||||
game_title= _ "The Battle for Wesnoth"
|
||||
version= _ "Version"
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "game_config.hpp"
|
||||
#include "game_events.hpp"
|
||||
#include "gamestatus.hpp"
|
||||
#include "hotkeys.hpp"
|
||||
#include "key.hpp"
|
||||
#include "language.hpp"
|
||||
#include "log.hpp"
|
||||
|
@ -538,6 +539,8 @@ int play_game(int argc, char** argv)
|
|||
|
||||
game_config::load_config(game_config.child("game_config"));
|
||||
|
||||
hotkey::add_hotkeys(game_config,false);
|
||||
|
||||
const binary_paths_manager bin_paths_manager(game_config);
|
||||
|
||||
std::cerr << "parsed config files\n";
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
*/
|
||||
#include "config.hpp"
|
||||
#include "font.hpp"
|
||||
#include "hotkeys.hpp"
|
||||
#include "language.hpp"
|
||||
#include "preferences.hpp"
|
||||
#include "util.hpp"
|
||||
|
@ -136,8 +135,6 @@ bool internal_set_language(const language_def& locale, config& cfg)
|
|||
strings_[j->first] = j->second;
|
||||
}
|
||||
|
||||
hotkey::add_hotkeys(**i,false);
|
||||
|
||||
font::set_font((**i)["font"]);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue