# Having a Menu for Default Ingame Actions

**URL:** https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243
**Category:** The Toolbox
**Created:** [November 26, 2013, 7:25pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243 "2013-11-26T19:25:11Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vultures](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/vultures/32/69_2.png) [@vultures](https://discourse.cataclysmdda.org/u/vultures)
#### Post date: [November 26, 2013, 7:25pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/1 "2013-11-26T19:25:11Z")

</div>

[![](http://cdn.imghack.se/images/319f7554da00594ca004855e7d6551ec.png)](http://www.imghack.se/134521)  
[![](http://cdn.imghack.se/images/210aa9c19e133ee23088375833f7a425.png)](http://www.imghack.se/134522)

Here’s what I’ve been up to…

This is actually the idea Kevin Granade had written about, and I dunno if it has been discussed since. Methinks it would be cool to have a different route to default actions than via hotkeys/assignment. If there was something like this, maybe…:

> Enviroment: 1 - open (o), close (c) 2 - smash (s), butcher (B) 3 - examine (e), listitems (V) 4 - pickup (, g), grab (G) 6 - chat (C) 7 - look (; x) peek (X) 8 - advinv (/)
> 
> Inventory & Quasi-Inventory  
> 1 - inventory (i), organize (=), compare (I)  
> 2 - apply (a), apply\_wielded (A)  
> 3 - wield (w), reload (r), unload (U)  
> 4 - wear (W), take\_off (T),  
> 6 - eat (E), read (R),  
> 7 - throw (t), fire (f), fire\_burst/select\_fire\_mode (F)  
> 8 - drop (d), drop\_adj (D)  
> 9 - bionics (p), sort\_armor (+)
> 
> Long Term, Special, Info  
> 1 - wait (|), sleep ($), player data (@)  
> 2 - craft (&), recraft (-), disassemble ( ( )  
> 3 - construct (\*)  
> 4 - control\_vehicle (^)  
> 6 - safemode (!), autosafe ("), ignore\_enemy (')  
> 7 - save (S), quit (Q), help (?)  
> 8 - map (m), missions (M), factions (#)  
> 9 - kills ( ) ), morale (v), messages (P)

You’re guessing it’s about numkey bindings, and it is - there’s only a small problem with calling the menu gadget. Currently there’s a while loop that’s waiting for a close (window) gadget event, altough it’s closed with ESC key really. This should be a #include item within the loop, called and closed with the same key; NumPad(5) should circle between three sets of options, while the other keys aren’t really waited for because there’s a listen event of sorts. I was thinking of parsing the current selection with NumPad (Enter) as the default; for example, if you hit NumPad(1) on the first menu\_set, hitting it again selects the open (o) option, just as if you hit enter while pointing at it. Hitting ESC should exit this loop, too.  
The only real issue is with the timer; one must exist to render the animation properly. Right now it’s global, but I’m sure that you know what I’m babbling about here if you’re reading this. I know that timed events are the bane of all apps, so I need some help with this also. Also, I want to discuss if Cataclysm\_DDA needs this, and is this the proper measure; I was thinking the current set of CataDDA options should appear once NumPad(0) is hit in the bottom-right portion of the sidebar, being that it’s only 250 pixels w/h. Those revised icons you see are the actual pixels you could see in-game, and those four frames create a “blinking” animation.

Fire away.

---

<div class="post-metadata">

### Author: ![moist\_zombie](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/moist_zombie/32/131_2.png) [@moist\_zombie](https://discourse.cataclysmdda.org/u/moist_zombie)
#### Post date: [December 2, 2013, 10:45pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/2 "2013-12-02T22:45:10Z")

</div>

Hrm, this didn’t spark much conversation sadly 😑 I’ve suggested it before, basically borrowing off of Elona’s radial wheel design, and I always imagined it’d be mapped to “z” key… I’m interested because I dislike all those important commands being shift+hard-to-reach number keys along the top…

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [December 3, 2013, 4:50pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/3 "2013-12-03T16:50:12Z")

</div>

Mmmm, radial keypad menu… keypad is good if you have it, but needs to be remappable of course, and considering that we already use vikeys, it’s a no brainer to default to:

```auto
7/y 8/k 9/u

4/h 5/? 6/l

1/b 2/j 3/n
```

I should… just do this, it’s actually a fairly simple thing to code (the hard part will be making the menu _commands_ remappable, but even that isn’t super hard I think).  
Good point about having different menus depending on the context, I hadn’t actually thought ahead that far.

---

<div class="post-metadata">

### Author: ![Taraq](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Taraq](https://discourse.cataclysmdda.org/u/Taraq)
#### Post date: [December 8, 2013, 9:05pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/4 "2013-12-08T21:05:08Z")

</div>

[quote=“Kevin Granade, post:3, topic:4243”]Mmmm, radial keypad menu… keypad is good if you have it, but needs to be remappable of course, and considering that we already use vikeys, it’s a no brainer to default to:

```auto
7/y 8/k 9/u

4/h 5/? 6/l

1/b 2/j 3/n
```

I should… just do this, it’s actually a fairly simple thing to code (the hard part will be making the menu _commands_ remappable, but even that isn’t super hard I think).  
Good point about having different menus depending on the context, I hadn’t actually thought ahead that far.[/quote]  
What keyboard is that on? Because on QWERTY wouldn’t it be more like this:

` 7/u 8/i 9/o
 4/j 5/k 6/l
 1/b 2/n 3/m`

---

<div class="post-metadata">

### Author: ![kevin.granade](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/kevin.granade/32/1316_2.png) [@kevin.granade](https://discourse.cataclysmdda.org/u/kevin.granade)
#### Post date: [December 9, 2013, 8:20pm UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/5 "2013-12-09T20:20:55Z")

</div>

It’s not a matter of keyboard layout, that’s the standard vikeys layout, which we use for default movement. Yea the diagonals are off to the left, but I think that’s better since you’re using index and middle finger to hit them instead of middle and ring finger.  
It should be remappable if you like anyway.

---

<div class="post-metadata">

### Author: ![Taraq](https://avatars.discourse-cdn.com/v4/letter/t/c57346/32.png) [@Taraq](https://discourse.cataclysmdda.org/u/Taraq)
#### Post date: [December 10, 2013, 1:57am UTC](https://discourse.cataclysmdda.org/t/having-a-menu-for-default-ingame-actions/4243/6 "2013-12-10T01:57:14Z")

</div>

[quote=“Kevin Granade, post:5, topic:4243”]It’s not a matter of keyboard layout, that’s the standard vikeys layout, which we use for default movement. Yea the diagonals are off to the left, but I think that’s better since you’re using index and middle finger to hit them instead of middle and ring finger.  
It should be remappable if you like anyway.[/quote]

Ah. This is why I don’t play on my laptop. That makes much more sense, anyway, I’ll try and see how that works rather than using two hands on the top row of numbers on my laptop… I do like the idea of a menu, to avoid having to move my hands all the place for weird key combinations.
