Commit Graph

86 Commits

Author SHA1 Message Date
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
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
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
Ray Greenwell 6294232dce Roll this back. You don't even want to see the unchecked-in code I also trashed.
Too bad the bitchy comment about adobe goes too.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@692 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-10 20:54:56 +00:00
Ray Greenwell e14212f5b4 Add a way to set the HTML text.
Oh yeah, links don't work unless the field is selectable. WHY?
Carbomb adobe.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@691 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-11-10 20:16:44 +00:00
Ray Greenwell df41e4e849 Added createText() for conveniently creating a multiline text widget.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@677 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-10-27 23:42:03 +00:00
Jamie Doornbos c420e540d6 New method to allow a command button to be activated, emulating a user click
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@676 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-10-27 22:13:45 +00:00
Ray Greenwell a19690f205 Added countLayoutChildren(), which counts the children of a container that
have includeInLayout = true.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@668 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-10-15 20:45:27 +00:00
Ray Greenwell fcf091b5c1 Allow the up and down arrow keys to traverse the command history, like we do in Java.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@667 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-10-14 21:25:37 +00:00
Michael Bayne 8590d5650b Added createTipLabel().
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@661 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-09-25 00:54:54 +00:00
Ray Greenwell ac836c1cea New chat prompt from Bill.
Yeah, not very i18n.
We're just trying this out.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@637 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-20 22:24:42 +00:00
Ray Greenwell cbe1f76632 It's the return of the chat prompter!
What's this white box on the control bar?
Now it says "type to chat" right in there when empty and unfocused.
My life is empty and unfocused, checking this in at 11:15 on friday night.
Things like this were tried in the past, and were always screwing up
and getting in the way of chatting or using the room. This is a skin,
not actual text, so it's more fuckup-proof.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@633 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-16 06:14:41 +00:00
Ray Greenwell 1ac283e675 Provide access to the send button.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@621 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-12 05:15:45 +00:00
Ray Greenwell d657cf9f3b Convenience.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@619 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:30:43 +00:00
Ray Greenwell ce7a1c9cb8 Added getCellCount() and getCellAt(), inspired by SimpleGrid.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@618 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:11:40 +00:00
Ray Greenwell 5de8a3acf7 Added this, since we do it lots of places and it often looks like an error.
git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@617 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 23:11:16 +00:00
Ray Greenwell 51cf6b65be Make this optional, and not the default.
Turns out a bunch of shit makes the wrapper size a little bigger,
and some things seem to freak out when the wrapper has a size,
even when includeInLayout=false.
Flex you very much.


git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@616 ed5b42cb-e716-0410-a449-f6a68f950b19
2008-08-08 03:46:11 +00:00
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
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 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
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 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 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
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 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
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 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 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