Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jgreene

Pages: [1]
1
Feature requests / Re: create sf::Joystick::Button enum
« on: April 22, 2017, 02:37:59 am »
ok.

2
Feature requests / Re: create sf::Joystick::Button enum
« on: April 21, 2017, 08:47:19 pm »
maybe I should just create a local enum  my::HotKey::"HotKeyName"  as a struct {type="Joystick";key={0,1}}  and rewrite some of the other code I'm working on(probably have to anyway).. I could just be trying to oversimplify by getting it so sf::Joystick::isButtonPressed() takes a single enumerated value (like the other major input types) rather than a  pair...granted it'd be an enum list 256 entries long.. but if it was a single byte...
0x00-0x1f could be Joystick0Button0-Joystick0Button31
0x20-0x3f could be Joystick1Button0-Joystick1Button31
0x40-0x5f could be Joystick2Button0-Joystick2Button31
0x60-0x7f could be Joystick3Button0-Joystick3Button31
0x80-0x9f could be Joystick4Button0-Joystick4Button31
0xa0-0xbf could be Joystick5Button0-Joystick5Button31
0xc0-0xdf could be Joystick6Button0-Joystick6Button31
0xe0-0xff could be Joystick7Button0-Joystick7Button31
8 sticks, 32 buttons each...
on the other hand I could be completely misunderstanding  how sf::Joystick works....Mouse and Keyboard have nonumeric instance IDs to worry with.

3
Feature requests / Re: create sf::Joystick::Button enum
« on: April 21, 2017, 08:31:56 pm »
Say I'm coding up a preferences/hotkey config routine for my game. I can convert strings like "A" to sf::Keyboard::A, or "MouseMiddle" to sf::Mouse::Middle. I can then in my functions associate "Fire" to {type=Mouse,key=sf::Mouse::Middle} and in my function easily call either sf::Mouse::isButtonPressed(my::HotKey::Fire["key"]) based on Fire being assigned to the enum value with the type set to Mouse. 
I cannot do that (or can I?) with Joystick Buttons as I have to pass 2 values Joystick number and Button number to sf::Joystick::isButtonPressed(unsigned int joystick, unsigned int button). I mean if I could assign my::HotKey::Fire["key"] to be {0,0} and pass Fire["key"] to sf::Joystick::isButtonPressed(my::HotKey::Fire["key"]), then I guess my request would make less sense... as I said I am an amateur at this. Maybe there's already a clean way to do this and I need to go find a nice class  to take or book to read..  :)

4
Feature requests / create sf::Joystick::Button enum
« on: April 21, 2017, 03:57:40 pm »
Both sf::Keyboard and sf:Mouse have enums for all buttons/keys supported. would it be plausible to create sf::Joystick::Button enums.. even something like Joy0Button0 through Joy7Button31 ? Doing so would be useful to facilitate the handling of input configuration.
I'm looking into it, but am an amateur coder at best. It may be that doing so would necessitate changes to sf:Joystick:isButtonPressed which I realize may be undesired.

5
Feature requests / Re: NumpadDecimalPoint/NumpadPeriod missing??
« on: August 25, 2015, 07:00:32 pm »
SFML Version 2.3.x fresh pull from Git (<24hours old)
Fedora 22 custom spin (which I'm developing) both i686 and x86_64  builds see the issue Kernel 4.1.5-200
101 Key USB Keyboard, various laptop keyboards.
All QWERTY US Keyboards.

I'll have to figure out how to determine the answer to that first question set. I would presume I do get an event as it is a standard key. usually found to the right of  the standard US 101key keyboard Numpad0 key. My apologies for my somewhat amateur approach to this as I'm a systems admin and have not performed any deep coding in nearly 15 years, so I'm more than a scoche rusty. Oddly  the use of the other numpad non numeric keys seems to function as expected within the application (EmptyEpsilon/SeriousProton) that I am attempting to crawl  down into the code of... +-*/ all work..  but . on the keypad does not. I'm working on tearing into the code and disassembling things from the wrong direction (top down to the detailed breakdown) to trace it. Looking at the SFML Keyboard::Key enum I noticed the absence of that particular key which seems to be the remaining multifunction US layout keypad key.

6
Feature requests / NumpadDecimalPoint/NumpadPeriod missing??
« on: August 25, 2015, 05:06:18 pm »
It could be me, but I see no Keyboard Key definition for NumpadPeriod and a project I'm working on is not recognizing said key as a result either.

Pages: [1]