Re: [Celestia-developers] Key binding
Real-time 3D visualization of space
Status: Beta
Brought to you by:
cjlaurel
From: Hank R. <hr...@qw...> - 2006-09-26 19:07:49
|
I think the problem is not so much the use of single-byte chars as the failure to cleanly separate the input device events from the associated actions. (Note that not all keyboard input is handled in charEntered.) Beyond that there is the problem of limiting the available actions to an enumerated set of built-in functions. This allows existing functions to be reassigned, but does not allow for new user-defined functions to be added. Lua gives you both. - Hank On Sep 26, 2006, at 11:28 AM, Pat Suwalski wrote: > ElChristou wrote: >> All the doom like games (if I'm not wrong) allows the gamers to map >> the keys >> as they want; a similar system could not be implemented? > > This is where my idea works. If we replace code like: > > appCore->charEntered("C"); > > with: > > appCore->inputEvent(CENTER); > > Then the front-end could easily map CENTER to be anything it wants > without the silliness of single-byte chars. > > Updating the code would be trivial to maintain existing functionality. > Adding the sort of functionality you speak of would then be possible. > > --Pat > |