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 - Sloped

Pages: [1]
1
Window / Recieving more than one Key at the same time?
« on: July 07, 2009, 04:05:15 am »
Thanks I'll definitely try that.

2
SFML projects / Roller coaster simulator
« on: July 06, 2009, 06:11:45 pm »
Quote from: "Jallen"

I don't know what you mean by "Is it really a GUI system or just hardcoded stuff?" but the GUI_Manager, Button and Label classes could be used with any other SFML project just by copying the files and passing them the correct data when constructing them.


By Gui System or Hardcoded he wanted to know if all of the gui objects and what not were put in your simulation in such a way that they could not be moved to another project easily or if they could.

Hardcoded = Can't move from project unless into the same exact conditions;
Gui System = Dynamic, can be used independently (with the right dependencies of course)

3
Window / Recieving more than one Key at the same time?
« on: July 06, 2009, 01:33:01 pm »
Quote from: "Hiura"
Quote from: "Sloped"
I use a string because during testing I wanted to see different ways i could do different things, such as deleting an entered character and other such things. So when pressing Back it returns a string with the contents of "DEL", my input function takes this, finds the last character in the string and erases it.
The "problem" of string in such a system is copying. You lose performance.

Quote from: "Sloped"
What are "flag"s
I don't have any English tutor about that, sorry, but you can find them on Google with these keywords : bits flags C, I think.


Thanks, but as I said it's testing to find better ways to do tihngs or more dynamic ways :wink:

4
Window / Recieving more than one Key at the same time?
« on: July 06, 2009, 06:03:25 am »
Quote from: "Astrof"
Quote

Key events (KeyPressed, KeyReleased)

    * Event.Key.Code contains the code of the key that was pressed / released
    * Event.Key.Alt tells whether or not Alt key is pressed
    * Event.Key.Control tells whether or not Control key is pressed
    * Event.Key.Shift tells whether or not Shift key is pressed

I think you could use Event.Key.Shift to see if Shift is pressed with the key



Ah thanks, I completely forgot about Event.Key.Shift

5
Window / Recieving more than one Key at the same time?
« on: July 06, 2009, 01:41:38 am »
Quote from: "Daazku"
Why don't you use TextEntered event??


I'm testing different ways to do things.

Quote from: "Hiura"
The problem is that when key == sf::Key::A is true the function return so key == sf::Key::A && key == sf::Key::LShift is never tested.

You can use flag.

Here you use strings as return value. Why don't you use char ? Anyway, flag are the best here.


I use a string because during testing I wanted to see different ways i could do different things, such as deleting an entered character and other such things. So when pressing Back it returns a string with the contents of "DEL", my input function takes this, finds the last character in the string and erases it.

What are "flag"s

6
SFML projects / Re: Roller coaster simulator
« on: July 05, 2009, 10:12:32 am »
Saw this on Facepunch, heh. So what library (if any) are you using to manage your physics?

By the way the interface is really simple and seems to work very well for this kind of project, nice job.

Op, saw the end of the video, great job on your physics.

7
Window / Recieving more than one Key at the same time?
« on: July 05, 2009, 10:09:39 am »
I've been working on my own input system, it works pretty well and I have all of the enterable keys mapped out (aside from the ones that use two inputs) but I seem to have run into a problem, here is my code:

Code: [Select]

if(key == sf::Key::A) return "a";
if(key == sf::Key::A && key == sf::Key::LShift) return "A";


Now the problem is that my input system won't detect both A and LShift or any key and LShift, does anyone know the reason for this and a possible fix?

Pages: [1]