[REL] Sketch tools for casters

Discussion in 'Mod Discussions' started by Martenus, March 18, 2014.

  1. Martenus

    Martenus Well-Known Member

    Messages:
    530
    Likes Received:
    437
    Looks awesome :)
  2. Martenus

    Martenus Well-Known Member

    Messages:
    530
    Likes Received:
    437
    I edited the main post, can it be like this?
  3. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    That'll work fine! Just add a note saying that you can download it through PAMM and it will be perfect.

    That stamp icon looks great to me cpt, let's go ahead and add it!
  4. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I still have keyboard shortcuts to work on before releasing.

    To fix the arrow problem, would you be able to get the direction of the last vector drawn instead of what you use now? The arrow doesn't always line up just right.
  5. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    So here's basically how the arrow works now:
    1. Move backwards along the line until it turns or ends. Save that X and Y.
    2. Do math on the XY values above and the XY of the end of the line to find the direction of the last part of it, (That way you can turn the line without messing it up).
    3. The direction is limited to four options with hardcoded results: up, down, left, right
    4. It saves the XY positions needed to draw the arrowhead in that direction in the event array for rendering.
    That works until you draw diagonal lines. I figured out a better system recently using trig and more math to rotate the arrowhead perfectly. I'm hoping to code that in soon. :p
  6. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    I love it. But it doesn't seem to work on Mac.

    Holding down alt doesn't do anything.

    What can I do to help fix this?
  7. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Possibly the keyboard key code is different on a mac. If I can't get alt working for you, what other key would you like?
  8. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    Let's see...

    Option works. Which Option is the same as alt. So. that'd work.

    Command would be a good second choice.
  9. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    I like the mod, I do have some feedback:
    • I'd prefer the UI to not go out of focus and transparent, it's more distracting than leaving it as is. Maybe a hotkey to set visibility would be better
    • Dragging it around seemed a little buggy. It got stuck on my mouse at one point and had to F5 to fix. It might be the floating framework
  10. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    The which code is 521.

    Pity you can't use the altKey property, but you'd probably have to catch all pointer events and selectively pass them on.
  11. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I can set an option in settings for transparency, since it sounds like you never plan to switch between the two modes anyway. I haven't had that problem with dragging it, but I did have a problem with switching to another window and then coming back. Are you in windowed mode?

    It will be easy enough to just listen for either key, I think.
    Martenus likes this.
  12. trialq

    trialq Post Master General

    Messages:
    1,295
    Likes Received:
    917
    Almost certain I was in full screen mode. I'll have a mess around at the weekend and see if I can reproduce it.
  13. Martenus

    Martenus Well-Known Member

    Messages:
    530
    Likes Received:
    437
    I would also welcome an option to turn the transparency. I kept losing my UI on the screen :D It is small enough not to be distracting.
  14. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I can also experiment with making it fade out less. Right now I think it goes to 30%, but I can try it at 50%.
  15. Martenus

    Martenus Well-Known Member

    Messages:
    530
    Likes Received:
    437
    I would be totally fine with it being 100%. Can the options in settings be set to choose from 4 options maybe?
    • Don't display (use keybinds only)
    • Fade to 30%
    • Fade to 60%
    • Don't fade
  16. brianpurkiss

    brianpurkiss Post Master General

    Messages:
    7,879
    Likes Received:
    7,438
    I like this idea.
  17. zaphodx

    zaphodx Post Master General

    Messages:
    2,350
    Likes Received:
    2,409
    Got a chance to use this and I like it and would definitely be wanting to use it. Will be using in King of the Hill tonight.

    Some points/requests:

    Hotkeys are really needed. Work with hotbuild2? Would be really good to have them optionally binded to normal hotkeys so that they only activate when in spectator mode. However also on their own hotkeys might be nice for me using during a gameplay video.

    The arrow rarely works correctly, so I will unlikely to be using it until it's working in 360deg rather than just up/down/left/right.

    I would definitely want a circle a la area build.

    Option to hide it during gameplays. Just an ingame cross on the bar to close it and maybe an option in the options menu?
    LavaSnake, Martenus and stormingkiwi like this.
  18. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Hotkeys are coming eventually. For now the only one that's in is TAB to clear the canvas so that you don't have to keep going back and clicking that button.
  19. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Thanks for the good words! I'm working on the new arrow code right now and I'll add the circle tool to my list now that I know it's wanted.
    cptconundrum and zaphodx like this.
  20. LavaSnake

    LavaSnake Post Master General

    Messages:
    1,620
    Likes Received:
    691
    Making progress...
    upload_2014-4-6_21-4-3.png
    It still has a lot of bugs though. Hopefully I'll finish it today, but these bugs are holding on tight.
    zaphodx likes this.

Share This Page