Commit Graph

59 Commits

Author SHA1 Message Date
Walter Korman fbb5fb841a Don't post the key press command when the repeat interval fires if the key
has been released.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2165 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-16 21:18:02 +00:00
Walter Korman 0a5104a70c Allow specifying the rate at which individual key presses are to be
repeated.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2133 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-14 00:53:38 +00:00
Walter Korman 7953fb0b24 Oops; use the install target as the main target so that we only rebuild
things when it's actually necessary to do so.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2112 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 02:06:10 +00:00
Walter Korman 786f6f8a63 Build the native linux keyboard library as part of the normal compilation
task and place it in dist/lib/i686-Linux.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2111 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 02:04:19 +00:00
Walter Korman 494fc1a620 Ignore the dll.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2108 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 01:19:05 +00:00
Walter Korman de6c4371b9 Initial version of linux (working) and Windows (not yet working) native
libraries for enabling and disabling keyboard auto-repeat.  Restored
auto-repeating in our own KeyboardManager, and disabled the interval used
to differentiate between a "real" and "fake" key repeat since we believe
we can now do without it.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2107 542714f4-19e9-0310-aa3c-eee0fc999fb1
2003-01-12 00:26:39 +00:00
Walter Korman 3d2e98f7da Fixed typo in comments. Tried to resist due to negligibility of typo, but
the perfectionist in me got the better of, me.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2061 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:27:25 +00:00
Michael Bayne d6f5a4da4d Added support for fully qualified translation messages which will be
fetched from the message bundle embedded in the fully qualified key even
if they are being translated within the context of another message bundle.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2060 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-12-12 22:24:51 +00:00
Michael Bayne 58d728aa91 Log a stack trace if we're missing a translation message so that it's easy
to track down the offender.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1933 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-12 08:18:03 +00:00
Michael Bayne 80b97158d2 Don't attempt further translation on tainted arguments in compound
translation keys. They might contain | which would cause xlate() to think
that they were another compound key.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1931 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-10 03:14:45 +00:00
Ray Greenwell 800a3e8a80 Don't swallow keys unless we dispatched them to a puzzle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1928 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-08 08:17:35 +00:00
Walter Korman dea46e4cc0 Assume the keyboard focus, or relinquish it, when we're enabled or
disabled respectively.  Sanity-check before adding ourselves as a window
focus listener when enabled to make sure we don't add ourselves more than
once.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1890 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-04 22:28:58 +00:00
Walter Korman 7b9f0332f1 Cleaned things up so that a single keyboard manager is to be constructed
and used throughout an application that cares to make use of its
functionality.  Allow registering key observers that are notified of all
key presses while the keyboard manager is active.  Clear things out
properly when the keyboard manager is disabled or reset.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1884 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-02 00:59:00 +00:00
Michael Bayne b07fef8396 Added support for a global message bundle to which other bundles fall back
if they can't find a message in their own list of strings.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1876 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-11-01 00:01:37 +00:00
Ray Greenwell 316634eb58 report idle / disconnected times when whispering.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1865 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-30 01:47:12 +00:00
Michael Bayne 4bababc95e Removed smoothing for the time being. Now a key up registers immediately,
but we are saddled with the key repeat delay for rapid sideways movement.
This will eventually all change when we have native libraries for turning
off key repeat.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1797 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-10-09 08:17:02 +00:00
Michael Bayne e8c7ba6084 Not to freak out if some unruly caller sends us null arguments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1648 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-08-16 19:31:39 +00:00
Michael Bayne eb0f92fcef Brought things into line with new streaming world order.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1607 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-23 05:54:53 +00:00
Walter Korman 627ee5a1db Javadoc fixes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1557 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-07-02 23:15:53 +00:00
Michael Bayne e75ae89f22 Various and sundry modifications to clean up orientation handling and add
support for 16 orientations in situations where it is merited.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1548 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 23:53:07 +00:00
Michael Bayne c3bbaa3e40 Modified getDirection() to use arc tangent so that it maps angles smoothly
to their nearest compass direction instead of the wacky way it did before.
Also added getFineDirection() along with rotateCW() and rotateCCW() to
rotate through (fine) directions (though coarse directions can be rotated
as well, simply by always requesting two ticks of rotation). Also wrote
some test code to make sure everything works.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1545 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:54:56 +00:00
Michael Bayne 5124b68339 Added fine compass directions (NNW, ENE, etc.).
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1544 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-06-26 02:37:18 +00:00
Michael Bayne b07fbe123b Added mechanism for fetching resource strings that doesn't complain when
they don't exist.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1390 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-24 20:33:30 +00:00
Michael Bayne 9bb8f1b524 Moved routines to calculate orientation from point a toward point b into
DirectionUtil.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1373 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-17 21:12:14 +00:00
Walter Korman f0ebe247e4 Fixed javadoc typo.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1349 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-08 21:15:26 +00:00
Ray Greenwell 9503d37d90 added getResourceString() which actually gets the business from
the ResourceBundle, making this class easy to extend...


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1323 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 03:39:13 +00:00
Michael Bayne e13f354672 Oops, forgot that ResourceBundle throws a MissingResourceException rather
than returning null. Whee!


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1322 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 02:47:18 +00:00
Michael Bayne 3f91aed3aa Added code to allow the creation of custom message bundles to go along
with a particular bundle's translation files. Mainly so Ray can do his
funny business with the pirate message translations.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1321 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-05-01 02:45:00 +00:00
Michael Bayne d026daa466 Not to choke if we can't resolve a resource bundle.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1320 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-30 17:45:27 +00:00
Michael Bayne 06f8a68b56 Moved RandomUtil from media.util to util.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1248 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 18:18:20 +00:00
Michael Bayne c078f34cef Code and documentation reparations, per Mr. Greenwell.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1242 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-15 17:13:38 +00:00
Michael Bayne 8a36a11a1d Moved CompiledConfig stuff into narya because it's generally useful.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1173 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-04-02 01:55:26 +00:00
Michael Bayne 95ed4b001d Minor edit.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1164 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 21:52:41 +00:00
Walter Korman a76d37cc27 Added a variant of tcompose() that takes an array of string arguments.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1156 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-27 07:09:04 +00:00
Walter Korman de0a6b70a8 Added codes for left/right, clockwise/counter-clockwise, and
horizontal/vertical.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1148 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-26 01:31:15 +00:00
Michael Bayne 974d0ebccb Wrap the ClassNotFoundException in an IOException.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1103 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 08:30:05 +00:00
Michael Bayne c2baccf5ba Abstracted code that parses XML configuration definitions into Java
objects which are then serialized for rapid loading and simple utilization
by the client and server; created serialized config services for our
character component constraints (what components are available at
character creation time, etc.).


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1101 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-08 06:15:21 +00:00
Walter Korman 001932b5a5 Added tcompose() that calls the various permutations of compose() whilst
automatically tainting the arguments for yon intrepid programmer.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1082 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-03-01 17:10:30 +00:00
Michael Bayne d3e5912ef5 Javadoc edits.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1080 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-28 23:16:42 +00:00
Michael Bayne 6c8f613050 Fixed up xlate() to support recursive composed translations by providing a
method for composing a translation key and arguments into a single string
which is later decoded by the call to xlate(). This also requires that
unsafe strings (those entered by the user which should not be translated)
be marked with the new taint() method so that xlate() knows not to try to
translate those when it is recursively translating everything in sight.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1079 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-28 23:13:54 +00:00
Michael Bayne 2c50369bd3 Comment reformatting; added xlate() which is like the get() variants
except that it extracts the translation string key and arguments from a
compound key which is a tab-separated list of strings.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@976 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-02-09 01:35:26 +00:00
Michael Bayne 617d0e8cb0 Initial revision of localization support classes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@893 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-29 20:44:35 +00:00
Walter Korman 4653b0b0a7 Absorb key-typed events and be more cautious about when to dispatch key
events.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@880 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 06:07:20 +00:00
Walter Korman e2fbfdf38c Reworked focus handling so that the keyboard manager only loses focus when
(a) the target component is removed, or (b) the window containing the
target component loses focus.  Moreover, the keyboard manager now steals
keys from any other components (explicitly irrespective of the AWT or
Swing notion of keyboard focus) via the KeyboardFocusManager as long as
it's enabled and has the focus as previously defined.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@875 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-19 01:19:56 +00:00
Walter Korman 2f4ef45546 Initial version.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@874 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:58:27 +00:00
Walter Korman 0f27719f0e Repackaged keyboard manager related classes for their new location in
com.threerings.util.  Moved RobotPlayer into util package from yohoho.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@873 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:32:15 +00:00
Walter Korman bbce846874 Whitespace changes.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@872 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-18 23:12:09 +00:00
Walter Korman 5deda8b1f8 Added getFloat().
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@855 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-15 18:05:01 +00:00
Walter Korman 4e3d7d9ece Properly handle a key press followed by seemingly-impossibly-fast,
night-instant key release.  Added optional debug logging of key events at
the KeyboardFocusManager level for good measure.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@853 542714f4-19e9-0310-aa3c-eee0fc999fb1
2002-01-12 02:37:57 +00:00
Walter Korman 04cc7acdb3 Disable debug logging by default.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@841 542714f4-19e9-0310-aa3c-eee0fc999fb1
2001-12-19 23:33:02 +00:00