Commit Graph

898 Commits

Author SHA1 Message Date
Tom Conkling d22fcc041b DisplayUtil.positionBoundsRelative, the general version of DisplayUtil.positionBounds
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@755 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-16 23:25:16 +00:00
Mike Thomas dbc4c06d15 My search-fu seems to be failing. These printouts shouldn't be there.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@754 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-15 22:21:23 +00:00
Mike Thomas 79c5d9c925 Split out a little logic related to recentering and finishing up block resolution so it can be used reasonably by subclasses.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@753 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-15 00:49:23 +00:00
Ray Greenwell 45c9ca451e Oh baby, I think I fixed it.
- It seems that the camera gets fakey "locked" at the size it was set to
  when the user grants access to it.
  - Listen for status changes, don't set things up until the camera is
    unmuted.
  - record the size at the time of unmuting.

This all seems to work, but I worry about what would happen if access
to the camera had already been granted when this code runs.
There'd be no way to find out what the size was access was granted.
Fortunately, I believe we only use this code presently in a standalone
appletty-type-thing, so access is always granted in here.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@752 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-14 02:52:27 +00:00
Ray Greenwell ff31994909 Some rearrangement.
Fucking A.
It seems to default back to the size of the last snapshot taken
even if that snapshot was affected by the bug. When you quit and
then come back in, it is "stuck" to the last size. There's
no way to know what this size is.

Right now: logging everything, doing no adjustment.
Let's see if other people have problems, or what.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@751 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 02:24:11 +00:00
Ray Greenwell a0204eb35b And now suddenly it's back to 160x120.
Fuck me!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@750 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 01:28:53 +00:00
Ray Greenwell ee4c68c757 Well, this is heisentastic, and to top everything off it seems to
always act like the size is 320x240 now, instead of what it used to do.
Ack!


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@749 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 01:25:45 +00:00
Ray Greenwell 2c60e6c3cf Use the 'enabled' property setter/getter.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@748 ed5b42cb-e716-0410-a449-f6a68f950b19
2009-01-09 00:31:01 +00:00
Ray Greenwell 2ae0b63aae Added a setIcon() method to update the icon after construction.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@747 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-29 22:47:36 +00:00
Ray Greenwell 2817021c56 Allow to be used without a command.
Alternatively, I could create a DataComboBox that just does the cool
'data' stuff, and have CommandComboBox extend that.
Comment cleanups.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@746 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-18 01:18:31 +00:00
Ray Greenwell 2d0070a940 I think we used to do this way back, let's try it again.
Smooth our bitmaps.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@745 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-17 01:37:31 +00:00
Ray Greenwell dc06c617a1 Even more superclass style and paradigm matching.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@744 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 01:45:07 +00:00
Ray Greenwell 6eaaf4da01 Ray scratches his own belly.
- Match more closely the usage of labelField in our superclass.
- renamed to getSelectedData and setSelectedData.
- use Util.equals() when hunting for a matching data.
  Because we are not living in adobe's stone age and we
  want Equalable objects to work.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@743 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:50:12 +00:00
Bruno Garcia 7b367ad67b Ray tummy-scratching.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@742 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:36:48 +00:00
Bruno Garcia 8bd9aacc73 Terminologies.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@741 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:33:50 +00:00
Bruno Garcia fb3836d104 get/setSelectedValue for modifying the index based on the data of an option.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@740 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-13 00:14:01 +00:00
Bruno Garcia 7ecec007c8 Exposed argName. Public for now, wire up a getter/setter if it ever needs the complexity.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@739 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-12 22:29:52 +00:00
Bruno Garcia 9d6a5f0a4a By default, use "data" as the key in selectedItem to pass to the command. This can also
be specified. If it's null, shoot the entire selectedItem as the argument.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@738 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-12 00:18:44 +00:00
Bruno Garcia dc48461f10 A combo box that when changed, dispatches a command with the current selection as the arg.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@737 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-11 23:38:40 +00:00
Bruno Garcia ae517a93d9 Comment tweak.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@736 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-11 23:37:12 +00:00
Michael Bayne 8fc55ee79b A bunch of Eclipse facilitated cleanup.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@734 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-09 02:00:28 +00:00
Bruno Garcia cd276073a2 Helper to make a multiline text that fills the width of its parent.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@733 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-09 00:34:32 +00:00
Michael Bayne 1df7613dfc Use the correct Log reference.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@732 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-07 06:56:29 +00:00
Dave Hoover a431ffa3a3 And while I'm in there, let's qualify that reference so my
javadoc parsing doesn't spit an error.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@731 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-05 23:20:37 +00:00
Dave Hoover 06bcdeea14 Don't always claim unpacking resources is a mere 1 second from completion.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@730 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-05 23:15:39 +00:00
Ray Greenwell 22603206cd Added avoidOtherPopups. A hole was rabbitted while I debugged
that assigning to Rectangle.topLeft sets x and y and width! and height!
Gah.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@729 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-04 00:55:18 +00:00
Dave Hoover 8b899014ef Let's reorder those to go clockwise around the compass
(and match the set of cardinals in yohoho that I want to replace with this)


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@728 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-03 19:00:09 +00:00
Dave Hoover 1680e5135b Cardinals.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@727 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-03 18:53:20 +00:00
Mike Thomas 42aa38f832 We really need to adjust _priorCurrent regardless of whether this particular call to elapsed() is at a driftRatio of 1.0 or not - the next one might not be, so we need to keep it up to date. Otherwise, we could potentially yank _startStamp around by minutes or hours due to a stale _priorCurrent.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@726 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-02 23:52:23 +00:00
Ray Greenwell 7b3544fd2b - Added setFocuable().
- createField calls it.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@725 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-12-01 21:12:09 +00:00
Charlie Groves 411afaf415 Skip on toString if baseTileIds is null in addition to when width is 0. When
digester is logging - which happens when log4j is added to the classpath but
not configured - it prints Sections out while they're being initialized and
have a width but no baseTileIds.



