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

Pages: [1]
1
Window / How use sf::Event::TextEntered in place of Event::KeyPressed
« on: October 04, 2011, 03:12:28 am »
For text input it's recommended to use TextEntered. But how do I enable the use of TextEntered? If a key is pressed the event received is keypressed. I want to receive textentered only in some cases. Most of time I want to receive keypressed, but when textinput or textarea is selected I wanto to receive textentered.

2
Graphics / How to make a sprite that scale keeping the border radius?
« on: September 27, 2011, 01:27:32 am »
I want to make a sprite like these:
http://alignedleft.com/blog/wp-content/uploads/2010/07/Amazing-Button-Active-Border.png
http://alignedleft.com/blog/wp-content/uploads/2010/07/Amazing-Button-Active.png
http://www.ignacioricci.com/tutorials/rounded%20corners/images/tutorial/creating-your-rounded-box-sprite-part2.gif

When I scale the image, only the center is totally scaled. The corners isn't scaled, the horizontal edges is scaled by x factor only and the vertical edges is scaled by y factor only.
How can I make this? Using a class with 4 sprites(one for center, one for corners, one for vertical edges and one for horizontal edges)? :?  :?:

3
General / About SFML version 2
« on: September 15, 2011, 03:00:13 am »
The problem is that I'm trying to compile sfengine. But its use an old SFML2 snapshot. Many methods and classes are changing. For example, now I get an compiler error that sf::Input is not declared. And I saw in documentation sf::Input does not existe now. I don't who is the author of sfengine, but perhalps I send my changes. I'm adapting sfengine to last sfml snapshot. I want to make this works.
I am already two hours in this loop:

while (!lib.Compile()) {
.   SeeCompilerError();
.   GoToLineError();
.   ReadDocAt("www.sfml-dev.org/documentation/2.0");
.   while(!FindASolution()) {    
.     ReadDocAgain();
.     if(!FindASolutionYet())
.       ReadTheForum();
.  }
}

4
General / About SFML version 2
« on: September 15, 2011, 02:45:30 am »
And how do I make a screenshot now? Before I'd use RenderWindow::Capture. But I saw a change and this was make by Image::CopyScreen. But I don't find this method now! Is there any method to do a screenshot yet?
=======================================
Had RenderWindow::Capture go back? It's in documentation. o_O
Where I saw that now the method is Image::CopyScreen?

5
General / About SFML version 2
« on: September 15, 2011, 02:32:14 am »
I want to know about SFML2. What are the main changes from the previous version 1.6?
  From what I understand today, sf::String now is called sf::Text and the current sf::String is to handle strings, now drawable texts. sf::Image   still represents a bitmap, but sf::Texture is used for rendering and is armazened in gpu memory.
  Am I right? And about performance? What was improved?
  Is it recommended to use sfml2 or is better I continue using sfml1.6? I see many projects like Thor and Sfengine using SFML2. Is it stable enough?
Speaking of which, I remembered Thor. When I would use the previous version, you could not sar Thor. But I'm thinking of using this version, so I'll learn how to work in thor. Mainly because she has a nice particle system. The system of particles Spark is also good, but difficult to configure it in linux.

6
Graphics / Just to be sure. Does SFML use OpenGL for render shapes?
« on: September 03, 2011, 07:10:40 pm »
Title says all. I'd like to use OpenGL or SFML to make vectors shapes. This shapes will be used in UI in my game. I thought about using cairo, but the performance is slow. Will be each line in a shape a call to glVertex?

7
Window / Adjusting window to screen format
« on: July 14, 2011, 02:45:05 pm »
i found this:
sf::VideoMode::GetMode() and sf::VideoMode::GetModesCount().
I can get how many modes are supported and I choose one.

8
Window / Adjusting window to screen format
« on: July 14, 2011, 03:45:29 am »
I want to make a game in fullscreen mode. And this game can to be played in normals or in wide screens. The game is a side-scrolling game. If the monitor is a widescreen(16:9), the game will display a larger map area. And if is a normal screen(4:3), the game will display a smaller area. In SDL I can to use SDL_ListModes() for list which modes are supported in gamer's screen. I want to do this in sfml. I want to list supported resolutions for choose one in this list. SDL_ListModes() returns a array of Rects. Rect->h and Rect->w is a supported resolution.

Pages: [1]