Opening a web browser?
BlitzMax Forums/BlitzMax Programming/Opening a web browser?
| ||
Is it possible to reliably open a web brower from my game? I seem to remember it being impractical in B3D. I'd like to provide a link to our website. |
| ||
OpenURL( "http://www.hello.com" ) |
| ||
You can use OpenURL() |
| ||
Fantastic. I'll give it a go, cheers. |
| ||
Seems to work fine. When my game is in full screen mode (I'm using B3D SDK) it minimises, which is fine, but when I go back to it some of the graphics are corrupted (environment maps in this case). Is there anything I can do about that other than disabling the feature in full screen mode? |
| ||
What could be an idea is the way they have done this in TrackMania United Forever called manialinks. They created their own type of browser which get information from websites. Good thing about it is that you can keep everything fullscreen and make sure they cannot go anywhere else besides what you decide. Might be a whole lot more work at start, but it will be great in the end. |
| ||
Is there anything I can do about that other than disabling the feature in full screen mode? I'm sure there was a set of commands for reloading graphics after a switch to desktop... |
| ||
You could reload the textures when the player returns, like this:Graphics 640,480 SetBlend alphablend While AppTerminate() = False SetAlpha Rnd(0,1) SetColor Rand(255),Rand(255),Rand(255) DrawRect Rand(0,GraphicsWidth()-20),Rand(0,GraphicsWidth()-20),20,20 If AppSuspended() While AppSuspended() Delay 100 Wend Notify "reload stuff" EndIf Flip Wend |
| ||
Gah! I've just done the whole reload when the user picks another resolution. It'll be an almighty pain to do it at an arbitrary point (loads of types have meshes etc.). This might have to wait till I'm in the right mood. |
| ||
Note that OpenURL wont always open a browser with some versions of Linux. |
| ||
Well my game won't run on any version of Linux so not really a problem for me. |
| ||
John - having used Blitz3D for so long, how are you finding B3DSDK? |