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

Pages: [1]
1
Window / Show FPS In Title Bar Window
« on: September 28, 2009, 07:58:21 am »
Wow, I'm surpirsed this thread still kept going. I haven't used SFML in awhile, and forgot, well pretty much everything. Although I'm now thinking of starting up again.

2
I don't which project I was talking about, but the GUI thing looks really nice.

3
Looks nice, it will be great to see when its released.

4
Graphics / String, Variables & Values
« on: August 09, 2009, 01:54:28 am »
Thanks, found a lot of other useful info as well.

5
Graphics / String, Variables & Values
« on: August 08, 2009, 11:04:05 pm »
Hello,

How would I display the value of a variable in a string?

IE.

int Health = 100;

How would I use a string to display "100" in the string have it shown on the window?

6
Graphics / Image Not Showing
« on: August 08, 2009, 10:35:56 pm »
Yes, I am working on it. I have a got an image to show up on the screen. I just need to work with the SFML library more to get the hang of things.

7
SFML projects / SPARK opensource particle engine with an SFML module
« on: August 06, 2009, 09:17:11 pm »
Some nice stuff, really neat features.

8
Window / Show FPS In Title Bar Window
« on: August 06, 2009, 05:27:56 am »
I just wanted to display the FPS in the title bar, but if there's not a lot that can be done about, then its no biggie.

9
Graphics / Image Not Showing
« on: August 06, 2009, 05:26:26 am »
Ah, ok, I need read the docs more carefully then.

10
Graphics / Image Not Showing
« on: August 05, 2009, 08:25:39 pm »
Ah, ok, I'll try re-working my code.

EDIT: I used SetImage(), but nothing is still displayed on the screen.

11
Graphics / Image Not Showing
« on: August 05, 2009, 07:10:40 pm »
Hey Guys,

I went through the examples and tried displaying an image on the screen, but it won't shop up. My code is right and it compiles without errors, but the window is blank. Here's my code.

Code: [Select]

#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string.h>
#include <wchar.h>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/Audio.hpp>
#include <SFML/Network.hpp>

#include "player.h"
#include "vehicle.h"

int main()
{
    sf::RenderWindow App(sf::VideoMode(800,600,32), "Car Junker - DarkScar Games");
   
    const sf::Input& Input = App.GetInput();
   
    bool Logo_Screen = true;
    bool Title_Screen = false;
   
    sf::Image TitleScr;
    sf::Image LogoScr;
   
    if(!TitleScr.LoadFromFile("Title.png"))
    {
        return EXIT_FAILURE;
    }
    sf::Sprite TitleSprt(TitleScr);
   
    if(!LogoScr.LoadFromFile("Logo.png"))
    {
        return EXIT_FAILURE;
    }
    sf::Sprite LogoSprt(LogoScr);
   
    LogoSprt.SetImage(LogoScr);
   
    bool LeftKeyDown = Input.IsKeyDown(sf::Key::Left);
    bool RightKeyDown = Input.IsKeyDown(sf::Key::Right);
    bool UpKeyDown = Input.IsKeyDown(sf::Key::Up);
    bool DownKeyDown = Input.IsKeyDown(sf::Key::Down);
    bool SpaceDown = Input.IsKeyDown(sf::Key::Space);
    bool LeftMouseDown = Input.IsMouseButtonDown(sf::Mouse::Left);
    bool RightMouseDown = Input.IsMouseButtonDown(sf::Mouse::Right);
    unsigned int MouseX = Input.GetMouseX();
    unsigned int MouseY = Input.GetMouseY();
   
    Player* gPlayer = new Player();
    Vehicle* gVehicle = new Vehicle();
   
    sf::Clock Clock;
   
    while(App.IsOpened())
    {
        sf::Event Event;
       
        App.SetFramerateLimit(60);
       
        while(App.GetEvent(Event))
        {
           
            if(Event.Type == sf::Event::Closed)
            {
                App.Close();
            }
           
            if(Event.Key.Code == sf::Key::Escape)
            {
                App.Close();
            }
           
            if(Event.Key.Code == sf::Key::Left)
            {
                LeftKeyDown = true;
                gPlayer->X = gPlayer->X - 5;
            }
            else if(Event.Key.Code == sf::Key::Right)
            {
                RightKeyDown = true;
                gPlayer->X = gPlayer->X + 5;
            }
            else if(Event.Key.Code == sf::Key::Up)
            {
                UpKeyDown = true;
                gPlayer->Y = gPlayer->Y - 5;
            }
            else if(Event.Key.Code == sf::Key::Down)
            {
                DownKeyDown = true;
                gPlayer->Y = gPlayer->Y + 5;
            }
        }
       
        App.Draw(LogoSprt);
       
        App.Clear(sf::Color(0,0,0,0));
       
        App.Display();
    }
   
    return EXIT_SUCCESS;
}

12
Window / Show FPS In Title Bar Window
« on: August 05, 2009, 05:49:26 pm »
Ah, ok, thanks.

13
Window / Show FPS In Title Bar Window
« on: August 05, 2009, 07:16:54 am »
So you're saying that you can't display the framerate or FPS in the title bar window. Only the name of the window.

14
Window / Show FPS In Title Bar Window
« on: August 05, 2009, 04:27:33 am »
Hey Guys,

I was wondering if there was a way to show the FPS or Framerate in the title bar of the window? I've seen it done in other libraries and engines, but I have just started using SFML. Any exmaples, please?

15
General discussions / Is good enough?
« on: August 05, 2009, 02:21:02 am »
Of course its well enough for commerical games. I've just started using it, and I can say its pretty amazing. Its better than SDL.

Pages: [1]