new toys :P
git-svn-id: svn://svn.icculus.org/netradiant/trunk@153 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
9ddf10f7d1
commit
c75a6b31c6
20
ChangeLog
20
ChangeLog
|
|
@ -1,3 +1,23 @@
|
||||||
|
2009-01-07 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
|
* radiant: handle ALL key binds properly using GDK methods
|
||||||
|
|
||||||
|
2009-01-03 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
|
* radiant: fix the translation of entities used by mirroring or scaling
|
||||||
|
|
||||||
|
2009-01-02 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
|
* radiant: command "regroup entities", allows moving brushes in/out of
|
||||||
|
entities
|
||||||
|
|
||||||
|
2009-01-01 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
|
* radiant: "clone selection" no longer changes targetnames by default.
|
||||||
|
Hold shift while pressing space to do change them as before.
|
||||||
|
* all: handle "origin" keys for brush entities (more consistency, should
|
||||||
|
break no maps)
|
||||||
|
|
||||||
|
2008-12-10 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
|
* radiant: properly handle the [ and ] keys on german layout
|
||||||
|
* q3map2: fix dotProduct2scale to match the documentation
|
||||||
|
|
||||||
2008-11-28 Rudolf Polzer divVerent(at)alientrap.org
|
2008-11-28 Rudolf Polzer divVerent(at)alientrap.org
|
||||||
* q3map2: -dirty: don't treat skybox surfaces as solid for dirtmapping;
|
* q3map2: -dirty: don't treat skybox surfaces as solid for dirtmapping;
|
||||||
prevents Quake 2-ish "dark near skybox" effect.
|
prevents Quake 2-ish "dark near skybox" effect.
|
||||||
|
|
|
||||||
|
|
@ -39,85 +39,26 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct SKeyInfo
|
|
||||||
{
|
|
||||||
const char* m_strName;
|
|
||||||
unsigned int m_nVKKey;
|
|
||||||
};
|
|
||||||
|
|
||||||
SKeyInfo g_Keys[] =
|
|
||||||
{
|
|
||||||
{"Space", GDK_space},
|
|
||||||
{"Backspace", GDK_BackSpace},
|
|
||||||
{"Escape", GDK_Escape},
|
|
||||||
{"End", GDK_End},
|
|
||||||
{"Insert", GDK_Insert},
|
|
||||||
{"Delete", GDK_Delete},
|
|
||||||
{"PageUp", GDK_Prior},
|
|
||||||
{"PageDown", GDK_Next},
|
|
||||||
{"Up", GDK_Up},
|
|
||||||
{"Down", GDK_Down},
|
|
||||||
{"Left", GDK_Left},
|
|
||||||
{"Right", GDK_Right},
|
|
||||||
{"F1", GDK_F1},
|
|
||||||
{"F2", GDK_F2},
|
|
||||||
{"F3", GDK_F3},
|
|
||||||
{"F4", GDK_F4},
|
|
||||||
{"F5", GDK_F5},
|
|
||||||
{"F6", GDK_F6},
|
|
||||||
{"F7", GDK_F7},
|
|
||||||
{"F8", GDK_F8},
|
|
||||||
{"F9", GDK_F9},
|
|
||||||
{"F10", GDK_F10},
|
|
||||||
{"F11", GDK_F11},
|
|
||||||
{"F12", GDK_F12},
|
|
||||||
{"Tab", GDK_Tab},
|
|
||||||
{"Return", GDK_Return},
|
|
||||||
{"Comma", GDK_comma},
|
|
||||||
{"Period", GDK_period},
|
|
||||||
{"Plus", GDK_KP_Add},
|
|
||||||
{"Multiply", GDK_multiply},
|
|
||||||
{"Minus", GDK_KP_Subtract},
|
|
||||||
{"NumPad0", GDK_KP_0},
|
|
||||||
{"NumPad1", GDK_KP_1},
|
|
||||||
{"NumPad2", GDK_KP_2},
|
|
||||||
{"NumPad3", GDK_KP_3},
|
|
||||||
{"NumPad4", GDK_KP_4},
|
|
||||||
{"NumPad5", GDK_KP_5},
|
|
||||||
{"NumPad6", GDK_KP_6},
|
|
||||||
{"NumPad7", GDK_KP_7},
|
|
||||||
{"NumPad8", GDK_KP_8},
|
|
||||||
{"NumPad9", GDK_KP_9},
|
|
||||||
{"[", GDK_bracketleft},
|
|
||||||
{"]", GDK_bracketright},
|
|
||||||
{"\\", 220},
|
|
||||||
{"Home", GDK_Home}
|
|
||||||
};
|
|
||||||
|
|
||||||
int g_nKeyCount = sizeof(g_Keys) / sizeof(SKeyInfo);
|
|
||||||
|
|
||||||
const char* global_keys_find(unsigned int key)
|
const char* global_keys_find(unsigned int key)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < g_nKeyCount; ++i)
|
const char *s;
|
||||||
{
|
if(key == 0)
|
||||||
if(g_Keys[i].m_nVKKey == key)
|
return "";
|
||||||
{
|
s = gdk_keyval_name(key);
|
||||||
return g_Keys[i].m_strName;
|
if(!s)
|
||||||
}
|
return "";
|
||||||
}
|
return s;
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int global_keys_find(const char* name)
|
unsigned int global_keys_find(const char* name)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < g_nKeyCount; ++i)
|
guint k;
|
||||||
{
|
if(!name || !*name)
|
||||||
if(string_equal_nocase(g_Keys[i].m_strName, name))
|
return 0;
|
||||||
{
|
k = gdk_keyval_from_name(name);
|
||||||
return g_Keys[i].m_nVKKey;
|
if(k == GDK_VoidSymbol)
|
||||||
}
|
return 0;
|
||||||
}
|
return k;
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void accelerator_write(const Accelerator& accelerator, TextOutputStream& ostream)
|
void accelerator_write(const Accelerator& accelerator, TextOutputStream& ostream)
|
||||||
|
|
|
||||||
|
|
@ -272,10 +272,6 @@ void SaveCommandMap(const char* path)
|
||||||
{
|
{
|
||||||
m_file << key;
|
m_file << key;
|
||||||
}
|
}
|
||||||
else if(accelerator.key != 0)
|
|
||||||
{
|
|
||||||
m_file << gdk_keyval_name(accelerator.key);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(accelerator.modifiers & GDK_MOD1_MASK)
|
if(accelerator.modifiers & GDK_MOD1_MASK)
|
||||||
{
|
{
|
||||||
|
|
@ -357,15 +353,6 @@ public:
|
||||||
accelerator.modifiers = (GdkModifierType)modifiers;
|
accelerator.modifiers = (GdkModifierType)modifiers;
|
||||||
|
|
||||||
|
|
||||||
// strBuff has been cleaned of it's modifiers .. switch between a regular key and a virtual one
|
|
||||||
// based on length
|
|
||||||
if(keyEnd - value == 1 && std::isalnum(value[0])) // most often case.. deal with first
|
|
||||||
{
|
|
||||||
accelerator.key = std::toupper(value[0]);
|
|
||||||
++m_count;
|
|
||||||
}
|
|
||||||
else // special key
|
|
||||||
{
|
|
||||||
CopiedString keyName(StringRange(value, keyEnd));
|
CopiedString keyName(StringRange(value, keyEnd));
|
||||||
accelerator.key = global_keys_find(keyName.c_str());
|
accelerator.key = global_keys_find(keyName.c_str());
|
||||||
if(accelerator.key != 0)
|
if(accelerator.key != 0)
|
||||||
|
|
@ -376,7 +363,11 @@ public:
|
||||||
{
|
{
|
||||||
globalOutputStream() << "WARNING: failed to parse user command " << makeQuoted(value) << ": unknown key " << makeQuoted(keyName.c_str()) << "\n";
|
globalOutputStream() << "WARNING: failed to parse user command " << makeQuoted(value) << ": unknown key " << makeQuoted(keyName.c_str()) << "\n";
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
accelerator.key = gdk_keyval_from_name(CopiedString(StringRange(value, keyEnd)).c_str());
|
||||||
|
if(accelerator.key == GDK_VoidSymbol)
|
||||||
|
accelerator.key = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::size_t count() const
|
std::size_t count() const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user