Commit Graph

163 Commits

Author SHA1 Message Date
Nathan Curtis f09dd1f869 Give this a style name.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@485 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 22:05:39 +00:00
Nathan Curtis 2ba42867e4 expose the AmbidextrousList scrollBarOnLeft property
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@484 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 18:10:14 +00:00
Nathan Curtis 3dc2e34e7e I knew there was a reason I backed that by a HashMap intead of a Dictionary. The class that wants
to update and remove entries from the list may very well not have a reference to the same object
that is stored in the PlayerList (base case is Names in a DSet getting updated/added/removed).  By
using a HashMap, we just need to ensure the hashCode() is the same, which is especially handy in 
the display name update case where the MemberName.hashCode() is the memberId.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@483 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 17:35:18 +00:00
Nathan Curtis 7c7b4fdd10 Add clear() functionality
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@482 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 17:03:45 +00:00
Nathan Curtis ba06889b90 I had fallen into a sketchy pattern in GamePlayerList and my hashCode() implementation, and this
works fine (better, really) with a Dictionary and pure object equality, so lets just do that.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@481 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 00:11:49 +00:00
Nathan Curtis 4fa0e70ede I'm still fiddling with several subclasses, but I believe this is mostly nailed down, and it'll
simplify my testing to check it in, so let's do just that.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@480 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-01 20:05:09 +00:00
Ray Greenwell ef6a5e208c Added setShutdownOnRemove(), which is disabled by default, but will
automatically shutdown (stop the loading and unload()) when removed from the stage.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@479 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-30 21:11:39 +00:00
Ray Greenwell ad347a4c8d Allow the defaultTextFormat initProps to be specified more conveniently.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@478 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-30 20:15:28 +00:00
Ray Greenwell 9eb6476126 Go back to hacking a hacky scale when snapshotting the video control.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@477 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-25 22:19:48 +00:00
Ray Greenwell 05cd1b4048 Well, I'm not sure there's anything I can do to work around this.
I'm recreating the video and the bitmap when I change camera dimensions.
But it seems that once a video is snapshotted into a bitmap,
the camera somehow remembers the resolution, and future snapshots of
a new video object attached to that camera always end up at the same size.
It doesn't make any sense and I can't even work around it because
the first snapshot could have happened outside of this code.
I did:
- show some text behind the video, so that selecting a non-working camera
gives a little feedback.
- cleaned up NPE that happened if clearSnapshot() was called when it was
already cleared.
- Detach the camera from the old video before setting up a new one


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@467 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-17 00:47:38 +00:00
Ray Greenwell bc469abcdf What can I say? I try this again today and now the
snapshotting works and my scale hack throws it out of wack.
Uhhh. I know I wasn't booching it and running out-of-synch code
together, because everything's in this class and I had loads
of trace logging in here when I was working with it on monday.
I wouldn't believe myself if I hadn't been there.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@466 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-16 21:31:24 +00:00
Ray Greenwell 4102fd95ee Q: why isn't whirled done yet?
A: shit like this.

30 minutes of tweaking and trying things to get it to ACTUALLY snapshot at
specified size. The damn video control always says that videoWidth and
videoHeight are 0, but if you size the Camera correctly and attach the video
it works. Turns out that the video control, when snapshotted into a
bitmapdata, always thinks it's 160x120, but if we scale it up we can see
the pixel data that's really there. What the fuck?!
Oh well, it works now, but why does adobe make these things so difficult?
The only reason I got it working was trial and error and cargo-culting off
the example in Camera's API docs. Jeez.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@465 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-15 05:08:10 +00:00
Ray Greenwell e0d275a09b Oh hey, you can set the size of video capture. Me likey!
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@464 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-15 04:32:38 +00:00
Ray Greenwell d62ed1884c AmbidextrousList, can have its scrollbar on the left or right side.
In fact, it can be swapped while the user is dragging it...


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@463 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-15 02:20:29 +00:00
Ray Greenwell c925794d22 Don't remove and re-add children, that's much more expensive
and will trigger events. Instead, sort the children and then
set their indicies.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@461 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-08 19:37:53 +00:00
Tom Conkling 17829f4ae5 DisplayUtil.sortDisplayChildren now uses ArrayUtil.stableSort
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@460 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-04-08 19:19:43 +00:00
Ray Greenwell 548de4d5c2 An UNLOAD event is not dispatched on any LoaderInfo for which INIT
has not already been dispatched. This is a pain in my ass.
Make MediaContainer dispatch UNLOAD when it unloads its business,
regardless of whether things have been initialized.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@458 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-28 00:36:31 +00:00
Ray Greenwell 8feb5df868 Let's track SecurityError events too. Normally if things are set up well
this won't happen, but it did today for folks with a cached crossdomain.xml.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@457 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-26 03:14:15 +00:00
Ray Greenwell 9d792434dc Don't choke if our url is set to null, instead just clear any previous media.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@456 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-22 02:45:41 +00:00
Ray Greenwell aaaebc4a2f Flex does not support keybinding in any standard way.
That's because: flex is a pile of shit.
Created a basic KeyManager. This will probably change a lot, but it's
serving its purpose now.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@453 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-20 03:49:27 +00:00
Ray Greenwell d28031c91e Removed popUpIn().
Added popUpAtMouse(), which is like our show() (which shows at the mouse)
only also allows specifying popLeftwards and popUpwards.
Also, in our show(), just fit the damn menu onto the stage. Always.
Why have a special method for doing what should be the common case?
I suppose the old code was trying to fit the menu into the roomview bounds,
which might've been nice if it actually worked.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@452 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-17 23:02:04 +00:00
Ray Greenwell 11fd3858d1 PopUp utilities for centering or fitting a popup inside a rectangle
(or the stage).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@451 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-17 22:58:27 +00:00
Ray Greenwell 3afd587398 Added centerRectInRect(), minor optimization for fitRectInRect().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@450 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-17 22:57:43 +00:00
Ray Greenwell 5798172e60 Don't import flex stuff.
Just don't worry about rawChildren in a flex component.
Nothing is really using this method anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@447 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-14 20:57:36 +00:00
Michael Bayne 03dec963f1 Add an accessor for our chatInput field.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@446 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-14 01:04:07 +00:00
Ray Greenwell 902e338a09 GraphicsUtil.
Contains dashRect() and dashTo() that Robert wrote for room editing.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@444 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-12 22:00:57 +00:00
Ray Greenwell 35bd324394 Fix.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@436 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-03-06 22:05:58 +00:00
Ray Greenwell e80bef77e8 This shouldn't be here.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@430 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-27 19:43:16 +00:00
Ray Greenwell 5847ee1e99 Fix to work with Flex 3.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@428 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-23 01:41:51 +00:00
Ray Greenwell d3e447398e Should fix menus for flex 3.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@427 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-23 00:27:45 +00:00
Ray Greenwell 16e17444c7 - Removed pointless "default" sorting method.
- Since quicksort is unstable anyway, might as well avoid a swap if two elements are equal.
- Be generous with the comparator function. It should really return -1, 0, 1, but sometimes people
  return positive numbers, 0, negative numbers...
