@indi, i'm kind of new to making editors and need help and theres others out there that would like too learn too.
@Vampiric, thats will come in handy, cheers.
Lets start at the beginning, working with windows. This editor need to be in a window that can be resized without scretching or distorting andthing inside the window. I put together bits of code found on the forums to make a render window:
+ Code Snippetsync on
sync rate 60
set window on
set window title "Level Editor"
set display mode 800,600,32
load dll "user32.dll",1
hwnd = call dll(1,"GetActiveWindow")
make memblock 1,16
global wid#=640.0
global hei#=480.0
global wid
global hei
wid=wid# : hei=hei#
defaspect#=wid#/hei#
set display mode wid,hei,32
make object cube 1,10
move camera -5.0
fov#=65.0
do
retval=call dll(1,"GetWindowRect",hwnd,get memblock ptr(1))
posx = memblock word(1,0): posy = memblock word(1,4)
x2 = memblock word(1,8): y2 = memblock word(1,12)
If posy > 3000 Then posy = posy - 65536
If posx > 3000 Then posx = posx - 65536
sizex = x2 - posx: sizey = y2 - posy
roll object left 1,1
pitch object down 1,0.3
turn object right 1,0.6
rat#=(sizex*wid#)/(sizey*hei#*defaspect#)
fov#=164.0-(rat#*100.0)
if fov#<65.0 then fov#=65.0
if fov#>164.0 then fov#=164.0
set camera aspect rat#
set camera fov fov#
text 0,0,"Aspect:"+str$(rat#)
text 0,20,"FOV:"+str$(fov#)
sync
loop
Would this be usful for a render window?