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

Pages: [1] 2
1
General / Re: Build custom GUI for basic Linux
« on: July 06, 2014, 06:46:15 pm »
I just managed to get X11 and a SFML basic render window to work on Ubuntu server. Seems like a promising start :D

Thank you guys!

One thing.
X11 seems like it provides windows which have the general layout (the 3 controll buttons - minimize, close) and title. Am I able to create something totally different? Running a base full screen SFML window in which to create a GUI?

2
General / Re: Build custom GUI for basic Linux
« on: July 06, 2014, 06:07:51 pm »
SFML requires OpenGL, so as far as I know you need at least X running, but you probably don't need gnome, KDE or a similar Desktop Environment on top.
This is what I wanted to ask. If I could run SFML on a plain Linux install which has also X installed on it, and create a GUI thru SFML. In which case even SFGUI would be usable.

I don't see why you should not be able to run a SFML program as the only program on the root window. Should be as simple as having xinit launch your app instead of a window manager/desktop env.
Any idea where I could find out how "having xinit launch my app instead of..." ?

3
General / Re: Build custom GUI for basic Linux
« on: July 06, 2014, 03:37:12 pm »
Not an entire window manager. Use an existing one to build a custom GUI, and I thought SFML could work with this.

For example, could I use SFML on X-server to create the GUI?

4
General / Re: Build custom GUI for basic Linux
« on: July 06, 2014, 03:27:45 pm »
I know of it. I don't understand, though. How can I use SFGUI in a command-only Linux install?

5
General / Build custom GUI for basic Linux
« on: July 06, 2014, 03:15:38 pm »
I'm wondering if I could use SFML to build a GUI for Linux (let's say Ubuntu Server, or any Ubuntu without it's default graphic interface), to build a custom desktop interface.

If it's possible, what are the actual steps require to do this?

6
Network / Re: FTP: find out if it's a file or a folder
« on: March 29, 2014, 01:00:28 am »
Yes, that makes sense. Thank you.

Last quick question:
Is SFML nightly build stable enough to use it in learning?

7
Network / Re: FTP: find out if it's a file or a folder
« on: March 28, 2014, 12:28:00 pm »
Where do I submit that? Github?

For now, if I modify the header file (SFML/Network/Ftp.hpp) and move the method into public scope, would that be a bad idea?

8
Network / Re: FTP: find out if it's a file or a folder
« on: March 28, 2014, 12:03:03 pm »
Wait, I can't get access to private method with inheritance. What was I talking about?

Would making "sendCommand" method protected be a bad suggestion?

9
Network / Re: FTP: find out if it's a file or a folder
« on: March 28, 2014, 09:18:15 am »
Yes, why, yes it works.
I just have to use the "sendCommand" method. But it's private (why?).
Need to inherit in a weird manner.

Command:
NLST  -  Returns a list of file names in a specified directory.
Would help? Are directory considered files?

10
Network / Re: FTP: find out if it's a file or a folder
« on: March 26, 2014, 12:14:07 am »
I need to send a command to the server that gives me information that I shouldn't trust about whether it's a file or a folder.

How do FTP managers do it?

For sending a command to the server, can I extend the sf::Ftp class in order to add a "sendCommand" method?

11
Network / Re: FTP: find out if it's a file or a folder
« on: March 25, 2014, 07:10:43 pm »
Not at a PC now.

Quick question:
All I have is the sf::Ftp interface for the files on the remote server, and all it returns is sf::Ftp::Reponse.
How could I use the lib with that?

12
Network / FTP: find out if it's a file or a folder
« on: March 25, 2014, 05:57:26 pm »
Hello,

Is there any way to find out if a path is directory or file?
The only way I figured is to try and changeDirectory() into every item of the listing returned, if it doesn't work, it's a file.

Is there any other, more applicable, check I could do?

Checking for a .extension of the string won't always work, folders can have dots, files may not have dots.

13
Graphics / Showing an inventory.
« on: February 03, 2011, 09:31:21 pm »
Pretty confused by that code.
Why are you going from x * 9 to x * 9 + 9?
Anyway.

If you have several items, lets say helm, arms, sword and legs.
Make a sf::Image as instance of the class in which you render the bag, big enough to fit all the items, then render to it (pseudo code):
Code: [Select]

void DrawInv(bool BagUpdate) {
    if ( BagUpdate ) {
        for ( int i = 0; i < BagCount; ++i ) {
            Image.RenderTo(Inventory[i]); // put the items image on this image
        }
    }
}
Window->Draw(Image);

Now it only redraws all the stuff if the bag has been updated, else it will only display the already drawn image of the items.

Don't forget the scope rules, Image must be accesible outsire the for loop. Best thing to do is to make a member of the class.

* I don't know the exact code, but you'll find it out, sorry for that.

14
Graphics / Showing an inventory.
« on: February 03, 2011, 09:14:41 pm »
Maybe, if BagUpdate is true, render the bag on a sf::Image and then draw the image every frame (so you will see the actual items).
Displaying the already rendered image of the bag is faster the redrawing the entire bag every frame, so I guess it's a good solution...

15
Network / Back and forth and closing.
« on: February 03, 2011, 07:20:21 pm »
Thanks for the fast reply.

I can't think of anything else then Close() for breaking out of the loop.
Or unblocking the receive/send functions but then it will loop even if there's nothing to process.

OR! Maybe...
If the client disconnects, it sends a packege to the server, letting it know, then the server sends a packege back - the Receive function returns and the loop breaks.
But how would the server do that? Send himself a packege... funny.


About the costum container for sending to the clients:
I can make a container of sockets, and if there is a new connection:
Code: [Select]

Socket = Selector.Wait();
if ( Socket == Listener ) {
    // accept
    // add in selector
    m_ClientSockets.insert(Socket);
}

Now I can
Code: [Select]

for ( loop thru m_ClientSockets )
    m_ClientSocket[i].Send(Packet);

?

Can a socket send while it is receiving? Or it's not the same socket...? (since I copy it)

Pages: [1] 2