git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@724 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-27 00:46:24 +00:00
Mike Thomas 1dc123281b Add a new play method that allows specification of a position for the sound source.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@723 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-26 23:56:40 +00:00
Ray Greenwell 714ad7e725 Another SimpleButton derivative for skinning with a bitmap.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@722 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:15:07 +00:00
Ray Greenwell 66386a90af Use toBitmapData.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@721 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:14:47 +00:00
Ray Greenwell cecdbfa320 Added toBitmapData.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@720 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-24 23:14:33 +00:00
Ray Greenwell 8584678701 Player BAM5 told me about code his friend Shango wrote, for
extrapolating the total duration of an mp3 while it was loading.
Sure enough: we have length (so far), bytesLoaded and bytesTotal.
So: do that. It works pretty well!

Too bad we can't do something similar for FLVs that don't have metadata.
:( (there is no "current length" property, just a current position.
So any time estimate would get worse and worse as the bytes advanced
past the play position.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@719 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 05:19:38 +00:00
Ray Greenwell be24ecee84 This is referenced by MediaContainer, so it's compiled in,
but we don't actually use it anywhere in whirled.
Made it extra stupid simple: click to play/pause, with no
other controls.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@718 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 00:12:56 +00:00
Ray Greenwell 714aa2adfb We want to ensure we sound out position, so call regular stop()
after we autorewind.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@717 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-19 00:10:56 +00:00
Ray Greenwell 96c892ce62 Bugfix: don't autorewind if someone seeks to the end while paused.
Feature: if there is no metadata telling us the duration, well then
we're up the old poo river. But what we can do is whip out our
trusty paddle and continually call the highest position we've seen
the duration. It makes playback a little weird, but allows seeking
and so is a step in the right direction.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@716 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 22:07:02 +00:00
Ray Greenwell 73a1102fe7 Simplified. Turns out the x/y coords of the states are honored,
so I don't need to wrap the downState in a Sprite.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@715 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 03:29:58 +00:00
Ray Greenwell 021a49c0ee Do for simple flash buttons what ImageButtonSkin does for flex Buttons.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@714 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-18 03:02:20 +00:00
Ray Greenwell 93a4814155 Just as clear without this const.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@713 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 16:24:49 +00:00
Ray Greenwell 5bc77aa0d0 Possible type 3 optimization, but well... it doesn't really make the code
weirder, but it does add a bit more code.
( http://smallwig.blogspot.com/2008/04/smallwig-theory-of-optimization.html
  mdb pointed this post out to me.)
It just bugged me that we use this player to play background music
in whirled, and in that circumstance 99% of the time nobody cares about
these events, so why have a timer to calculate and fire them off?


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@712 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 16:14:07 +00:00
Ray Greenwell 526db3bb05 This shouldn't happen, but it did once for me. Heisencope.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@711 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 06:17:09 +00:00
Ray Greenwell ee72820b54 Ouch, I changed that to 25 a while back while testing, but we want 250.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@710 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 05:59:03 +00:00
Ray Greenwell 5161e49bd4 Wow, when you tell a sound to loop, the position just continues
to increase, up past the duration. Seeking in those mode also
causes it to get wiggy and freak out. So don't have flash loop it,
but just loop it ourselves by autorewinding and playing again.
Also, just autorewind and pause if not looping, which I had
wanted to do anyway.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@709 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-17 05:51:20 +00:00
Ray Greenwell 8cd31c9564 Ah-ha. After testing id3 tags with 3 different mp3 files that all
should have had id3 tags, and trying everything, I tried one
more mp3 file: bingo.
Added MediaPlayer.getMetadata() and a METADATA event.
Contents of metadata vary by media being played and are open for
interpretation by users of the player.
FLV video returns their metadata object.
MP3 audio returns id3 tags.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@708 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-16 17:11:35 +00:00
Ray Greenwell 9da0886afc Dammit! Id3 tags are not working at all. I'm checking the crossdomain.xml. Grr!
Removed debugging.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@707 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-15 02:51:04 +00:00
Ray Greenwell 2b81e25445 - AudioPlayer interface extends MediaPlayer.
- Mp3AudioPlayer implements AudioPlayer.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@706 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-15 02:21:51 +00:00
Ray Greenwell 3ce7fc7f6a More prepatory renaming and refactoring. Nothing of interest.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@705 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-14 21:43:33 +00:00