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

Pages: [1] 2 3
1
Feature requests / bitmask cursor
« on: June 29, 2008, 08:26:03 am »
cool thanks, i have been playing around with it and in any case might not choose such a thing after all, i have been doin exactly what you been saying above, and it is fairly easy to implement, i am goin to look through the graphics package as well because i haven't actually used and of the 2d features you offer, the main problem i had was detecting whether mouse has left the window,so will be lookin into that as well

sorry, this sounded like a cool idea, until i experimented more with it, i might just go look at the different cursor types already available and use those - for myself that is. :wink:

2
Feature requests / bitmask cursor
« on: June 29, 2008, 03:36:58 am »
hi,

this is not really a feature request,

i am adding some bitmask cursors into an application i am building,
they consist of some of the standard cursor types,

i am going to build it into the sfml window package.basically what i will do is have a method say, sfCreate_Cursor(cursor type), and this will automatically hide the default cursor, and display the created cursor which is created from a preset array,

i need this for my prog,  i havent seen it in the source or manual, didnt look very hard though, but wanted to know if you would be interested in this

actually now that i think about this the implentation might be difficult, as the cursor would have to be drawn i guess last in a 2d-opengl overlay, so not quite sure how this would fit in, perhaps if it sounds like something that might add to sfml and you interested, you could give thoughts on the implementation,

3
Window / mouse coord out until resize by any amount
« on: June 28, 2008, 10:26:22 pm »
cool no worry, i will grab the updates, was merely what i came up with in the situation, and worked, but thanks.

4
Window / mouse coord out until resize by any amount
« on: June 28, 2008, 03:12:50 am »
ok here we go this was the only part i needed to change,

Code: [Select]

////////////////////////////////////////////////////////////
/// Create the window implementation
////////////////////////////////////////////////////////////
WindowImplWin32::WindowImplWin32(VideoMode Mode, const std::string& Title, unsigned long WindowStyle, WindowSettings& Params) :
myHandle          (NULL),
myCallback        (0),
myCursor          (NULL),
myKeyRepeatEnabled(true)
{
    // Register the window class at first call
    if (ourWindowCount == 0)
        RegisterWindowClass();

//    changes here
    int Left   = (GetDeviceCaps(GetDC(NULL), HORZRES) - Mode.Width)  / 2;
    int Top    = (GetDeviceCaps(GetDC(NULL), VERTRES) - Mode.Height) / 2;

    //first calculate outer dimension
    int Width  = Mode.Width;
    int Height = Mode.Height;


//  
    //then calculate dimensions of render view
    myWidth  = Width - (2*GetSystemMetrics( SM_CXSIZEFRAME ));
    myHeight = Height - (2*GetSystemMetrics( SM_CYSIZEFRAME )) - GetSystemMetrics( SM_CYCAPTION );


    // Choose the window style according to the Style parameter
    DWORD Win32Style = WS_VISIBLE;
    if (WindowStyle == Style::None)
    {
        Win32Style |= WS_POPUP;
    }
    else
    {
        if (WindowStyle & Style::Titlebar) Win32Style |= WS_CAPTION | WS_MINIMIZEBOX;
        if (WindowStyle & Style::Resize)   Win32Style |= WS_THICKFRAME | WS_MAXIMIZEBOX;
        if (WindowStyle & Style::Close)    Win32Style |= WS_SYSMENU;
    }

    // In windowed mode, adjust width and height so that window will have the requested client area
    bool Fullscreen = (WindowStyle & Style::Fullscreen) != 0;
    /*  if (!Fullscreen)
    REMOVED THIS AND OPTED FOR TOP AS IT WAS THROWING OUT, I THINK,EITHER WAY NOT NEEDED
    */

    // Create the window
    if (HasUnicodeSupport())
    {
        wchar_t WTitle[256];
        int NbChars = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, Title.c_str(), static_cast<int>(Title.size()), WTitle, sizeof(WTitle) / sizeof(*WTitle));
        WTitle[NbChars] = L'\0';
        myHandle = CreateWindowW(ourClassNameW, WTitle, Win32Style, Left, Top, Width, Height, NULL, NULL, GetModuleHandle(NULL), this);
    }
    else
    {
        myHandle = CreateWindowA(ourClassNameA, Title.c_str(), Win32Style, Left, Top, Width, Height, NULL, NULL, GetModuleHandle(NULL), this);
    }




i checked the resize event and that is fine, and is the only other place that i could see that myWidth/myHeight was being changed,
also checked fullscreen mode and seemed to work just fine,


later.

5
Window / mouse coord out until resize by any amount
« on: June 28, 2008, 02:58:18 am »
ok i have come up with a solution will post it now, actually very very simple!

