Mouse Suppotr Notes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Blue Baron
    Adept
    • Apr 2011
    • 103

    Mouse Suppotr Notes

    The mouse support that I wrote is in V and V4 dev versions. Below are notes on how its used. Some of the button presses and context menu options I guessed at. Please let me know what works and what doesn't.


    Uses:

    First you need to turn on mouse movement in options.

    If you left click on player, hold for a turn/pickup. If shift is held down before the click, cast magic/prayer. If control is held down, go up or down stairs. If alt is held down, search.

    If you right click on player, show context menu. If shift is held down, start the inventory command. If control is held down, use an unaimed item (food, potion, etc.). if alt is held down, show the character screen.

    If you left click on a spot adjacent to the player, walk to that spot. If the spot is not adjacent to the player, pathfind to the spot. If shift is held down, start running in the direction. If control is held down, alter the terrain or attack a monster in that direction. if alt is held down, look at the spot.

    If you right click on a spot, show a context menu for that spot. If shift is held down, cast a spell or prayer at the spot. If control is held down, fire a ranged weapon at the spot. if alt is held down, throw an item at the spot.

    in most menus, right clicking will do the same thing as pressing ESC.

    in get item menus, click the top line to change which list is shown.

    when targeting/looking, you can click on a spot to see what is there, click again to recall monster info. clicking the edge of the screen will move the screen in that direction. to set a target you can ctrl-right click, or press the the middle mouse button. plain right clicks exit look/targeting mode.

    in stores, if you left click on an item you select it. if you left click on an already selected item, show the examine/buy context menu. if you left click on one of the top two lines, show the store context menu.

    in prompts that end in "[y/n]", you can left click on the top line for yes or anything else for no.

    Press 'U' for the unified use command.

    Press 'i' for item-verb interactions with the inventory, through context menus.

    Issues that need to be fixed:

    if selecting a direction, after selecting a spot, right clicking selects that path rather than exiting the menu.

    when looking around, if a tile that has a squelched item is clicked, the click is not registered.

    Some menus start on equipment screen, even if no equipment is appropriate.

    Possible issues I don't know what to do about:

    when buying one item of multiple, need to be able to confirm the purchase.

    keymap selection support? change commands of first player context menu to keymaps, then show list of set keymaps?

    context lines should show keypresses instead of line index, especially nonmovement commands?

    Some context menu options should be colored or not, but still in the list, depending if an action is available or not.

    *edit: is there a way to change the title?
    Last edited by Blue Baron; December 8, 2011, 02:41. Reason: Mouse Support Notes
  • nppangband
    NPPAngband Maintainer
    • Dec 2008
    • 926

    #2
    Nice! I like some of the things you have done.

    I just finished a similar project in NPP, based on the Mouse Supprot in FAAngband. You can play virtually the entire game with the mouse, and every command has full mousebutton support of all possible sub-commands (targeting, etc), and has true "noun-verb" support for objects, so you can go into an objects list, select items from the backpack,dquipment, or floor and get a menu of all possible commands for the item. You can make multiple commands on multiple objects without having to leave the menu. For example, you can gain multiple spells from the same spellbook, and then cast them, while only having to select the spellbook once.

    I like your options of holding CTRL, ALT, and SHIFT down to process different commands.

    Here is a link to the commit, although there are still a couple bugs to be fixed:

    NPPAngband current home page: http://nppangband.bitshepherd.net/
    Source code repository:
    https://github.com/nppangband/NPPAngband_QT
    Downloads:
    https://app.box.com/s/1x7k65ghsmc31usmj329pb8415n1ux57

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9634

      #3
      Originally posted by nppangband
      I like your options of holding CTRL, ALT, and SHIFT down to process different commands.
      This is fine for using the mouse on a regular computer. I tried to stick to single clicks on the grounds that that could be more easily then extended to touch devices, like phones and tablets. Not that there has actually been much progress on porting to such devices...
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • Blue Baron
        Adept
        • Apr 2011
        • 103

        #4
        Originally posted by nppangband
        Nice! I like some of the things you have done.

        I just finished a similar project in NPP, based on the Mouse Supprot in FAAngband. You can play virtually the entire game with the mouse, and every command has full mousebutton support of all possible sub-commands (targeting, etc), and has true "noun-verb" support for objects, so you can go into an objects list, select items from the backpack,dquipment, or floor and get a menu of all possible commands for the item. You can make multiple commands on multiple objects without having to leave the menu. For example, you can gain multiple spells from the same spellbook, and then cast them, while only having to select the spellbook once.

        I like your options of holding CTRL, ALT, and SHIFT down to process different commands.

        Here is a link to the commit, although there are still a couple bugs to be fixed:

        https://github.com/nppangband/NPPAng...56bfe1b9b285e8
        I like the multiple commands per menu for some of the commands.
        How did you get the keypresses as labels?

        What I did does not use the button framework, so the two may be fairly compatible.

        Nick:
        One of the things I want to (eventually) do is a graphical android client. Should I ever do it I will add a button that when pressed will make the next mouse press that is not on a button use a different mouse button id or modifiers.

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