struct DYNBOXEdit = [ DYNBOXwin : ObjWin, DYNBOXfile : ObjText ] mkDYNBOXEdit;; typeof boxedit=DYNBOXEdit;; fun DYNBOX_DestroyInterface () = _DSwindow boxedit.DYNBOXwin; set boxedit.DYNBOXwin = nil; set boxedit = nil; 0 ;; fun DYNBOX_Close (win, boxedit) = DYNBOX_DestroyInterface ;; fun DYNBOX_SelectBox (s, type, checked) = if (_checkpack s)==nil then ( _DLGMessageBox _channel nil (_loc this "DL_ERROR" nil) (_loc this "ERROR_FILE" s::nil) 0; nil ) else ( _SETtext boxedit.DYNBOXfile s; C3D_ChangeBox s 1 ) ;; fun DYNBOX_ChangeBox (btn, boxedit) = openExplorateur 200 20 EXPLO_SELECT|EXPLO_BOX @DYNBOX_SelectBox nil nil; 0 ;; fun DYNBOX_SetLocalPhysics (check, boxedit, state) = C3D_SetPhysics state ;; fun DYNBOX_SetGlobalPhysics (check, boxedit, state) = if state then C3D_ActivatePhysics 1 else C3D_DeactivatePhysics 1 ;; fun DYNBOX_CreateInterface (x,y,father)= if boxedit != nil then ( _TOPwindow boxedit.DYNBOXwin; 0 ) else ( let _CRwindow _channel father x y 300 160 WN_MENU (_loc this "DYNBOX_TITLE" nil) -> win in set boxedit = mkDYNBOXEdit [ win _CRtext _channel win 10 100 280 20 ET_ALIGN_CENTER|ET_DOWN C3D_GetBoxFilename ]; _CBwinClose boxedit.DYNBOXwin @DYNBOX_Close boxedit; _SETcheck _CBcheck _CRcheck _channel boxedit.DYNBOXwin 10 20 280 20 0 (_loc this "DYNBOX_PHYSICS" nil) @DYNBOX_SetGlobalPhysics boxedit if C3D_IsGlobalPhysicsActivated then 1 else 0; _SETcheck _CBcheck _CRcheck _channel boxedit.DYNBOXwin 10 40 280 20 0 (_loc this "DYNBOX_LOCALPHYSICS" nil) @DYNBOX_SetLocalPhysics boxedit if C3D_IsPhysicsActivated then 1 else 0; _CRtext _channel boxedit.DYNBOXwin 10 80 280 20 ET_ALIGN_CENTER strcat (_loc this "DYNBOX_CURRENTBOX" nil) " :"; _CBbutton _CRbutton _channel boxedit.DYNBOXwin 10 130 280 20 0 (_loc this "DYNBOX_CHANGE" nil) @DYNBOX_ChangeBox boxedit; 0 ) ;;