Browser Interface Development

Discussion in 'Wing Commander TacOps' started by Wedge009, Oct 14, 2011.

  1. Avacar

    Avacar Vice Admiral

    Messages:
    743
    Likes Received:
    3
    Trophy Points:
    28,135
    I probably should have put the original post about this here instead of elsewhere. I've got the name tag popups fixed a bit more now. They're still all blue, but they now have the gradient applied, and I've dealt with some of the left-right error that was cropping up. I realized only the 'odd' cell rows were offset. My current fix, however, has eliminated the "push left" feature of being too close to the right-hand side of the map. Someone remind me to add that back in later if it is a problem.
     
  2. Avacar

    Avacar Vice Admiral

    Messages:
    743
    Likes Received:
    3
    Trophy Points:
    28,135
    Okay, it took a while, and it is a bit cludgy, but I managed to get the indicator piles to rotate through their icons.

    Most frustratingly, on current line 56 of ship_popup.js it refused to take the :first-child selector, but through who-knows-what magic, even though I'm telling *every* indicator to start rotating in sync, instead of the first one to cycle through them all, it seems to work anyway. I suspect I'm going to regret this at a later date, but hopefully I can get it to work 'cleanly' later with that selector working.The problem is especially noticeable on larger piles, where some of them disappear quickly as the multiple sets of cycling 'hide/show' requests start to fight. Each pile is supposed to have 1 cycling set, starting from its "top" member, but at the moment, every member started their own cycling set. Craziness.

    Meanwhile, enjoy! No more hidden indicators. Should be retroactive to all games.

    Note: "rotation" speed is currently 1.5 seconds, but that is already striking me as fast. I can fairly easily slow it down, in theory. Opinions?
     
  3. capi3101

    capi3101 Rear Admiral

    Messages:
    2,195
    Likes Received:
    171
    Trophy Points:
    24,885
    Gender:
    Male
    Location:
    Norman, OK, USA
    I was wondering why those ships hidden in the rocks in Game 7 were flashing. Good solution; kinda reminds me of the old-style weather radar images I had growing up as a kid for some reason.
     
  4. Wedge009

    Wedge009 Rogue Leader

    Messages:
    10,088
    Likes Received:
    41
    Trophy Points:
    69,385
    Gender:
    Male
    Location:
    Sydney, Australia
    I understand things are pretty quiet right now - at least on the development side of things. But it looks like Firefox 13 has finally dropped support for its non-standard -moz-border-radius property. I'm pretty sure we're using the standard border-radius property by now, but I've read reports that jQuery makes heavy use of the non-standard stuff, and may cause issues. Not a big deal, but just leaving a note here for reference.
     
  5. Avacar

    Avacar Vice Admiral

    Messages:
    743
    Likes Received:
    3
    Trophy Points:
    28,135
    I can look into doing a jquery update as well, if we find out that there is a fix for it to use the more standard format.
     
  6. Avacar

    Avacar Vice Admiral

    Messages:
    743
    Likes Received:
    3
    Trophy Points:
    28,135
    I just did another jquery update, but it still doesn't fix our problem. I spent about 2 hours today trying to get the new tooltip function to work instead of my manually coded tooltips, but they aren't playing nice with the css styles.

    Further, I looked into using the jquery's .position() feature, concluded that, in theory it is way better than what we're doing now, but in practice, it would involve a major re-write of the positioning logic for the entire program. I managed to break a lot of stuff before giving up and undoing it. I think after we launch, a re-write of the positioning system may be a really good idea that could clean up a lot of bugs, but for now, I'm going to stick with it as-is and keep kludging along to get us at least feature complete. No promises of when the next major development will happen; I realize I've been keeping radio silence for the last 6 months; just too busy IRL, but who knows; maybe inspiration will strike.
     
  7. Wedge009

    Wedge009 Rogue Leader

    Messages:
    10,088
    Likes Received:
    41
    Trophy Points:
    69,385
    Gender:
    Male
    Location:
    Sydney, Australia
    No worries about the absence - I've been checking the repository every now and then and finding no updates. I'll have another check when I get home. Rounded corners are nice, but possibly not essential, and I can't recall the impact but if you're using CSS3 standard anyway, it should be okay.

    ...unless the problem you're referring to is something else completely different that I've forgotten. .position() feature... was that to do the scroll-to-top-left issue that some browsers exhibited upon closing a pop-up or something like that? Wow, it's been too long since I looked at any of this.
     
  8. Avacar

    Avacar Vice Admiral

    Messages:
    743
    Likes Received:
    3
    Trophy Points:
    28,135
    Sorry I was rambling a bit. Allow me to ramble further, and try to better explain what I was talking about:

    So I had "recently" added a mouse-over tooltip that gave ship names. I had put this in around the same time that I took out the automatic opening of the large popups. That manual tooltip feature was functional, but flashes in and out of existance quickly because as it begins existing, it sometimes goes under the mouse, which triggers the mouseout event, which makes it vanish, which now puts the mouse over the target, triggering the mouseenter, making it appear...repeat.

    The jquery UI .position() tools are newish. I think they've been around for a year --so I should have looked at them sooner-- but they are old enough that they weren't available when I started the project. I was looking at them because I thought they'd be a good way to position the tooltip names without the above-mentioned issue. I suggest this because the .position() lets you put relative positions based on 'my' and 'of' parameters that they define, so the position can be relative to another object more easily than pure CSS allows. Additionally it natively handles popup intersection, and has a natural 'flip' logical option to make it switch sides. If this worked, it would be a great way to do not just the name tooltips, but also the main ship info popups (which are currently positioned using absolute math based on the database-stored positions of the ships).

    Ultimately though, I messed around with all this for a while (i.e. my previous post) and discovered that I'd basically need to re-position everything to be relative and have everything use .position() for this to work the way I'd like. My efforts with just the tooltips had them seemingly be relative to the top of the page, despite the 'of' target being the ship's span. I even went so far as to try and position the ships's indicators (the .indicator css class) using .position() but they also seemed to be relative to some top of the page, despite making their 'of' target the '#grid'. At that point I just reverted all the changes and left it be, which is why you probably didn't see anything when you did an update earlier today. Ultimately I do think using .position() would be a good idea, but would likely involve a top-down reworking of how we position everything, hence why I think it should be shelved for after (unless you want to tackle this yourself, Wedge!). My discussion had nothing to do with CSS3, per se, nor rounded corners (although some updates to CSS3 standardization wouldn't be a bad thing).

    side note: I only started messing with .position() after I had tried converting the name tooltips I wrote over to the brand new jquery ui .tooltip(). They "worked" in that they did popup, but they were the width of the page for some reason. I still haven't figured out why this was the case, but there's clearly an odd interaction between our css and the "custom-theme" used by the jquery ui widgets. The .tooltip() had a property that took a position of the .position() style, and that led to the above diversion.

    Failed attempts you'll discover, if you do an svn update, that I actually did commit something rather large today. I hadn't intended to, but after my experiments with .position() I ended up starting on Phase 6. I'll likely make a formal thread about it alone sometime soon, and I can't promise making a lot more progress, but as of right now, I've got working a number of admin tools for editing ships in-game. For debug purposes sake, I have not locked them away behind an admin authentication, so everyone will be able to test them out, but I'll post details on all that later, in another thread. Industrious readers who have followed this for a while can probably guess how to access phase 6 though...
     
  9. Wedge009

    Wedge009 Rogue Leader

    Messages:
    10,088
    Likes Received:
    41
    Trophy Points:
    69,385
    Gender:
    Male
    Location:
    Sydney, Australia
    Sorry for the confusion. I think everyone's been out of the development side of things for a long time. I'll have a look around phase 6 a bit, but I'm assuming that it's effectively a new branch based on the current state of phase 5. I don't know how much I'll be able to contribute, but I'll watch out for obvious and basic HTML/CSS things (code review, if you like) while you and perhaps Jason concentrate on the scripting side.
     

Share This Page