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

Pages: [1]
1
DotNet / Using Multiple views
« on: January 24, 2011, 08:17:38 am »
It's because I'ma beginner and I'm not much on the subject. It has a tutorial on the website but it just work with the view of the app: S
What I not know do is to define the content of view.
If I could give me an example code as follows:
I have two sprites I want everyone to stay in one view:
sprite1 => view1
sprite2 => view2
Thank you.
(sorry for the bad tradution. is google tradutor :P)

2
DotNet / Using Multiple views
« on: January 24, 2011, 04:23:31 am »
Hello
I am creating a tile-based RPG and I have a doubt about scrolling the map. If I use the default view of the window, objects as hud go to scroll along. Is there any way to use multiple views to do this?
Thanks.

3
DotNet / [SFML2]RenderWindow.DefaultView.ViewPort not Working
« on: January 10, 2011, 06:33:18 am »
Hello
I was doing some testing with SFML and when I tried to resize the viewport has not worked as she kept the old one.
The code is below:
Code: [Select]
using System;
using SFML.Audio;
using SFML.Window;
using SFML.Graphics;
namespace Example
{
    class Program
    {
        static RenderWindow app;
        static void OnClose(object sender, EventArgs e)
        {
            // Close the window when OnClose event is received
            RenderWindow window = (RenderWindow)sender;
            window.Close();
        }
        static void KeyPressed(object sender, KeyEventArgs key)
        {
            app.SetSize(800, 600);
            app.DefaultView.Viewport = new FloatRect(0, 0, 800, 600);
        }
        static void Main(string[] args)
        {
            // Create the main window
            app = new RenderWindow(new VideoMode(300, 200), "SFML window");
            app.Closed += new EventHandler(OnClose);
            app.KeyPressed += new EventHandler<KeyEventArgs>(KeyPressed);
            // Create a graphical string to display
            Font arial = new Font("C:/Windows/Fonts/arial.ttf");
            Text text = new Text("Hello SFML.Net", arial);
            // Start the game loop
            while (app.IsOpened())
            {                
                // Process events
                app.DispatchEvents();
                // Clear screen
                app.Clear();
                // Draw the string
                app.Draw(text);
                // Update the window
                app.Display();
            }
        }
    }
}


This same code in C + + work correctly ...
Code: [Select]
#include <SFML/Graphics.hpp>
 int main()
 {
     // Create the main window
     sf::RenderWindow App(sf::VideoMode(300, 200), "SFML window");
     // Create a graphical string to display
     sf::Font Arial;
     if (!Arial.LoadFromFile("C:/Windows/Fonts/arial.ttf"))
         return EXIT_FAILURE;
     sf::String Text("Hello SFML", Arial, 30);
     // Start the game loop
     while (App.IsOpened())
     {
         // Process events
         sf::Event Event;
         while (App.GetEvent(Event))
         {
            if (((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape)))
            {
                App.SetSize(800,600);
                App.GetDefaultView().SetFromRect(sf::FloatRect(0,0,800,600));
            }
         }
         // Clear screen
         App.Clear();
         // Draw the string
         App.Draw(Text);
         // Update the window
         App.Display();
     }
     return EXIT_SUCCESS;
 }


PS: I am working with SFML2

4
DotNet / SFML is compatible with .net Framework 4.0?
« on: December 28, 2010, 12:39:52 am »
Hello.
I want to know if sfml is compatible with the version 4.0 of the .net framework.

5
DotNet / Controlling fps
« on: September 05, 2009, 12:49:01 am »
Hello.
How to control the fps in game?

6
DotNet / how to work without renderwindow?
« on: September 03, 2009, 08:41:57 pm »
Thanks for your help.
But the application crashes as soon as it starts, do not know what is wrong.
Here is the project in visual studio if you can analyze what is wrong, I will be eternally grateful.
And sorry for my ignorance, it is because I am a little beginner.
http://www.4shared.com/file/129959446/cc2af22/WindowsFormsApplication2.html

7
DotNet / how to work without renderwindow?
« on: September 03, 2009, 02:23:06 am »
But how do this?
Could you give an example?

8
DotNet / how to work without renderwindow?
« on: September 02, 2009, 10:14:04 pm »
Hello.
I am beginner in the SFML and have a question.
       
How to integrate SFML with windows forms?
The part of the window will use the windows forms and the part of the game will use the SFML.
Thanks.
(sorry for the bad english, I am brazilian)

Pages: [1]
anything