# Various hotkey fixes and cleanups.

Support ctrl for removing entities from selection.
Move big screenshot hotkey to shift+F2.
Increase mouse wheel rotation speed.
Fix HotkeyIsPressed when a more specific hotkey was matched instead.
Support multiple hotkeys with the same binding.
Use hotkeys instead of raw key events in GUI.
Delete some obsolete hotkey definitions.
Remove unused broken EntitySelection toggle method.

This was SVN commit r8546.
This commit is contained in:
Ykkrosh
2010-11-07 20:42:52 +00:00
parent a13836bd68
commit e43eb0c18b
10 changed files with 194 additions and 213 deletions
+7
View File
@@ -33,6 +33,7 @@
#include "ps/CConsole.h"
#include "ps/Errors.h"
#include "ps/Game.h"
#include "ps/Hotkey.h"
#include "ps/Overlay.h"
#include "ps/Pyrogenesis.h"
#include "ps/GameSetup/Atlas.h"
@@ -322,6 +323,11 @@ void CameraFollowFPS(void* UNUSED(cbdata), entity_id_t entityid)
g_Game->GetView()->CameraFollow(entityid, true);
}
bool HotkeyIsPressed_(void* UNUSED(cbdata), std::string hotkeyName)
{
return HotkeyIsPressed(hotkeyName);
}
void SetSimRate(void* UNUSED(cbdata), float rate)
{
g_Game->SetSimRate(rate);
@@ -403,6 +409,7 @@ void GuiScriptingInit(ScriptInterface& scriptInterface)
scriptInterface.RegisterFunction<CScriptVal, std::wstring, &LoadMapSettings>("LoadMapSettings");
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollow>("CameraFollow");
scriptInterface.RegisterFunction<void, entity_id_t, &CameraFollowFPS>("CameraFollowFPS");
scriptInterface.RegisterFunction<bool, std::string, &HotkeyIsPressed_>("HotkeyIsPressed");
// Development/debugging functions
scriptInterface.RegisterFunction<void, float, &SetSimRate>("SetSimRate");