Commit Graph

152 Commits

Author SHA1 Message Date
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
Ray Greenwell 3645d831a7 Some rearrangements to improve subclassability.
I had a subclass loading the new zip files that will be remixable avatars,
but that's going to have to be restructured (complexity++) for security
reasons.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@393 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-11 00:06:09 +00:00
Tom Conkling 7d603e2cda DisablingButton forces a visual update after a state change is made
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@386 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-01-03 01:27:52 +00:00
Michael Bayne 4e50f81400 CommandMenu no longer scrolls. It now supports methods to display a menu inside
a visible area or to expliclty pop up or left which it correctly passes on to
its submenus.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@385 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-20 03:23:04 +00:00
Ray Greenwell efca36dec5 Redispatch the INIT event when we get it.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@384 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-19 21:13:05 +00:00
Ray Greenwell 909c1f4189 Use Util.init() to initialize TextFields and TextFormats.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@381 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-13 23:26:10 +00:00
Mark Johnson 807165e6fc Make sure to perform the path completion steps if starting the path causes it to complete.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@375 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 19:40:14 +00:00
Mark Johnson 963b4939c5 If it's been so long since the last tick that we completely skip one
segment of a composite path, continue onto the next one.  This should 
fix part of the problem with trophy windows not sliding back out, but 
doesn't explain why they're not being removed from the overlay entirely 
(as the path completed functionality should still be called).


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@374 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 19:12:54 +00:00
Ray Greenwell cb704de5fa Pet peeve: avoid "if (true) then true else false" code.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@373 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 18:20:34 +00:00
Robert Zubeck accd0a0de7 Added distance function that can handle different types of spaces.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@371 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 03:04:33 +00:00
Tom Conkling f8b2cb19ec gee, maybe i should test my code before committing
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@370 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 02:00:58 +00:00
Tom Conkling 63764b85f2 unused member variable cleanup
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@369 ed5b42cb-e716-0410-a449-f6a68f950b19
2007-12-12 01:58:24 +00:00