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.


Topics - Fox3

Pages: [1]
1
DotNet / .net clock
« on: November 07, 2010, 02:13:16 am »
Where did it go?

2
Graphics / Black borders in tiles
« on: July 03, 2010, 03:52:06 pm »
I have this tile here, and I made a tiled background with it. But it show some black borders in it. I dont know why :( Can someone help me?

Code: [Select]

    images["BGGround"].LoadFromFile("resources/background/ground.png");
    for(unsigned int i = 0; i < width+2; i++)
    {
        sf::Sprite groundTile;
        groundTile.SetCenter(0,0);
        groundTile.SetImage(images["BGGround"]);
        groundTile.SetPosition(-(float(width)/2 +1)*64+i*64,0);
        background.push_back(groundTile);
    }


Here is a screenshot:

3
System / Backspace problem
« on: June 13, 2010, 11:56:28 pm »
So I made this little textbox here, and when I press backspace it should delete the last character. But it only happens once, like if I press it again nothing happens. The text stays the same.
Here is the code:
Code: [Select]
while(newstagewnd.GetEvent(event))
            {
                if(event.Type == sf::Event::KeyPressed and event.Key.Code == sf::Key::Back)
                {
                    if(titlein.value.size()>0)
                    {
                        titlein.value.resize(titlein.value.size()-1);
                    }
                }
                if(event.Type == sf::Event::TextEntered)
                {
                    if(event.Text.Unicode < 256)
                    {
                        titlein.addinput(static_cast<char>(event.Text.Unicode));
                    }
                }
                if(event.Type == sf::Event::Closed)
                {
                    newstagewnd.Close();
                }
            }

Any help on this?

4
System / Event.Text.Unicode problem
« on: June 13, 2010, 10:42:51 pm »
How do I convert it to string?

5
Graphics / SetText crash
« on: June 13, 2010, 01:33:28 pm »
I have a problem with my code, it suddenly crashes when I SetText :(
Code: [Select]
textbutton okbutton(24, 24, 64, 32);
okbutton.settext("OK", resmgr.fonts["tuffy"]);

Code: [Select]
struct textbutton : button
{
    sf::String text;
    void settext(std::string newtext, sf::Font newfont);
    void drawtext(sf::RenderWindow *app);
    textbutton() : button::button(){};
    textbutton(int nx, int ny, int nw, int nh) : button::button(nx, ny, nw, nh){};
};
void textbutton::settext(std::string newtext, sf::Font newfont)
{
    text.SetFont(newfont);
    text.SetSize(12);
--->text.SetText(newtext);
}

Pages: [1]
anything