Full screen should NEVER lost its focus while it is on top view

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Full screen should NEVER lost its focus while it is on top view

Post by Psychophanta »

Code: Select all

ExamineDesktops()
pantallacompleta.b=1:bitplanes.a=DesktopDepth(0):FRX.u=DesktopWidth(0):FRY.u=DesktopHeight(0):RX.u=800:RY.u=600
InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll")
InitSprite():InitKeyboard():InitMouse()
OpenScreen(FRX,FRY,bitplanes,"",#PB_Screen_WaitSynchronization)
CreateLight(0,$EEEEEE,4,4,2,#PB_Light_Point)
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,-1,5,#PB_Absolute)
CreateMaterial(0,0,$aaeecc)
CreateCube(0,1)
CreateEntity(0,MeshID(0),MaterialID(0))
OpenConsole()
cerrada.a=0
While cerrada=0
  ExamineKeyboard()
  If KeyboardPushed(#PB_Key_Escape):cerrada=1:EndIf
  RenderWorld()
  FlipBuffers()
Wend
CloseConsole()
OpenConsole() makes full 3D screen to lost focus, and it ignores the keyboard.
EDIT:
With "lost focus" i mean lost focus AND remains blocking any other view on the screen, i.e., remains on FULL top of any other graphic elements on screen.
Last edited by Psychophanta on Sat Apr 12, 2025 8:14 am, edited 3 times in total.
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
Caronte3D
Addict
Addict
Posts: 1361
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Full graphic screen should NEVER lost its focus

Post by Caronte3D »

Workaround (mouse click):

Code: Select all

ExamineDesktops()
pantallacompleta.b=1:bitplanes.a=DesktopDepth(0):FRX.u=DesktopWidth(0):FRY.u=DesktopHeight(0):RX.u=800:RY.u=600
InitEngine3D(#PB_Engine3D_NoLog,#PB_Compiler_Home+"Compilers\Engine3d.dll")
InitSprite():InitKeyboard():InitMouse()
OpenScreen(FRX,FRY,bitplanes,"",#PB_Screen_WaitSynchronization)
CreateLight(0,$EEEEEE,4,4,2,#PB_Light_Point)
CreateCamera(0,0,0,100,100)
MoveCamera(0,0,-1,5,#PB_Absolute)
CreateMaterial(0,0,$aaeecc)
CreateCube(0,1)
CreateEntity(0,MeshID(0),MaterialID(0))
OpenConsole()
mouse_event_(2,0,0,0,0)
mouse_event_(4,0,0,0,0)
cerrada.a=0
While cerrada=0
  ExamineKeyboard()
  If KeyboardPushed(#PB_Key_Escape):cerrada=1:EndIf
  RenderWorld()
  FlipBuffers()
Wend
CloseConsole()
Fred
Administrator
Administrator
Posts: 18220
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Full graphic screen should NEVER lost its focus

Post by Fred »

Of course it can loose focus, you can also alt-tab it.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Re: Full graphic screen should NEVER lost its focus

Post by Psychophanta »

Fred wrote: Fri Apr 11, 2025 10:58 am Of course it can loose focus, you can also alt-tab it.
Ok, I refer lost focus while remains on top of any other screen view. (I Proceed to fix description in the first post).
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
Post Reply