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

Pages: [1]
1
Graphics / Aligning text of different sizes based on the baseline
« on: December 21, 2011, 05:32:06 am »
Images are drawn relative to the upper left corner. Text rendered from a font on the other hand is usually aligned based on the "baseline" of the text which cant be calculated from any available sfml font/text properties. I am currently using the .NET bindings and I would like access to the baseline of a rendered glyph in order to align text of differing sizes. Is there some way of calculating the baseline from SFML or am I better off looking into FreeType bindings for .NET?

Basically what I'm looking for is a function which takes in a string and returns how far the baseline is from the "draw position y coordinate".

2
DotNet / Threaded window disappears, still thinks its open?
« on: December 12, 2011, 03:33:22 am »
I am trying to use a SFML window on a separate thread from the main thread (which hosts a GTK window). Whenever I try this, the window immediately disappears. It still runs DispatchEvents, Display, Clear, and IsOpen() returns true. Am I doing something wrong?

Here is a minimal example:

Code: [Select]
   
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using SFML.Graphics;
using SFML.Window;

namespace MessageView
{
    class EntryPoint
    {
        static RenderWindow window = new RenderWindow(new VideoMode(400, 400), "test");
        static Thread thread = new Thread(run);
        static bool running = true;
        static void run()
        {
            while (running)
            {
                window.DispatchEvents();
                window.Clear();
                window.Display();
            }
        }
        static void Main(string[] args)
        {
           
            //thread.Start(); //window will immediately disappear
            //run(); //runs fine

        }
    }
}

3
Window / Getting back window focus
« on: November 15, 2011, 07:20:40 am »
I fear I may know the answer to this question but:

I have a "console application" in VS2010 set up using SFML2.net, and whenever I boot up the game in the debugger, first VS's debug console pops up, and then the SFML window (expected). However, even though the SFML window is physically on top of the debug console, it is the debug console which retains focus. Is there any workaround for this? It means one extra click every time I debug my game.

My fear then is that this is an issue specific to VS or how windows 7 handles focus. It there any way to force the SFML window to the front? Even a system call would be fine since the console will only be there when I'm debugging it. When I remove the console the window is properly in front.

4
DotNet / SFML 2.0 with mono
« on: November 05, 2011, 11:56:38 pm »
I would like to use SFML2.0 with mono. Before I begin trying to get it to work, is this even possible?

More info:
I have successfully built sfml2 with VC++ 2010, and I've used the c++ bindings before. I see that the .net versions use the c binding. Are these available for 2.0?

EDIT2: Just saw that there's a separate repository for CSFML. Is this 2.0?

EDIT3: Got csfml to compile, now trying to get it to gel with .net

EDIT4: After 4 hours of work I got everything to work out! Renders 8000 sprites at 120fps, not too bad!

5
Feature requests / static access to mouse wheel (SFML2)
« on: August 11, 2011, 06:27:01 am »
Can we get static access to the mouse wheel like the other inputs in sfml2? Thanks.

6
Feature requests / SFML2 View GetRect
« on: August 10, 2011, 05:00:32 am »
I just recently switched to 2.0 from 1.6. The one thing I am wishing I had still is sf::View's GetRect method. Where did it go?

I was using it to only draw object which collide with the current view.

Edit: Also, it has also always seemed kind of weird to me to set the position based on the center, whereas other rectangle-like objects are usually specified by their upper left corner. This makes me have to add factors of the view's half size all over the place.

Pages: [1]
anything