
  % Title "Console Drag & Drrop Image Demo"
  uses consoleG 
  BeginScript

  procedure main()
  ================
  if opening
    static sys res,wi,ht,imgn
    texe++ 'next texture slot
    imgn=texe
    static string wr
  end if
  if filedrop  'drag & drop file
    wr=filedrop
    filedrop=""
    LoadTexture wr,imgn,res,wi,ht
  endif
  cls ' .3,.3,.5
  pushstate
  move 20,-15
  UserMovement m1,100
  '
  'display image
  '
  flat
  color 1,1,1,1
  texture imgn
  scale 15
  quadnorm 1.0,Ht/Wi 'apply image texture to a quad
  texture 0
  popstate
  '
  end procedure 'main

  EndScript