Configure the viewport/window (make it resizable/movable)

0

Hey!

When i start the exe from a project in the Bin64vc120 folder, the window-size is fixed, i can't move it (if i alt tab out) and can't leave the window with my mouse. This is pretty annoying :/ can anybody tell me how i can make the windows responsive, e.g. resizable, movable and that i can leave the window with my mouse? I could not find anything where i can do this.

Thanks in advance :-)

SH

preguntada hace 7 años187 visualizaciones
7 Respuestas
0
Respuesta aceptada
AzFramework::InputSystemCursorRequestBus::Event(AzFramework::InputDeviceMouse::Id, &AzFramework::InputSystemCursorRequests::SetSystemCursorState, AzFramework::SystemCursorState::UnconstrainedAndVisible);

In C++ you can allow the mouse to leave the window by using the above code. Give that a shot and let me know how it turns out :D

respondido hace 7 años
0

You can hit the console key " ` " to pull up the console and regain your mouse to move outside the window.

Otherwise you would need to run the various console commands to change the window size. You can also use DumpCommandsVars to get all possible console commands.


r_width = 1920
r_height = 1080
r_fullscreen = 1
respondido hace 7 años
0

the latest 1.9.0.1

respondido hace 7 años
0

That does not answer my question though. I want to do that for a clean release build, where i can resize the window just as every normal application can.. I mean with c++ (or lua, did not find anything for flowgraph) that you can make the window responsive <.<

respondido hace 7 años
0

@SilvanHau, which version of Lumberyard are you currently using?

respondido hace 7 años
0

Also, D3DSystems.cpp is explicitly disabling window resizing:

m_dwWindowStyle &= ~WS_THICKFRAME; //< remove this line to allow resizing

After enabling WS_THICKFRAME, you'll need to capture the WM_SIZING event to update rendering if you'd like the aspect ratio to update with the screen width and height. Let me know if you need any help with that too : )

respondido hace 7 años
0

@SilvanHau, for window resizing using the mouse, it turns out that CSystem forwards the resize as a ESYSTEM_EVENT_RESIZE... DriverD3D intercepts it and does nothing. I've added a new feature request for the Lumberyard team; I'll reply to this post once any updates are added :)

I'm going to do some research regarding allowing the mouse cursor to leave the window, stay tuned!

respondido hace 7 años

Está publicación está cerrada: la opción de añadir nuevas respuestas, comentarios y votos está deshabilitada.