Graphics.RunningFullscreen - lordmundi/wikidoctest GitHub Wiki
Running Fullscreen
« Exclude A Model From Casting Shadows | EDGE User’s Guide | Running without a border and blipper menu »
It is often useful to have the EDGE window maximized. There are various ways to do this. Depending on the situation, some may be more appropriate than others.
Method 1
Click the maximize button after the window pops up
Method 2
Run with the "-fullscreen" option. This can be done many ways, such as manually adding it to the physical command line or by adding it in the EDGE command_line block in your user.cfg
$ ./run_graphics -fullscreen
This works well in many cases. But sometimes, (particularly in the case of NVIDIA's twinview) this doesn't give the desired effect. In that case, what you want is a tcl script that will size the window like you want it. Hence, method 3.
Method 3
Use a tcl script in your gui block to resize the window at init. As an example of how to do this, you can see Brad’s fullscreen_helper.tcl script which resizes the screen and also adds a right-click option to toggle the menu bar. Feel free to customize the script for your own preferences.
Method 4 (the new way!)
Since tk 8.5, there is now a new command that makes running fullscreen much easier. In fact, this new method also appears to be multi-monitor aware, so this won't stretch your window across multiple monitors (which is not normally what people want - if you want that, use the -fullscreen command line switch). If you want to write your own tcl script to manage the fullscreen operation, it is as simple as:
global fullscreen_on
set blipper [doug.display get -main_window]
wm attributes $blipper -fullscreen 1
set fullscreen_on 1
That will make the window fullscreen on the monitor that the window started on and retain keyboard and mouse focus, so you can still click menus, edit nodes, and fly with the keyboard.
Similarly, if you want to turn the menu off at the top, you could use:
global menu_on
set menu_on 0
$blipper configure -menu {}
update
To make things even easier to toggle fullscreen on and off, and toggle the blipper menu at the top on and off, you can use the updated fullscreen_helper2.tcl script. Just source that file in your GUI block and you should have two new menu entries when you right click on a viewport. It contains the code above for toggling the menu and the fullscreen on and off.
« Exclude A Model From Casting Shadows | EDGE User’s Guide | Running without a border and blipper menu »