OldSchoolHack

Register / Login English

Verhalten von Input in Source-Games

icon Thread: [Help] Verhalten von Input in Source-Games

Join Date: Jul 2014

Posts: 12

User-Rating:

3 positive
0 negative
Gerade in der MSDN gefunden btw. Du tust aber genau das in der WindowsMessage.cpp ;-)

OSHGui zeichnet den Cursor selber. Trotzdem buggt es zurzeit noch heftig, der Cursor bewegt sich nicht mehr wenn ich SetCursorPos hooke. Ich schaue mal weiter...

Only registered and activated users can see links.

Important  Do not use the Only registered and activated users can see links. or Only registered and activated users can see links. macros to extract the x- and y- coordinates of the cursor position because these macros return incorrect results on systems with multiple monitors. Systems with multiple monitors can have negative x- and y- coordinates, and LOWORD and HIWORD treat the coordinates as unsigned quantities.

Aktueller Ansatz:


TEXT Code:
  1.  
  2. BOOL WINAPI Gui::SetCursorPos(int X, int Y)
  3. {
  4. Implode::Gui->mousePos_ = { X, Y };
  5.  
  6. if (Application::Instance()->IsEnabled() && SDK::Engine->IsConnected() && SDK::Engine->IsInGame() && !SDK::Engine->Con_IsVisible() && !SDK::Engine->IsLevelMainMenuBackground())
  7. {
  8. Application::Instance()->ProcessMouseMessage(MouseMessage(MouseMessage::Move, MouseButton::None, Drawing::Point(X, Y), 0));
  9. }
  10.  
  11. return Implode::Gui->hookSetCursorPos_(X, Y);
  12. }