tk_pushdialog(200, 300, "Dialog 1")
// n1
widg% = tk_widget("some widget")
// n1
tk_framestart("test1")
combo%= tk_combobox("one|two|three")
tk_framestart()
but% = tk_button("Exit", "on_exit")
text% = tk_text("Edit me")
tk_frameend()
tk_frameend()
// n1
tk_framestart()
radio%= tk_radio("One|Two|Three")
tk_newline()
check%= tk_checkbox("Check me")
tk_newline()
list% = tk_listbox("one ( 1 )|two|three", FALSE)
ogl% = tk_opengl(320,320)
tk_frameend()
tk_set_val(list%, 2)
AUTOPAUSE FALSE
WHILE TRUE
tk_main_loop()
DRAWRECT 0,0,60*SIN(GETTIMERALL()/10),60,RGB(255,0,0)
PRINT tk_get_text$(widg%) + ":" + tk_get_val$(widg%) ,0,0
PRINT tk_get_text$(but%) + ":" + tk_get_val$(but%) ,0,20
PRINT tk_get_text$(text%) + ":" + tk_get_val$(text%) ,0,40
PRINT tk_get_text$(radio%) + ":" + tk_get_val$(radio%),0,60
PRINT tk_get_text$(check%) + ":" + tk_get_val$(check%),0,80
PRINT tk_get_text$(list%) + ":" + tk_get_val$(list%),0,100
PRINT tk_get_text$(combo%) + ":" + tk_get_val$(combo%),0,120
tk_gl_swap(ogl%) // SHOWSCREEN
WEND
SUB on_exit:
END
ENDSUB
result:
(http://img222.imageshack.us/img222/3330/dialog176pngsh3.th.png) (http://img222.imageshack.us/my.php?image=dialog176pngsh3.png)(http://img222.imageshack.us/images/thpix.gif) (http://g.imageshack.us/thpix.php)
...really. I'm so excited, I clicked "buy me a beer" 5 times already :S
Looks rather good!
great work. And it runs within a normal GLBasic window?
:good: Very good and I like the syntax! Well done Gernot!
You're right. Now I see it. But I'm not sure if I really understand what's going on in this window :S
To quote the Dad in 'Calvin and Hobbes': 'It's magic!'. Like everything else technical in the world. :D
HK you tease!
Someone get that man a beer! ;)
Quote from: Hemlos
Someone get that man a beer!
Or two or three.... But don't drink and type, Kitty. ;)
Cheers
Will this mean that buttons and whatnot can be placed anywhere and retain this position when a window size changes ?
It looks pretty powerful.