PayPal button

BlitzPlus Forums/BlitzPlus Programming/PayPal button

julianbury(Posted 2007) [#1]
I have written some small games. I shall put them on my website as free downloads. If anyone playing them felt so inclined, they could donate what they think the game is worth by pressing the PayPal button. I have a PayPal account, that is not the problem.

The problem is that I do not know how to implement it ...

How do I trigger a visit to a website from inside the game?

The games are written in the non-GUI mode:

Global xres=GadgetWidth(Desktop()) - 6
Global yres=GadgetHeight(Desktop()) - 32
Graphics xres,yres,0,2
etc.

Is it possible? Or must I rewrite them all, using CreateWindow and CreateCanvas?

Advise me, please

Thank you for your kind attention :-)

Julian

:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:<>:


Dabz(Posted 2007) [#2]
Theres a couple of possibilities:-

1) ExecFile("http://www.yoursite.com")

2) Check out the 'HTML Views' in the command reference.

Now since its a non-GUI game, and to save a a faffy rewrite, when the user clicks 'Visit site' or whatever in game, call EndGraphics and have your site pop up in a GUI window using the HTML Views commands.

Put a couple of buttons on there, mark one as 'Return to game' then call Graphics again if they hit that button. You may have to reload all your media.

I've never done that personally, but it should work.

Dabz


julianbury(Posted 2007) [#3]
Thank you Dabz :-)

ExecFile is working wonderfully!

Julian (joolian.net)