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

Pages: 1 [2]
16
Window / Re: Input with winapi?
« on: October 24, 2009, 08:08:43 pm »
Quote from: "ShadowDancer"

Is possible to take mouse input via render window, when i'm using Winapi?

[...]

And MouseX/Y is 0. Winapi changes smthing? I should take mouse from view or what?


Just in RenderWindow instance values myMouseX and myMouseY is 0, idk why...

17
Window / Input with winapi?
« on: October 24, 2009, 07:47:56 pm »
But winapi input sucks :/ Anyway to get this input? I need pointer to render window...

18
Window / Input with winapi?
« on: October 24, 2009, 06:08:04 pm »
Code: [Select]
sf::RenderWindow *Render;
   HWND hWindow, Render_Window;
   MSG Msg;

main()
{
   WNDCLASSEX KlasaOkna;
   ZeroMemory (&KlasaOkna, sizeof(WNDCLASSEX));
   KlasaOkna.cbSize = sizeof(WNDCLASSEX);
   KlasaOkna.hInstance = hInstance;
   KlasaOkna.lpfnWndProc = WindowEventProc;
   KlasaOkna.lpszClassName = WindowClass.c_str();
   KlasaOkna.hCursor = LoadCursor(NULL, IDC_ARROW);
   KlasaOkna.hIcon = LoadIcon(NULL, IDI_APPLICATION);
   KlasaOkna.hbrBackground = (HBRUSH) COLOR_WINDOW;
   RegisterClassEx (&KlasaOkna);
   // tworzymy okno funkcją CreateWindowEx
   hWindow = CreateWindowEx(NULL,                   // rozszerzony styl
                          WindowClass.c_str(), // klasa okna
                          WindowCaption.c_str(),       // tekst na p. tytułu
                          WS_SYSMENU,   // styl okna
                          CW_USEDEFAULT,         // współrzędna X
                          CW_USEDEFAULT,         // współrzędna Y
                          800,         // szerokość
                          600,         // wysokość
                          NULL,                  // okno nadrzędne
                          NULL,                  // menu
                          hInstance,             // instancjs aplikacji
                          NULL);                 // dodatkowe dane
DWORD Style = WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS;
HWND  Render_Window = CreateWindow("STATIC", NULL, Style, 0,  0, 800, 600, hWindow, NULL, hInstance, NULL);
sf::RenderWindow View01(Render_Window);
Render = &View01;
ShowWindow (hWindow, SW_SHOW);

while (Msg.message != WM_QUIT)
{
   if (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE))
   {
         TranslateMessage (&Msg);
         DispatchMessage (&Msg);
   }
   else
   {
    sf::Event Event;
    while (Render->GetEvent(Event))
    {
        // Process event
    }
Display_FPS();
float32 timeStep = 1.0f / 60.0f;
int32 iterations = 10;
B2DWorld->Step(timeStep, iterations);

int Mouse_X = Render->GetInput().GetMouseX(), Mouse_Y = Render->GetInput().GetMouseY();
Render->Clear(sf::Color(255, 255, 255));

Button.Display(Render, DeltaTime);

Render->Display();
   }
}
[/code]

19
Graphics / Masked Color?
« on: October 24, 2009, 06:05:57 pm »
Ach, true. I switched 0 as full visible and 255 as no visible.

20
Graphics / Masked Color?
« on: October 24, 2009, 04:52:19 pm »
What will be color of masked image?
I have image as button, and i want to decect when user click, but image have some masked parts. I tried with GetPixel, but it return hmm impossible values(at start it's 3,0,3,0. and r and b values increasing over time). Anyway to solve it?

21
Window / Input with winapi?
« on: October 24, 2009, 02:06:15 pm »
I have question:
Is possible to take mouse input via render window, when i'm using Winapi?
I'm currently doing it like this:
Code: [Select]

sprintf( Buffer, " MouseX: %d MouseY: %d", Render->GetInput().GetMouseX(), Render->GetInput().GetMouseY() );


And MouseX/Y is 0. Winapi changes smthing? I should take mouse from view or what?

22
Graphics / Rendring to image?
« on: October 12, 2009, 11:10:36 pm »
Can i do something like render to texture in opengl?

I want render ex. blood on backround image and later display it. Is it possible?

I looked on render window, but it can render to view, but not to image. Is anyway here?

23
Graphics / Masking sprites.
« on: September 16, 2009, 10:20:45 pm »
So here's no way to get textured polygons like Soldat? hmm so...
But what u mean with sprites? Ex. Color(200, 255, 255) will change red(255) in image to 200?

24
Graphics / Masking sprites.
« on: September 16, 2009, 09:27:37 pm »
I have 2 more questions:
1. Is possible to make textured shapes
2. I can make hmm. Change palette of sprite? Ex. add to sprite +10 to red color(but w/o image manipulation); what will do void sf::Drawable::SetColor?

25
Graphics / Masking sprites.
« on: September 16, 2009, 08:37:00 am »
Thanks, blending is very hard for me(mask can make with paint) :>

26
Graphics / Masking sprites.
« on: September 15, 2009, 11:18:37 pm »
As topic, here is something like that? I really must use blending?

Pages: 1 [2]
anything