mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-27 16:34:38 +00:00
Fix no-PCH builds and checkrefs following a4852c4c01
Fixes D2814 / a4852c4c01.
Differential Revision: https://code.wildfiregames.com/D3123
This was SVN commit r24222.
This commit is contained in:
@@ -19,11 +19,14 @@
|
|||||||
|
|
||||||
#include "CHotkeyPicker.h"
|
#include "CHotkeyPicker.h"
|
||||||
|
|
||||||
|
#include "gui/ObjectBases/IGUIObject.h"
|
||||||
#include "lib/timer.h"
|
#include "lib/timer.h"
|
||||||
|
#include "ps/CLogger.h"
|
||||||
#include "ps/Hotkey.h"
|
#include "ps/Hotkey.h"
|
||||||
#include "ps/KeyName.h"
|
#include "ps/KeyName.h"
|
||||||
#include "scriptinterface/ScriptConversions.h"
|
#include "scriptinterface/ScriptConversions.h"
|
||||||
|
|
||||||
|
|
||||||
const CStr CHotkeyPicker::EventNameCombination = "Combination";
|
const CStr CHotkeyPicker::EventNameCombination = "Combination";
|
||||||
const CStr CHotkeyPicker::EventNameKeyChange = "KeyChange";
|
const CStr CHotkeyPicker::EventNameKeyChange = "KeyChange";
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,12 @@
|
|||||||
#ifndef INCLUDED_CHOTKEYPICKER
|
#ifndef INCLUDED_CHOTKEYPICKER
|
||||||
#define INCLUDED_CHOTKEYPICKER
|
#define INCLUDED_CHOTKEYPICKER
|
||||||
|
|
||||||
|
#include "gui/CGUI.h"
|
||||||
#include "lib/external_libraries/libsdl.h"
|
#include "lib/external_libraries/libsdl.h"
|
||||||
#include "ps/CStr.h"
|
#include "ps/CStr.h"
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
class ScriptInterface;
|
class ScriptInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ static const std::unordered_map<int, std::vector<CStr>> scancodemap {{
|
|||||||
{ UNIFIED_SUPER, { "Super", "Left Gui", "Right Gui" } },
|
{ UNIFIED_SUPER, { "Super", "Left Gui", "Right Gui" } },
|
||||||
}};
|
}};
|
||||||
|
|
||||||
SDL_Scancode FindScancode(const CStr& keyname)
|
SDL_Scancode FindScancode(const CStr8& keyname)
|
||||||
{
|
{
|
||||||
// Find (ignoring case) a corresponding scancode, if one exists.
|
// Find (ignoring case) a corresponding scancode, if one exists.
|
||||||
std::unordered_map<int, std::vector<CStr>>::const_iterator it =
|
std::unordered_map<int, std::vector<CStr>>::const_iterator it =
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
class CStr8;
|
class CStr8;
|
||||||
|
|
||||||
extern SDL_Scancode FindScancode(const CStr& keyname);
|
extern SDL_Scancode FindScancode(const CStr8& keyname);
|
||||||
// Map a scancode to a locale-independent scancode name.
|
// Map a scancode to a locale-independent scancode name.
|
||||||
extern CStr8 FindScancodeName(SDL_Scancode scancode);
|
extern CStr8 FindScancodeName(SDL_Scancode scancode);
|
||||||
// Map a scancode to a locale-dependent key name (to show the user).
|
// Map a scancode to a locale-dependent key name (to show the user).
|
||||||
|
|||||||
@@ -19,14 +19,16 @@
|
|||||||
|
|
||||||
#include "JSInterface_Hotkey.h"
|
#include "JSInterface_Hotkey.h"
|
||||||
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include "lib/external_libraries/libsdl.h"
|
#include "lib/external_libraries/libsdl.h"
|
||||||
|
#include "ps/CLogger.h"
|
||||||
#include "ps/Hotkey.h"
|
#include "ps/Hotkey.h"
|
||||||
#include "ps/KeyName.h"
|
#include "ps/KeyName.h"
|
||||||
#include "scriptinterface/ScriptConversions.h"
|
#include "scriptinterface/ScriptConversions.h"
|
||||||
|
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an unordered map to a JS object, mapping keys to values.
|
* Convert an unordered map to a JS object, mapping keys to values.
|
||||||
* Assumes T to have a c_str() method that returns a const char*
|
* Assumes T to have a c_str() method that returns a const char*
|
||||||
|
|||||||
@@ -435,7 +435,8 @@ sub add_gui_xml
|
|||||||
{
|
{
|
||||||
push @files, $f;
|
push @files, $f;
|
||||||
|
|
||||||
if ($f =~ /^gui\/page_/)
|
# GUI page definitions are assumed to be named page_[something].xml and alone in that.
|
||||||
|
if ($f =~ /\/page_[^.\/]+\.xml$/)
|
||||||
{
|
{
|
||||||
push @roots, $f;
|
push @roots, $f;
|
||||||
my $xml = XMLin(vfs_to_physical($f), ForceArray => [qw(include)], KeyAttr => []) or die "Failed to parse '$f': $!";
|
my $xml = XMLin(vfs_to_physical($f), ForceArray => [qw(include)], KeyAttr => []) or die "Failed to parse '$f': $!";
|
||||||
|
|||||||
Reference in New Issue
Block a user