- If Array.sort() is a stable sort, I think we should just change this impl to put all
  children into an array, sort'em, then set their indexes back into the parent.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@423 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-19 00:50:08 +00:00
Tom Conkling 474d616204 DisplayUtil.sortDisplayChildren takes a comparison function returning -1, 0, or 1, rather than a Boolean lessEqual function
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@422 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-19 00:33:16 +00:00
Tom Conkling e8f2523515 added DisplayUtil.sortDisplayChildren, for quicksorting the contents of a DisplayObjectContainer
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@421 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-19 00:14:17 +00:00
Mark Johnson 7e804e60c5 Perform a better fitting for menu's in a bounded region, so they'll position themself for
maximum visibility even if they can't fully pop up/down, left/right.  (Menu's larger than 
the bounded area will still have some issues).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@417 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-16 01:01:14 +00:00
Robert Zubeck ba7dadba97 Angle utility functions.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@416 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-14 20:52:38 +00:00
Robert Zubeck d543a0574d Convenience function to make a vector out of two points.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@415 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-14 20:49:31 +00:00
Tom Conkling 05f6e9755a moved Vector2 from contrib.core to nenya
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@414 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-14 19:18:02 +00:00
Robert Zubeck 6a6faeed8a Vector3 API changes to unify with Vector2 (which will be joining nenya soon):
- multiply() -> scale()  - since multiplication is ambiguous in vector contexts
- added destructive versions of add/subtract/cross/etc functions 
- length now retrievable via a getter



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@413 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-14 18:41:20 +00:00
Robert Zubeck d322b94545 Chat control's child elements can now have a different height than their container.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@412 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-13 22:34:28 +00:00
Ray Greenwell 6913ba2d08 Removed buttons, made a UI-free utility for capturing camera images.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@411 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-08 22:05:43 +00:00
Ray Greenwell f58b0bdcba clarify
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@410 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-06 01:42:10 +00:00
Ray Greenwell 7d400e45f2 - Moved common code to internal static methods in CommandButton.
- Fixed CommandButton to turn off buttonMode when disabled.
- Created CommandCheckBox.
All CommandButtons that are toggle buttons will use their 'selected' state as
their arg if they have no regular arg. CommandCheckBoxes are of course always
toggles.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@409 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-06 01:41:10 +00:00
Ray Greenwell a6e1fbe468 Made my CommandButton factory method the constructor.
I had initially been hesitant to do this because of the parameter that
can be one of two things, and the Java side of me wanted to hold
on to compile-time checking, but the convenience is too damn convenient.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@408 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-06 01:03:55 +00:00
Ray Greenwell 1fb449b30b Added a long-overdue factory method.
I'm actually going to make this the constructor, but I'm just fixing
the build now.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@407 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-02 03:57:02 +00:00
Ray Greenwell 7f93fbcd86 Extremely simple prototype camera snapshotting image sourcer.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@406 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-02-01 21:23:12 +00:00
Nathan Curtis 9748e422c7 Let the rest of the world use the FlexWrapper - this is pulled from LayeredContainer.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@404 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-28 22:57:13 +00:00
Ray Greenwell 7dbffa80cf Occam's razor.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@403 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-24 21:54:26 +00:00
Ray Greenwell 00081d774e If shutting down media that has a different url than it should, log both urls.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@399 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-17 23:34:58 +00:00
Ray Greenwell a7e975f6da Added addListeners(), rename event handler functions.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@396 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-15 23:44:53 +00:00
Ray Greenwell dda77910ba Some in-progress changes that are safe to check-in now.
Created a function to return the mask area as a Rectangle.
Will be used when snapshotting through the media stub.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@394 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-12 00:48:20 +00:00