31
SFML wiki / [Tutorial] Manage dynamic key binding.
« on: July 01, 2008, 10:42:46 pm »
You forgot to translate some comments in the complete source, I fixed it (I believe so anyways)...
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.
Sorry, if it's a little bit off-topic...Seconded, because the reason I use STL vectors is because they're fast, and allow index access with [] and at, otherwise I don't think I'd like STL containers as much.Quote from: "Kernelpanic"
It would be good to use iterators for the loop:
[...]
So you can use easily all types of containers.
Is this faster with iterators or is it just more general and easy to port? What is a reason against indexes?
image frame[2];
//assign images to frame[0,1,2]
if (key == Left)
{
x++;
if(x>2){x=0;}
display_image = frame[x];
}