blue gui windowed editer by andrew pap23rd Jun 2007 8:25
|
---|
Summary makeing a window app using bulegui Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com hello all you new programers this will get you programming windowed stuff in no time this is just to get youstarted bacause it is only draft the frist thing we want to do is make the window this is simple just type set window on set window title " MY MY " set window size 123,123 do loop this is just a window most darkbasic programers know how to make if you have never seen this code befor play with it .it will help you later on the next step is to start the bluegui plugin if you do not have the plugin you can get it from (http://darkbasicpro.thegamecreators.com/?f=blue) i'll gess you do or you may find it hard to make a text editer ok you start blue by typeing startblue "key","code" and put in at the next line sume were nere the top next we add the line resetmainwindow beceuse darkbasic will forget about bluegui keywords and you will get odd results this must go after the window comands so now your program may look like set window on set window title " MY MY " set window size 123,123 startblue "abc","defghi" resetmainwindow do loo now you can make the editer x = 0 y = 0 sizex = 123 sizey = 123 mainwindow = 0 editer = createEdit(x,y,sixex,sizey,1,mainwindow) to get infomation from the editer is just as sinple as makeing the window is self by using the function getgadgettext() so now we can see the full programs code set window on set window title " MY MY " set window size 123,123 startblue "abc","defghi" x = 10 y = 100 sizex = 100 sizey = 20 mainwindow = 0 editer = createEdit(x,y,sixex,sizey,0,mainwindow) resetmainwindow do `************************************************ added fun `****************** some logic if returnkey() = 1 tex$ = getgadgettext( editer ) endif `****************** display spring ink rbg(rnd(255),rnd(255),rnd(255)),0 text rnd(123),rnd(123), tex$ `************************************ blue gui will disable the escapekey if escapekey()=1 end endif loop |