Thursday, 2012-01-19

*** tpb has joined #freeorion00:00
*** VargaD has quit IRC00:00
fixItcould 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 IRC01:50
*** fixIt has joined #freeorion02:15
GeofftheMedioctrl and alt are probably also regular key enums02:56
fixItNope, 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 not02:59
GeofftheMedioI meant there are probably also regular key enums for them03:35
GeofftheMedioyep: GGK_LCTRL and such03:37
GeofftheMediopoint being, a keybinding of a mod key with no key is just a keybinding of that key with no modkey03:40
fixItOkay, 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
GeofftheMedioModKey and Key aren't comparable03:45
GeofftheMedioindependent enums03:45
fixItOkay 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
GeofftheMedioI don't know what happens if you just press a single modkey... might be the key alone, or the modkey plus the key03:47
fixItHmm 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
fixItLike 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
GeofftheMedioI don't know what you mean for both questions03:50
GeofftheMediono, it means X + CTRL + SHIFT + META all have to be pressed03:50
fixItOh okay so when there are mutliple flags its means all of the simultaneously03:51
fixItBy 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
fixItFor when I get to the UI part where the user will set their key bindings03:53
GeofftheMediohave a look how the existing hotkeys are set up03:53
GeofftheMediogg keyboard accelerators I think they're called03:53
GeofftheMediothere are keypress events sent to windows, which I think include modkeys03:54
GeofftheMedioso you'd probably make a little pop up dialog that says "enter hotkey" and which would capture the next non-modkey keypress03:54
GeofftheMedioand return the result and modkeys that were pressed at the same time03:55
GeofftheMedioand thus determine what hotkey combination to use for that command03:55
fixItAlrighty thanks for the help03:57
*** STalKer-X has quit IRC04:32
*** STalKer-X has joined #freeorion04:32
*** StrangerDanger has quit IRC09:41
*** StrangerDanger has joined #freeorion09:42
*** GeofftheMedio has quit IRC10:07
*** GeofftheMedio has joined #freeorion10:07
*** VargaD has joined #freeorion11:55
*** dansan has quit IRC16:01
*** wolfet has joined #freeorion17:25
*** wolfet has left #freeorion17:25
*** Digit01 has joined #freeorion17:51
*** dansan has joined #freeorion18:15
fixItwhere would the UI part for configuring key bindings go? A tab in options?22:33
GeofftheMedioprobably a new tab after UI22:33
GeofftheMediotoo many options for hotkeys to put under the existing UI tab22:33
fixItSo 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
GeofftheMedioeach 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 would23:10
GeofftheMediopopping up a modal window saying enter hotkey would work23:11
fixItWhat 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
GeofftheMediowidget = some UI element23:19
GeofftheMediolike the directory option, which has a little box for the directory and a button to open up a directory browse dialog23:20
GeofftheMediodefining it in optionswnd.cpp would probably work; I don't think there's anywhere else it needs to be used23:20
*** StrangerDanger has joined #freeorion23:40

Generated by irclog2html.py 2.5 by Marius Gedminas - find it at mg.pov.lt!