简体   繁体   English

通过SDL 1.2的多个窗口?

[英]Multiple windows via SDL 1.2?

I am just making a "Paint" program. 我正在制作一个“绘画”程序。 I completely made the canvas. 我完全做了画布。 Now I want to make a toolbar but when I use 现在我想制作一个工具栏,但是当我使用

SDL_Surface *toolbar = SDL_SetVideoMode( ... );

canvas disappears and toolbar appears. 画布消失,出现工具栏。 Is there any way to have 2 (or more) windows in SDL? 有什么办法可以在SDL中拥有2个(或更多)窗口?

*note: I am using SDL 1.2. *注意:我正在使用SDL 1.2。

There is no way with SDL 1.2, but with SDL 2, this became possible ( SDL_CreateWindow*() ) . SDL 1.2无法实现,但是SDL 2可以实现( SDL_CreateWindow*() )。 Note that, this is true only for a true window (ie detachable toolbar), not a toolbar embedded into your application. 请注意,仅对真实窗口(即可分离工具栏)有效,而对应用程序中嵌入的工具栏无效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM