Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
251 views
in Technique[技术] by (71.8m points)

c++ - Is there any function to give back control to console window from SFML rendered window for user input?

basically I am making a Bricks and Bat Game in a project assigned to me by my university. I am using SFML for it. The compiler is Microsoft VS 2019. Now the problem is that we know in SFML program two windows open. One is the console window and the other is the window that has been rendered by coder in code. For keys press and other inputs the console window is required to be active. But as soon as the code begin to execute, the rendered window comes above console window and thus becomes active window. The console window becomes deactivated and we have to click on it manually to put control on it for user input. So is there any function which itself makes console window active?

question from:https://stackoverflow.com/questions/65617627/is-there-any-function-to-give-back-control-to-console-window-from-sfml-rendered

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...