Key combination in SFML

3 replies [Last post]
Posts: 1030

Any idea how I can do a key combination for the emoticons instead of just one key? Can't do it in the Clientsettings.settings so I was looking for some clues in GameplayScreen & EmoticonDisplayManager but didn't really find anything.

Basically what I'd like to do is keep the current values in the settings file but require the need to hold alt and hit them.

E.g. ALT + Num1 instead of just Num1

Posts: 1691

You can't define a modifier key with the settings unless you add a new setting, but you can just hard-code it:

        void HandleGameControl_Emote(Emoticon emoticon)
        {
            using (var pw = ClientPacket.Emoticon(emoticon))
            {
                Socket.Send(pw, ClientMessageType.CharacterEmote);
            }
        }

to

        void HandleGameControl_Emote(Emoticon emoticon)
        {
            if (GameplayScreen != null && GameplayScreen.GUIManager.IsKeyDown(SFML.Window.KeyCode.LAlt))
            {
                using (var pw = ClientPacket.Emoticon(emoticon))
                {
                    Socket.Send(pw, ClientMessageType.CharacterEmote);
                }
            }
        }

Make an issue report for it and I'll add the ability to define 2 modifier keys for emoticons, quick-bar items, and toggling windows (along with the ability to even define a key to toggle the various windows).

Posts: 1030

Thanks Laughing out loud added the issue ^^

Posts: 1691

Thanks! On a side note, mind also using the issue report macro (the bug with the ! on it)? I love having everything cross-referenced in a standardized way. I'm such a data-processing whore. Tongue