Results 1 to 8 of 8

Thread: Assigning functions to keypresses?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Assigning functions to keypresses?

    Is anyone able to confirm if it is possible monitor a keypress rather than a GUI button? I have run out of buttons.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: Assigning functions to keypresses?

    This is a script (forgot who made it) which lets the stratmap UI disappear when the Scroll Lock button is pressed, so I guess it could work:

    Code:
    declare_counter ui_showing
    monitor_event ShortcutTriggered ShortcutTriggered object_manager hide_gui
        wait 0.1
            if I_CompareCounter ui_showing = 0
                hide_ui
                disable_movie_view
                set_counter ui_showing 2
            end_if
    
            if I_CompareCounter ui_showing = 1
                show_ui
                set_counter ui_showing 0
            end_if
    
            if I_CompareCounter ui_showing = 2
                set_counter ui_showing 1
            end_if
    end_monitor










  3. #3
    Byg's Avatar Read The Manual
    Patrician

    Join Date
    Nov 2005
    Posts
    4,569

    Default Re: Assigning functions to keypresses?

    Thankee Sir.

    NEW BGR V 20150324! . . . . . . . .. . . .BGRIV_E

  4. #4

    Default Re: Assigning functions to keypresses?

    Quote Originally Posted by Gigantus View Post
    This is a script (forgot who made it) which lets the stratmap UI disappear when the Scroll Lock button is pressed...

    That script was made by Userpro. Its great for taking screenshots without the UI in the way!

  5. #5
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: Assigning functions to keypresses?

    (It's late, time for bed)










  6. #6

    Default Re: Assigning functions to keypresses?

    Do we know what keys are tied to which shortcut labels? In the above, "object_manager hide_gui" is what the code calls the Scroll Lock but what about others?
    Currently following these promising mods - Imperia Antiquitatis by Splenyi
    Traits, Talents, and Toadies
    by Hellbent
    Real Roman Reforms
    by Aodh Mor
    Unit Icons project
    by Bullgod
    Also recommended:
    City Sack, Liberation and Diplomatic Options
    by Dresden

  7. #7
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: Assigning functions to keypresses?

    Check text\shortcut, guess that's where it is defined.










  8. #8
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,681
    Blog Entries
    35

    Default Re: Assigning functions to keypresses?

    Thanks, now I know whom to credit.










Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •