*** tpb has joined #freeorion | 00:00 | |
*** VargaD has quit IRC | 00:00 | |
fixIt | could a key binding be just a ModKey? meaning can they not have a key just only a modkey like ctrl or just alt set binded to something? ? | 00:24 |
---|---|---|
*** fixIt has quit IRC | 01:50 | |
*** fixIt has joined #freeorion | 02:15 | |
GeofftheMedio | ctrl and alt are probably also regular key enums | 02:56 |
fixIt | Nope, ctrl and alt are of type ModKey. Did you answer if a keybinding can be just a mod key with no key? I got disconnected and am not sure if I missed it or not | 02:59 |
GeofftheMedio | I meant there are probably also regular key enums for them | 03:35 |
GeofftheMedio | yep: GGK_LCTRL and such | 03:37 |
GeofftheMedio | point being, a keybinding of a mod key with no key is just a keybinding of that key with no modkey | 03:40 |
fixIt | Okay, in WndEvent.h I also see extern GG_API const ModKey MOD_KEY_LCTRL. So I'm far from this point but lets say a user presses a left control key, does the ModKey lctrl and the enum key lctrl equal each other? | 03:41 |
GeofftheMedio | ModKey and Key aren't comparable | 03:45 |
GeofftheMedio | independent enums | 03:45 |
fixIt | Okay thanks. I think I understand modkeys better now, I believe in that case it would be a regular Key enum because the modkey is only for something in addition to the initial key press. So you couldnt have a modkey without a key right? | 03:46 |
GeofftheMedio | I don't know what happens if you just press a single modkey... might be the key alone, or the modkey plus the key | 03:47 |
fixIt | Hmm okay. Once I get to that point, what exactly should or could I use to capture key press's? Also for the flags being ORed together. I understand how to check for a certain flag in it by bitwise ANDing it. The one thing I am a bit unsure on though is are the flags in there all only possible in isolation? | 03:49 |
fixIt | Like if Flags<Modkeys> contains a control, shift, meta. andn the plain Key is X. does that mean X + control, X+ shift, and X+meta work? | 03:50 |
GeofftheMedio | I don't know what you mean for both questions | 03:50 |
GeofftheMedio | no, it means X + CTRL + SHIFT + META all have to be pressed | 03:50 |
fixIt | Oh okay so when there are mutliple flags its means all of the simultaneously | 03:51 |
fixIt | By how should I capture key input, I mean like is there a certain boost library that I should or could use that you know of? Or is there something already in place somewhere to do this? | 03:52 |
fixIt | For when I get to the UI part where the user will set their key bindings | 03:53 |
GeofftheMedio | have a look how the existing hotkeys are set up | 03:53 |
GeofftheMedio | gg keyboard accelerators I think they're called | 03:53 |
GeofftheMedio | there are keypress events sent to windows, which I think include modkeys | 03:54 |
GeofftheMedio | so you'd probably make a little pop up dialog that says "enter hotkey" and which would capture the next non-modkey keypress | 03:54 |
GeofftheMedio | and return the result and modkeys that were pressed at the same time | 03:55 |
GeofftheMedio | and thus determine what hotkey combination to use for that command | 03:55 |
fixIt | Alrighty thanks for the help | 03:57 |
*** STalKer-X has quit IRC | 04:32 | |
*** STalKer-X has joined #freeorion | 04:32 | |
*** StrangerDanger has quit IRC | 09:41 | |
*** StrangerDanger has joined #freeorion | 09:42 | |
*** GeofftheMedio has quit IRC | 10:07 | |
*** GeofftheMedio has joined #freeorion | 10:07 | |
*** VargaD has joined #freeorion | 11:55 | |
*** dansan has quit IRC | 16:01 | |
*** wolfet has joined #freeorion | 17:25 | |
*** wolfet has left #freeorion | 17:25 | |
*** Digit01 has joined #freeorion | 17:51 | |
*** dansan has joined #freeorion | 18:15 | |
fixIt | where would the UI part for configuring key bindings go? A tab in options? | 22:33 |
GeofftheMedio | probably a new tab after UI | 22:33 |
GeofftheMedio | too many options for hotkeys to put under the existing UI tab | 22:33 |
fixIt | So when you visualize the UI how exactly do you forsee it? So there is a HotKey tab then for each possible thing that you can set key bindings for it has a button next to it that says "Configure". You click the button configure which pops up a window that says Enter Hot Key which would grab the key press event? | 23:09 |
GeofftheMedio | each command could have a short description on the left, with a widget showing the current binding, if any. there could be a configure button, or clicking on the binding widget could do the same thing as the button would | 23:10 |
GeofftheMedio | popping up a modal window saying enter hotkey would work | 23:11 |
fixIt | What do you mean by widget? Is that a type from the options tab like BoolOption, IntOption etc or is that something I would need to make? And I imagine this Modal window class should probably be declared/defined in OptionsWnd.cpp? | 23:18 |
GeofftheMedio | widget = some UI element | 23:19 |
GeofftheMedio | like the directory option, which has a little box for the directory and a button to open up a directory browse dialog | 23:20 |
GeofftheMedio | defining it in optionswnd.cpp would probably work; I don't think there's anywhere else it needs to be used | 23:20 |
*** StrangerDanger has joined #freeorion | 23:40 |
Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!