[REL] Floating Framework v1.2.1 [58197]

Discussion in 'Released Mods' started by Raevn, December 9, 2013.

  1. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Yep, and that's exactly why I shouldn't have said anything before trying it out myself. For some reason I got it in my head that the screen edges wouldn't be walls, and elements could go partially out of frame. :confused:
  2. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    And released!
  3. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Found a bug, will be updating soon. Not a show stopper though - just make sure you drag a frame before resizing the window :rolleyes:
  4. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    v1.1 released.
    • Added 'center' offset option
    • Removed "ignoreMouse" css class which was preventing frame contents from receiving mouse clicks.
    • Fixed bug that occurs if the screen is resized before a frame is moved.
    • Set mod priority to 20.
    proeleert likes this.
  5. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    v1.2.1 released.
    • Bugfix - specifying an offset without a left/top would fail to set the offset.
    • Feature - setting delayResize will now not make the frame visible until after the first resize
    • Feature - x & y screen percentages now clamped to [0, 1]
    • Bugfix - rememberPosition = false did not work
    • Bugfix - Initial positioning not correct
    proeleert likes this.
  6. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Another Bug , Feature, can you make sure the Esc Menu is always above all else elements ?
    stormingkiwi likes this.
  7. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    There seems to be something strange going on when using the Floating Framework within server_browser. This is what I get when I use
    Code:
    createFloatingFrame('test_frame', 320, 58, {'rememberPosition': false, 'offset': 'center', 'left': 0, 'top': 0});
    $('#test_frame_content').append("<p>Your Content Goes Here</p>");
    That gets me this:
    rFloatFrame_strangeness.jpg
    As you can see, the floating frame isn't exactly located in the centre. When I try to move it, it disappears. I tested the same exact code in live_game and there it works fine.

    Am I doing something wrong maybe?
  8. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    This is because the body element in the server browser screen is 0px high, and if no containment element is specified, it defaults to body.
    Try "containment": ".div_body_cont" in the options map; this div is most of the height of the screen, unfortunately there doesn't appear to be a div that fully covers the height, but it may not be a problem depending on what you are trying to do.
  9. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    Brilliant! It hadn't occurred to me that the body might have a height of 0. Thanks!
  10. thetrophysystem

    thetrophysystem Post Master General

    Messages:
    7,050
    Likes Received:
    2,874
    I am surprised one would release a partial mod, and let people mod their mod into their own mods.

    It is a moddable mod.
    LavaSnake likes this.
  11. Fr33Lancer

    Fr33Lancer Well-Known Member

    Messages:
    595
    Likes Received:
    288
    Hi,

    Is there any modification in latest beta (61450) that leads to this framework not working anymore ?
    I'm speaking about black screen issue at startup position choosing, like the one reported here
    bit.ly/1h6H22U
  12. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I don't think the blackscreen issue is directly related to mods.
  13. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    I'm not sure. It's strange.

    On the one hand, it's not consistent - I've had the issue while mods were installed, then it's worked the next time I launched PA, with the same mods enabled. That's not usually what happens with mod conflicts (and there's no debug errors, that I can see, either).

    On the other hand, I've never had the issue when no mods were enabled. I've not seen anyone report it who didn't have mods installed, either.
  14. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    My guess it is some race condition. Loading a ton of mods takes time, killing it.
    But that's a shot into the blue. I doubt we can do much about it.
  15. ORFJackal

    ORFJackal Active Member

    Messages:
    287
    Likes Received:
    248
    Currently if somebody wants to hide their UI using custom Knockout code (for example to hide it when spectating), it will conflict with Floating Framework's ability to say in the settings whether to show the UI or not, because both of them will want to set the data-bind attribute of the outermost div (here is an example) to avoid it still being draggable though unvisible.

    Floating Framework could fix this by using Knockout's comment tags. I tried this and it works. Here are the changes:

    In rFloatFrame.js find
    Code:
        $('body').append(
            '<div id="' + id + '" class="drag_main" style="width:' + width + 'px; height:' + height + 'px; ' + styleLeft + styleTop + '" data-bind="visible: decode(localStorage.settings)[\'' + id + '\'] != \'HIDE\'">' +
                '<div id="' + id + '_content" class="div_drag_cont" style="' + styleResize + '"></div>' +
            '</div>');
    and replace it with
    Code:
        $('body').append(
            '<!-- ko if: decode(localStorage.settings)[\'' + id + '\'] != \'HIDE\' -->\n' +
            '<div id="' + id + '" class="drag_main" style="width:' + width + 'px; height:' + height + 'px; ' + styleLeft + styleTop + '">' +
                '<div id="' + id + '_content" class="div_drag_cont" style="' + styleResize + '"></div>' +
            '</div>\n' +
            '<!-- /ko -->\n');
    EDIT: Here's the pull request: https://github.com/pamods/mods-raevn/pull/3
    Last edited: March 17, 2014
  16. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    I think something broke this in the v67523, the ui for auto factory and pa mentor doesn't seem to be showing. Can anyone confirm?
  17. stawos

    stawos Member

    Messages:
    79
    Likes Received:
    46
    yeah the mods that reqire floating frame don't show up in game ui anymore. but i do catch a glimpse of them at the end of a match just before i return to main menu. so mods still work just hidden somehow :/
  18. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    From what I can tell live_game isn't drawn during play. Even the built-in debug console is invisible (and owns the input focus, lol) last I checked.
  19. DeathByDenim

    DeathByDenim Post Master General

    Messages:
    4,327
    Likes Received:
    2,125
    It may have to do something with the fact that all the views have been separated. I was updating my Notes mod and I got a floating frame stuck inside the player-list view and was unable to move it out. I'm guessing we need something that floats on everything. The caster mod that Captain Conundrum, LavaSnake and Martenus made a long time ago might have clues.
  20. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Could this PLEASE be updated? A few of my mods depend on it and I'm not looking forward to writing my own version. :D

Share This Page