Commit Graph

196 Commits

Author SHA1 Message Date
Ray Greenwell b08f508349 Oh, fuck that. Let's just set the explicit width/height, because if
something's never measured then it never gets these set.
This might break something.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@615 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 03:32:57 +00:00
Ray Greenwell 2e9282a3e5 Make our measured size the size of the thing we're wrapping.
Half the places we use FlexWrapper we do something like this anyway.
Note that you can still override this by setting the width and height
(which sets the explicitWidth, explicitHeight).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@614 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 02:17:33 +00:00
Robin Barooah 0c7a95a8d0 Add a background jpeg encoder which uses the JPGEncoder to spread out encoding over a series of frames.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@586 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 01:46:22 +00:00
Robin Barooah 84be5a1da6 Hide the little helper class that came over with the JPGEncoder inside the JPGEncoder file.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@585 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-30 00:13:31 +00:00
Robin Barooah 5dd60e0d45 Refactor the JPG encoder to process in time slices rather than all at once.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@584 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 23:57:13 +00:00
Robin Barooah 13f7a78932 Fork the as3corelib JPEG Encoder into nenya.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@583 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-29 23:56:11 +00:00
Ray Greenwell 9cdc1dd3d2 Omigosh, let's capture any errors thrown while unloading media.
I was pretty sure the event handlers did this, but Annie sent me a trace
that would seem to indicate otherwise.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@573 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-14 19:17:43 +00:00
Tom Conkling d2c253af72 DisplayUtil.positionBounds()
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@570 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-11 22:00:19 +00:00
Tom Conkling 5a0b164c3f These functions aren't actually used by sortDisplayChildren
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@569 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-11 21:40:25 +00:00
Tom Conkling 6776b83ce6 Account for kerning by always measuring the width of the truncated text field with the truncation string
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@559 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-02 00:50:51 +00:00
Tom Conkling 5d6ef34d2b TextFieldUtil.setMaximumTextWidth()
So that Robert stops breaking the UI with his ridiculously long names...


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@558 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-07-01 23:14:08 +00:00
Ray Greenwell ec93c75cc2 Added setMediaBytes().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@553 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-25 22:55:16 +00:00
Ray Greenwell 25d74475d9 I saved this checkin until I was feeling destructive, and that time is now.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@551 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-24 01:27:52 +00:00
Tom Conkling d426b70e58 This is probably not such a good idea after all
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@547 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 20:18:24 +00:00
Tom Conkling 8168128b0f small optimization for the DisplayUtil.sortDisplayChildren common case
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@546 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-19 20:10:06 +00:00
Nathan Curtis 2952d288fd Allow CommandMenu subclasses to provide their own item renderer.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@544 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-18 18:12:59 +00:00
Ray Greenwell 4148e90209 Added createLabel().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@543 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-14 01:50:56 +00:00
Ray Greenwell d26f854290 Converted HermiteFunc into a standard easing function. Untested.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@542 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-13 01:54:12 +00:00
Ray Greenwell 284a4070ea Added updateText().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@540 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-12 20:10:41 +00:00
Ray Greenwell cafdd35170 Deprecate everything in this package. Use tweener. It's better.
Unfortunately, the flex compiler is a bit thick and issues a deprecation
warning when compiling a class that is itself deprecated, so this
adds warning spew to nenya compilations.

I'll probably blow all this away soon (except maybe HermiteFunc, which
could be adapted into a standard easing function for use with Tweener
and flex easing effects- the other functions are already well represented.).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@539 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-11 22:15:58 +00:00
Ray Greenwell 67cc68c1b6 Various Flex utils.
...like having a decent factory for Spacer.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@537 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-10 23:55:03 +00:00
Nathan Curtis 97c5206983 Added some notes about the facilities and ancestry of this class. Also modified it so that it
will scroll automagically if, even after doing its damnedest to make it fit, it still doesn't.  This
will only happen if the menu (or submenu) is so tall that the it stretches from the bottom of the 
bounds it's using, and extends past the top of the bounds.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@526 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-05 21:31:32 +00:00
Nathan Curtis 89fef8992b Bring back the scrollable menu. However, we leave the default as not scrolling, and only do
scrolling of any kind of the verticalScrollPolicy is set to ScrollPolicy.AUTO or ScrollPolicy.ON, 
and the maxHeight has been set.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@525 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-05 19:00:24 +00:00
Nathan Curtis 4b0f9e0c64 By properly using the nifty PopUpUtil, we can simplify and correct this code all at once.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@520 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-04 00:47:56 +00:00
Nathan Curtis 65e0f8015e Allow the creator to specify their own bounds if they don't want submenus to be constrained by the
stage.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@519 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-04 00:05:00 +00:00
Nathan Curtis 6b40089e52 Fixed some layout problems with _upping submenus. Also, the _fitting member variable was checked
in submenu layout, but it could never get set to anything but null.  So, now it just assumes that
it should be fitting to the stage and does that (it would previously just put the menu wherever
its broken math put it, and not checking against the bounds of anything).  I have a slight 
inclination to bring back a method for supplying a fitting Rectangle so that it can be fitting these
menus between the header bar and control bar.  Maybe I'll just do that next.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@518 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-06-03 23:35:34 +00:00
Ray Greenwell c243740190 - Allow the override dispatcher to be specified in our factory convenience method.
- Style changes.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@503 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-23 02:35:20 +00:00
Ray Greenwell 65ff4b70b9 Bad Nathan! Avoid "if true then true" coding. I need a snappier name for
this ugly pattern.
FYI, CommandButton also has buttonMode follow enabled-ness.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@493 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-14 00:29:43 +00:00
Nathan Curtis 0378cabcaa That last bug would have been a lot easier to track down if a disabled link button didn't still
look like it should be clickable.  Let's turn buttonMode off when we get disabled.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@492 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-13 23:41:32 +00:00
Ray Greenwell 54ac003a1b Encapsulate the annoyance in a method.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@491 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-09 21:33:59 +00:00
Nathan Curtis 9783a6a320 remove these two, as they've been moved.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@488 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-07 00:23:25 +00:00
Nathan Curtis db22e56c07 That was exciting to track down. If your supplied sort.compareFunction(...) returns a value other
than -1, 0 or 1, Sort.findItem() goes into an infinite loop.  Guard against that here. 


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@487 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-07 00:03:47 +00:00
Nathan Curtis 812ab955b4 Actually, the list creator can assign a style name to the specific instance. Internally we need
to assign a style name to the List instance.  Also made the default renderer always use a 
transparent background.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@486 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-05-06 22:13:30 +00:00
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