just need to add check for fullscreen mode.as the problem was just calculate interior render window.

6
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 02:03:13 pm »
yeah i also noticed that, that the screen dimension that i print out shrinks  when i resize, even though the height has not changed at all, but been at work the whole day, going to look more at it this weekend, one of us is going to solve this soon as it is not many files to deal with.


edit-->add

also thanks SirJulio, that definitely seems to be where the problem lies, at first i thought it might be something just with getdesktop, but if i do something like the following


Code: [Select]

sfVideoMode Mode = {GetSystemMetrics( SM_CXSCREEN )-x, GetSystemMetrics( SM_CYSCREEN )-x, 32};


and i start x at 0, and increment, only when x reaches 25 will my screen and input behave.

7
Window / [Solved] Input Problem!
« on: June 27, 2008, 01:56:58 pm »
i dont know if you are having the same problem as me, if you look at the recent thread about "mouse coords out until resize" you can see what i am experiencing, i am going to try sort it out this weekend,

just to check, are you running in fullscreen? or desktopmode?? i have experienced problems with these specifically and am trying to track down the bug.

8
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 04:01:51 am »
cool, no luck yet, i am going to look at it this weekend too, i havent made a win32 window in a long time so having to relearn a whole bunch in the process, but i guess it will give me some hair on my chest,

i am actually enjoying the challenge, and hope to solve it, i got a nifty program called source navigator which is helping me stacks to jump around in your code...till anon

9
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 02:32:51 am »
i tried CYSCREEN instead, now this is exactly where mouse input becomes 20px out, as the screen size is perfectly set as a fullscreen desktop but mouse input is out by 20px (repeating myself here)....which means i am wrong about the DEVMODE stuff, that is all fine, the problem possibly lies either in the positioning on the screen, or in the actual input capture, not quite sure, going to go check that out now.

10
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 02:25:23 am »
okay i managed to get things going and want to discuss,

i changed return value of getdesktopmode to this:

   
Code: [Select]

 return VideoMode(GetSystemMetrics( SM_CXFULLSCREEN ), GetSystemMetrics( SM_CYFULLSCREEN ), Win32Mode.dmBitsPerPel);


what this does is give the correct input from mouse, however the screenposition is now 20px lower.

I think dmPelsHeight was getting stuck somewhere on my system, and don't know exactly why, I was guessing my display drivers or monitor (HP 7540) doesnt agree with the DEVMODE stuff

i am going to try SM_CYSCREEN, as SM_CYFULLSCREEN, takes into account the bottom taskbar on windows, I think this will resolve the issue, but not sure how it affects videomode, although I pretty sure nothing bad will come of it.

11
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 01:13:19 am »
i just want to ask a quick question,

this is the first time i am trying something like this so kinda in the deep end here,

if i want to make changes that are reflected in the csfml libs,

i first make changes to the c++ source, compile those libs,

and then compile the c libs, correct?

12
Window / mouse coord out until resize by any amount
« on: June 27, 2008, 12:40:48 am »
ok i got a build workspace up and running, can compile the c++ and c libs, i am going to try check this out,

i have been thinkin though, i understand that you use dmPelsHeight to detect the height of the screen, is this connect in anyway to anything else,

would it not be possible to use GetSystemMetrics( SM_CYFULLSCREEN ), but i am not actually sure if that is where the problem lies in any case but it is where i am first going to start.

13
General / easiest way to hook csfml with sfml workspace
« on: June 27, 2008, 12:18:18 am »
okay, i put the extlibs folder completely outside of the csfml folder, actually directly next to it, it seems to be tracking it to here, i think i have completed the first step, now on to the cygwin stuff,  eeeek!


edit----i read through the tutorial on building in code::blocks, and it talks about one step extra for static libs,

Quote

Compiling SFML static libraries with MinGW requires an extra-step if you want to include the external libraries as well, Code::Blocks can't do it automatically.


but i don't seem to get complaints where i placed the extlibs folder, i can build the static libs, does this sound ok?

14
General / easiest way to hook csfml with sfml workspace
« on: June 27, 2008, 12:09:52 am »
never mind realized i just need to include them in my mingw libs...coolio



okay, not sure where to put extlibs ??

15
General / easiest way to hook csfml with sfml workspace
« on: June 26, 2008, 11:58:38 pm »
hi,

yip, another post,

just want to know what the easiest way would be to connect csfml build workspace with the sfml workspace (code::blocks),  

could i just copy the missing includes from the c++ build source, as well as the other stuff like main, zlib, etc,

and the sfml libs to the csfml/libs folder ??

Pages: [1] 2 3