[REL] Anchor Buttons

Discussion in 'Released Mods' started by burntcustard, December 8, 2013.

  1. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    The keyboard shortcuts for pinning or "anchoring" a camera location, and then snapping back to it are awkward for some. This mod adds nice big buttons for it. Click one of the numbers once to set the camera anchor, then click it again to snap back there. Right-clicking will reset / reassign an anchor or unit group.

    Camera anchors work for spectators, so this could be useful for those casting games.

    Thanks to
    @proeleert :


    1.8 released on PAMM

    - Mainly fix for current PA release (74525)

    Settings are under UI
    [​IMG]

    If you change anything while in game you'll need to refresh the ui with the refresh button (F5).

    [​IMG]
    Last edited: November 11, 2014
    maxpowerz and LavaSnake like this.
  2. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Nice! Maybe you could make it so a right-click removes the anchor?
    gdeathscythe116 and yoshd like this.
  3. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    Straight out of the UI mock-up?
    ;)


    Does that mean I did something right? :p
  4. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Version 1.1 released already!

    Right click now re-assigns the camera anchor. So if, for example, you've already used number 3, right clicking on it will assign 3 to your new camera location/angle. Good for if you screw up or run out of numbers.

    Mebbe! ;)
    LavaSnake likes this.
  5. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    Added to PAMM :)
  6. halander1

    halander1 Member

    Messages:
    65
    Likes Received:
    4
    It covers up my energy UI for how much I gain, the ui is in the center now btw
  7. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Are you running PA at quite a low resolution? I only tested 1920x1200, so that might be the issue. You could easily look into the mod and remove a few of the copy+pasted button sections to make the bar thinner as a quick hotfix :)
  8. Raevn

    Raevn Moderator Alumni

    Messages:
    4,226
    Likes Received:
    4,324
    It'll be draggable soon too :)
  9. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Maybe add a setting on how much buttons you want to see displayed.
    LavaSnake likes this.
  10. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    Having a bit of fun
    upload_2013-12-22_13-2-33.png

    Added Floating Framework support.
    Added Settings how many buttons to show.
    upload_2013-12-22_13-42-38.png

    burntcustard , can I add this to PAMM ?

    Attached Files:

    Last edited: December 22, 2013
    LavaSnake likes this.
  11. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    This is definitely on my favorite mods list. Great job to both burntcustard and proeleert!
  12. proeleert

    proeleert Post Master General

    Messages:
    1,681
    Likes Received:
    1,656
    New version release in new mod manager
    stormingkiwi and kongkillha like this.
  13. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    It's not flash on 1900*1080. Basically the UI gets too cluttered between this, economic efficiency and commander HP
  14. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    [​IMG]
    [​IMG]
    [​IMG]

    I did some tweaking! I'd like some testing and thoughts before this is uploaded to PAMM :)

    Bugs/areas that need improvement/planned improvements:
    • Cannot have 0 camera anchor buttons.
    • Unit group buttons still suck (can't reassign).
    • Align left for those weirdo's who might want to use this on the left.
    • Settings consistency (ALL CAPS??!)
    • More obvious reassign (maybe a different bleep).
    • Better compatibility with the Floating Framework mod.

    Attached Files:

    LavaSnake likes this.
  15. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    I like the new sliders in settings, I'll try this out when I get the chance and get back to you. For reassign why don't you make the number turn red and then fade back to white? I think jQuery has a command to do that.
  16. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I'm still having an issue with the keyboard. When I press shift+1 to save a location, the "1" doesn't turn white. If I left-click it I still go to the location, and it turns white once I click. Could you detect the hotkey for saving camera location and turn the number white? I mostly just use this mod to remind me how many camera anchors I have, but I tend to use the keyboard for the actual control.
  17. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Just tested it and it seems to work fine. Great job!
  18. burntcustard

    burntcustard Post Master General

    Messages:
    699
    Likes Received:
    1,312
    Not easily :( It should be possible though so if someone with more experience can help out, I'd be more than willing to accept code snippets (specifically for detecting the keypress but then not having it set the anchor. I could make it just click the button instead).
    Thanks! That version's been I-don't-know-how-to-github-pull-request-ed to PAMM :)
    LavaSnake likes this.
  19. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900

    I actually just implemented a fix for it when I made anchor buttons for the draggable pip. What I did was intercept api.camera.captureAnchor and store the anchor index in an observableArray. Then I just added a data-bind on the anchor buttons that sets the class according to whether there is an element in the array for that anchor.

    I can make the same fix for your mod when I get around to it, but it isn't really a big bug.
  20. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    And done. The update is now on PAMM.

Share This Page