mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-23 00:06:04 +00:00
# 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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user