/******************************************************************************* Plugin Select Client part Version: 4.0 Authors: Jean-Marc PIEDNOIR Last update: 20/07/2005 *******************************************************************************/ //defcom CAvatarUser = CBAvatarUser;; typeof TitleChgLogin = WIN ;; typeof WinChgLogin = WIN ;; /*-------------- :: Variables du menu clic droit :: -------------------*/ //menu général typeof AdmModeMenu = ObjMenu;; //gestion de la carte de visite typeof profil1 = ObjMenuItem;; typeof profil2 = ObjMenuItem;; typeof profil3 = ObjMenuItem;; typeof profil4 = ObjMenuItem;; //gestion du statut debout ou assis typeof pos1 = ObjMenuItem;; typeof pos2 = ObjMenuItem;; //gestion des positions typeof PositionList = [[S r1]r1];; //gestion de la Voix IP typeof Random1 = ObjMenuItem;; typeof VoIP1 = ObjMenuItem;; typeof VoIP2 = ObjMenuItem;; //gestion des fonctions collaboratives typeof collabo1 = ObjMenuItem;; typeof collabo2 = ObjMenuItem;; typeof collabo3 = ObjMenuItem;; typeof collabo4 = ObjMenuItem;; typeof collabo5 = ObjMenuItem;; typeof collabo6 = ObjMenuItem;; //gestion des alertes typeof alert1 = ObjMenuItem;; typeof alert2 = ObjMenuItem;; typeof alert3 = ObjMenuItem;; typeof alert4 = ObjMenuItem;; typeof alert5 = ObjMenuItem;; typeof winalert = ObjWin;; typeof textalert = ObjText;; typeof ButtonOki = ObjButton;; typeof ButtonKo = ObjButton;; typeof email = S;; typeof profil = S;; typeof telephone = S;; typeof adresseip = S;; typeof UrlWeb = CompText;; /*-------------- :: Variables du menu des animations :: -------------------*/ //gestion des humeurs typeof hum1 = ObjMenuItem;; typeof hum2 = ObjMenuItem;; typeof hum3 = ObjMenuItem;; typeof hum4 = ObjMenuItem;; typeof hum5 = ObjMenuItem;; //gestion des STATUTS typeof stat1 = ObjMenuItem;; typeof stat2 = ObjMenuItem;; typeof stat3 = ObjMenuItem;; //gestion des Animations typeof anim1 = ObjMenuItem;; typeof anim2 = ObjMenuItem;; typeof anim3 = ObjMenuItem;; typeof anim4 = ObjMenuItem;; typeof anim5 = ObjMenuItem;; typeof anim6 = ObjMenuItem;; typeof anim7 = ObjMenuItem;; typeof anim8 = ObjMenuItem;; typeof anim9 = ObjMenuItem;; typeof anim10 = ObjMenuItem;; /*-------------- :: CB d'animation du perso passé en parametre :: -------------------*/ fun CBAnimSelectUp(menu,param)= _CHKmenu pos1 1; _CHKmenu pos2 0; ( //_fooS strcat "valeur de pos1 : " itoa _GETcheckMenu pos1; //_fooS strcat "valeur de pos2 : " itoa _GETcheckMenu pos2; _DMSevent this strcat class ".AnimSelect" param nil; 0);; /*-------------- :: CB d'animation du perso passé en parametre :: -------------------*/ fun CBAnimSelectDown(menu,param)= _CHKmenu pos1 0; _CHKmenu pos2 1; ( //_fooS strcat "valeur de pos1 : " itoa _GETcheckMenu pos1; //_fooS strcat "valeur de pos2 : " itoa _GETcheckMenu pos2; //_fooS strcat "valeur de VoIP1 : " itoa _GETcheckMenu VoIP1; _DMSevent this strcat class ".AnimSelect" param nil; 0);; /*-------------- :: CB d'animation de son propre personnage + Msg speak :: -------------------*/ fun CBAnimKey(menu,param)= let strextr param -> list in let hd switchstr list "Key" -> Key1 in let hd tl switchstr list "Key" -> Key2 in let hd switchstr list "Speak" -> Speak in let hd switchstr list "Event" -> Event in ( //_fooS strcat "valeur de Key1 : " Key1; //_fooS strcat "valeur de Key2 : " Key2; //_fooS strcat "valeur de Speak : " Speak; _DMSevent this strcat class ".AnimKey" strbuild ("Key"::Key1::Key2::nil)::nil nil; _DMSevent this strcat class ".Speak" Speak nil; _DMSevent this strcat class Event nil nil; 0);; /*-------------- :: CB de téléport vers une position :: -------------------*/ fun CBTelMode(menu,param)= let strextr param -> list in let hd switchstr list "user" -> pseudo in let hd switchstr list "room_name" -> room_name in let hd switchstr list "position" -> position in let substr position 0 5 -> namepos in ( //_DLGMessageBox _channel nil "fun CBTelMode" strcatn "pseudo\n"::pseudo::"\nroom_name :"::room_name::"\n position : "::position::"\n"::namepos::nil 0;0; _DMSevent this strcat class ".teleport" param nil; // ::-------- si le nom de la position est "place" on force la position assise ------:: if !strcmp namepos "Place" then ( _DMSevent this strcat class ".AnimSelect" strbuild (pseudo::nil)::("Key"::"1"::"49"::nil)::nil nil) else ( _DMSevent this strcat class ".AnimSelect" strbuild (pseudo::nil)::("Key"::"1050"::"1099"::nil)::nil nil); 0);; fun SendOki(obj,identity)= let identity -> [pseudo] in let _GETtext textalert -> texte in let strbuild ("user"::pseudo::nil)::("message"::texte::nil)::nil -> param in ( if texte != nil then _DMSevent this strcat class ".alerte" param nil else nil; 0);; fun SendKo(obj,identity)= _DSwindow winalert; _DStext textalert; _DSbutton ButtonOki; _DSbutton ButtonKo; set textalert=nil;; /*-------------- :: CB de téléport vers une position :: -------------------*/ fun CBAlertSpec(menu,pseudo)= ( set winalert= _CRwindow _channel DMSwin 5 30 200 180 WN_MENU "private"; set textalert= _CReditText _channel winalert 5 5 180 100 ET_AVSCROLL ""; set ButtonOki= _CRbutton _channel winalert 5 150 120 16 PB_DEFAULT strcat "envoyer à " pseudo; set ButtonKo= _CRbutton _channel winalert 130 150 60 16 PB_DEFAULT "Annuler"; _CBbutton ButtonOki @SendOki [pseudo]; _CBbutton ButtonKo @SendKo nil; 0);; /*-------------- :: CB de message d'alerte vers une position :: -------------------*/ fun CBAlert(menu,param)= ( _DMSevent this strcat class ".alerte" param nil; 0);; /*-------------- :: CB de changement de statut du micro de la voiIP :: -------------------*/ fun CBRandom(menu, param)= ( _DMSevent this strcat class ".random" nil nil; 0);; /*-------------- :: CB de changement de statut du micro de la voiIP :: -------------------*/ fun CBVoiceIP_Micro(menu,pseudo)= _CHKmenu VoIP1 atoi "-1"; //_CHKmenu alert2 atoi "-1"; let strbuild ("user"::pseudo::nil)::("VoIP"::(itoa _GETcheckMenu VoIP1) ::(itoa _GETcheckMenu VoIP2)::nil)::nil -> param in ( //_fooS strcat "valeur de param : " param; _DMSevent this strcat class ".VoiceIP" param nil; 0);; /*-------------- :: CB de changement de statut du hp de la voiIP :: -------------------*/ fun CBVoiceIP_HP(menu,pseudo)= _CHKmenu VoIP2 atoi "-1"; let strbuild ("user"::pseudo::nil)::("VoIP"::(itoa _GETcheckMenu VoIP1) ::(itoa _GETcheckMenu VoIP2)::nil)::nil -> param in ( //_fooS strcat "valeur de param : " param; _DMSevent this strcat class ".VoiceIP" param nil; 0);; /*-------------- :: CB d'activation de fonction vers un user passé en parametre :: -------------------*/ fun CBCollabo(menu,param)= ( _DMSevent this strcat class ".AvatarUser" param nil; 0);; fun _ok(c,param,x,y,button,mask)= let strextr param -> list in let getInfo list "user" -> pseudo in let _GETcompText UrlWeb -> url in let strbuild ("user"::pseudo::nil)::("function"::"Push Url Web"::nil)::("UrlWeb"::url::nil)::nil -> param in (GD_Close nil nil nil nil button nil [nil WinChgLogin]; _DMSevent this strcat class ".AvatarUser" param nil ) ;; fun _cancel(c,b,x,y,button,m)= GD_Close nil nil nil nil button nil [nil WinChgLogin] ;; /*-------------- :: CB push d'une page web via une URL passé en parametre :: -------------------*/ fun CBCollaboWeb(menu,param)= set FILTERFLAGS = OBJ_CONTAINER_CLICK|OBJ_CONTAINER_UNCLICK|OBJ_CONTAINER_MOVE|OBJ_CONTAINER_KEYUP|OBJ_CONTAINER_KEYDOWN ; let 300 -> w in let 100 -> h in let GD_FONT_EDIT -> [fontET colfont1ET transET flagET colfont2ET sizeET AngleET] in let GD_FONT_CONT -> [fontC colfont1C transC flagC colfont2C sizeC AngleC] in let GD_ROLLOVER -> [Srollover _ _ THrollover _ _ TVrollover _ _] in let GD_CreateGradient _channel 0 0 w h -> BmpGradient in ( //:::-- initialisation container principal --::: let _CRcontainerFromObjCont _channel nil 300 170 w h CO_HIDE|CO_NOBORDER|CO_NOCAPTION nil "" -> container in set WinChgLogin = GD_CReateCONT _channel container nil nil nil nil nil nil nil ; set WinChgLogin.WIN_VISIBLE = 1 ; //:::-- création des textes --::: let _DRAWtext BmpGradient fontARIALG_C (w/2) 5 TD_CENTER colfont1C (_loc this "SELECT_URLWEB" nil) -> _ in let _CRalphaBitmap _channel BmpGradient nil nil nil -> background in let _CRcompBitmap _channel WinChgLogin.WINcontainer nil [0 0] nil FILTERFLAGS background 0 0 w h -> bmpcomp in let _CONVERTcompBitmapToObjNode bmpcomp -> node in //:::-- création du bouton Ok --::: let GD_COMPROLLOVER_CreateBitmap _channel WinChgLogin.WINcontainer 50 20 nil "ROLLOVER" (_loc this "OK_BUTTON" nil)-> rolloveralpha in let _CRcompRollOver _channel WinChgLogin.WINcontainer node [(w/2-THrollover)-20 (h-25)] OBJ_VISIBLE|ROL_MASK nil rolloveralpha -> oki in //:::-- création du bouton cancel --::: let GD_COMPROLLOVER_CreateBitmap _channel WinChgLogin.WINcontainer 50 20 nil "ROLLOVER" (_loc this "CANCEL_BUTTON" nil)-> rolloveralpha in let _CRcompRollOver _channel WinChgLogin.WINcontainer node [(w/2)+20 (h-25)] OBJ_ENABLE|OBJ_VISIBLE|ROL_MASK nil rolloveralpha -> ko in ( set UrlWeb = GD_CReditText WinChgLogin.WINcontainer node [20 (h/2)-30] CT_LEFT|CT_EDITLINE nil w-40 20 "http://" fontEditText [colfont1ET transET flagET colfont2ET]; _CBcompRollOverClick oki @_ok param; _CBcompRollOverClick ko @_cancel nil; _CBcontainerCursorMove WinChgLogin.WINcontainer @GD_Move [WinChgLogin nil nil] ; _SHOWcontainer WinChgLogin.WINcontainer CONTAINER_UNHIDDEN; _PAINTcontainer WinChgLogin.WINcontainer); 0);; /*-------------- :: CB d'envoi du msg d'audio du perso passé en parametre :: -------------------*/ fun CBMsgAudio(menu,param)= ( _DMSevent this strcat class ".AvatarUser" param nil; 0);; /* ***************************************************************** */ /* * Fonctions callback TAG MsgAudio **************************************** */ /* ***************************************************************** */ fun retourMsgAudio(param, others)= let strextr param -> list in let hd switchstr list "user" -> Pseudo in let hd switchstr list "Sounds" -> soundlist in ( //_fooS strcat "valeur de soundlist " soundlist; 0);; /* ***************************************************************** */ /* * Fonctions callback TAG VoiceIP **************************************** */ /* ***************************************************************** */ fun retourVoiceIP(param, others)= let strextr param -> list in let hd switchstr list "user" -> Pseudo in let hd switchstr list "VoIP" -> micro in let hd tl switchstr list "VoIP" -> hp in ( //_fooS strcat "valeur de micro " micro; //_fooS strcat "valeur de hp " hp; _CHKmenu VoIP1 atoi micro; _CHKmenu VoIP2 atoi hp; 0);; /* ***************************************************************** */ /* * Fonctions callback TAG **************************************** */ /* ***************************************************************** */ fun retourStatut(param, others)= let strextr param -> list in let hd switchstr list "user" -> Pseudo in let hd switchstr list "Statut" -> statut in ( //_fooS strcat "valeur de PARAM " param; //_fooS strcat "valeur de statut " statut; if !strcmp statut "Debout" then (_CHKmenu pos1 1; _CHKmenu pos2 0) else if !strcmp statut "Assis" then (_CHKmenu pos1 0; _CHKmenu pos2 1) else nil; 0);; //::--- on récupere les valeurs de la requete ---:: fun retourRequest(param, others)= let strextr param -> list in let hd switchstr list "user" -> Pseudo in let hd switchstr list "Result" -> emailtmp in let hd tl switchstr list "Result" -> statuttmp in let hd tl tl switchstr list "Result" -> telephonetmp in ( if !strcmp statuttmp "1" then set profil = "Participante" else if !strcmp statuttmp "2" then set profil = "Animatrice" else if !strcmp statuttmp "3" then set profil = "Participant" else set profil = "Animateur"; set email = emailtmp; set telephone = telephonetmp; _PAINTmenu AdmModeMenu; 0);; /* ::::: génère ici la liste des positions ::::: */ fun AddPositionToPositionMenu(menu, poslist, pseudo, room_name)= if poslist == nil then 0 else let poslist -> [[name _] next] in let _APPitem _channel menu ME_ENABLED name -> currentmenuitem in (_CBmenu currentmenuitem @CBTelMode strbuild ("user"::pseudo::nil)::("room_name"::room_name::nil)::("position"::name::nil)::nil; AddPositionToPositionMenu menu next pseudo room_name; 0);; /******************************************************************************* recuperation des positions, ajout au menu *******************************************************************************/ fun retourPosition(param, ulist, data) = let strextr param -> poslist in let poslist -> [currentpos nextpl] in let currentpos -> [currentposS _] in set PositionList = strextr currentposS; let hd switchstr PositionList "positions" -> Pos in let data -> [position room_name PosMenu pseudo] in AddPositionToPositionMenu PosMenu (strextr Pos) pseudo room_name; 0;; /*----------------::Callback correspondant à l'action ShowSelect coté Administrateur::----------------*/ fun CBShowSelect(Ob, cli, action, param, reply) = set AdmModeMenu = _CRpopupMenu _channel; let _DMSgetName cli -> room_name in let strextr param -> list in let hd switchstr list "identity" -> id in let hd tl switchstr list "identity" -> pseudo1 in let hd tl tl switchstr list "identity" -> pseudo2 in let if !strcmp pseudo1 "Guest" then strcatn pseudo1::" "::pseudo2::nil else pseudo1 -> pseudo in let _APPitem _channel AdmModeMenu ME_ENABLED strcatn ":: "::pseudo::" ::"::nil -> pseudomenu in let _APPitem _channel AdmModeMenu ME_SEPARATOR "" -> trait in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_PROFIL" nil) -> ProfilMenu in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_STATE" nil) -> StatutMenu in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_TELEPORT" nil) -> PosMenu in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_VOICEIP" nil) -> VoiceMenu in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_COLLABO" nil) -> CollaboMenu in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_MSG_AUDIO" nil) -> AlertMsgAudio in let _APPpopup _channel AdmModeMenu (_loc this "SELECT_ALERT" nil) -> AlertMenu in let _APPitem _channel AdmModeMenu ME_ENABLED (_loc this "SELECT_QUIT" nil) -> QuitMenu in let _GETcursorPos w3d.V3dwin -> [PosX PosY] in ( _DMSeventTag this strcat class ".MsgAudio?" pseudo (UgetUser ObUi Ob)::nil [@retourMsgAudio nil nil]; _DMSeventTag this strcat class ".VoiceIP?" pseudo (UgetUser ObUi Ob)::nil [@retourVoiceIP nil nil]; _DMSeventTag this strcat class ".Statut?" pseudo (UgetUser ObUi Ob)::nil [@retourStatut nil nil]; _DMSeventTag this strcat class ".Request?" strbuild ("user"::pseudo::nil)::nil (UgetUser ObUi Ob)::nil [@retourRequest nil nil]; _DMSeventTag this strcat class ".getpositions" pseudo (UgetUser ObUi Ob)::nil [mkfun3 @retourPosition [position room_name PosMenu pseudo] 3600 0]; //:: Carte d'identité de l'avatar :: set profil1 = _CHKmenu _APPitem _channel ProfilMenu ME_ENABLED email 0; set profil2 = _CHKmenu _APPitem _channel ProfilMenu ME_ENABLED profil 0; set profil3 = _CHKmenu _APPitem _channel ProfilMenu ME_ENABLED telephone 0; set profil4 = _CHKmenu _APPitem _channel ProfilMenu ME_ENABLED adresseip 0; //::gestion de l'avatar assis ou debout:: set pos1 = _CHKmenu _APPitem _channel StatutMenu ME_ENABLED (_loc this "SELECT_UP" nil) (_GETcheckMenu pos1); set pos2 = _CHKmenu _APPitem _channel StatutMenu ME_ENABLED (_loc this "SELECT_DOWN" nil) (_GETcheckMenu pos2); _CBmenu pos1 @CBAnimSelectUp strbuild (pseudo::nil)::("Key"::"1050"::"1099"::nil)::nil; _CBmenu pos2 @CBAnimSelectDown strbuild (pseudo::nil)::("Key"::"1"::"49"::nil)::nil; //::gestion de l'état de la voix IP:: let _APPitem _channel VoiceMenu ME_SEPARATOR "" -> trait in set Random1 = _CHKmenu _APPitem _channel VoiceMenu ME_ENABLED "Synchronisation" 0; let _APPitem _channel VoiceMenu ME_SEPARATOR "" -> trait in set VoIP1 = _CHKmenu _APPitem _channel VoiceMenu ME_ENABLED "Micro" (_GETcheckMenu VoIP1); set VoIP2 = _CHKmenu _APPitem _channel VoiceMenu ME_ENABLED "Haut-Parleur" (_GETcheckMenu VoIP2); _CBmenu Random1 @CBRandom nil; _CBmenu VoIP1 @CBVoiceIP_Micro pseudo; _CBmenu VoIP2 @CBVoiceIP_HP pseudo; //::gestion des fonctions collaboratives :: set collabo1 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Configurer son Avatar" 0; set collabo2 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Tableau Blanc" 0; set collabo3 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Push Url Web" 0; set collabo4 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Envoi e-mail" 0; set collabo5 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Webcam" 0; set collabo6 = _CHKmenu _APPitem _channel CollaboMenu ME_ENABLED "Envoyer un Fichier" 0; _CBmenu collabo1 @CBCollabo strbuild ("user"::pseudo::nil)::("function"::"Configurer son Avatar"::nil)::nil; _CBmenu collabo2 @CBCollabo strbuild ("user"::pseudo::nil)::("function"::"Tableau Blanc"::nil)::nil; _CBmenu collabo3 @CBCollaboWeb strbuild ("user"::pseudo::nil)::nil; _CBmenu collabo4 @CBCollabo strbuild ("user"::pseudo::nil)::("function"::"Envoi e-mail"::nil)::nil; _CBmenu collabo5 @CBCollabo strbuild ("user"::pseudo::nil)::("function"::"Webcam"::nil)::nil; _CBmenu collabo6 @CBCollabo strbuild ("user"::pseudo::nil)::("function"::"Envoyer un Fichier"::nil)::nil; //::gestion des messages audios :: _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Assistant Personnel Electronique" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Assistant Personnel Electronique"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Bi-Bande/Tri-Bande/Quadri-Bande" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Bi-Bande/Tri-Bande/Quadri-Bande"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Carte SIM " 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"carte SIM "::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Communications DATA" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Communications DATA"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "DAS/SAR" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"das/sar"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "EDGE" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"edge"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "GPRS" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"gprs"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "DCS 1800" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"dcs 1800"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "GSM 900" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"GSM 900"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "GSM Etendu" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"GSM Etendu"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "i-mode" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"i-mode"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "MMS" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"MMS"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "SMS" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"SMS"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "SON DHR" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"SON DHR"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "WAP" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"WAP"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Décompte des Appels" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Décompte des Appels"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Prix et temps de communication" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Prix et temps de communication"::nil)::nil; _CBmenu _CHKmenu _APPitem _channel AlertMsgAudio ME_ENABLED "Prix Publics Bouygues Telecom" 0 @CBMsgAudio strbuild ("user"::pseudo::nil)::("function"::"Envoyer Msg Audio"::nil)::("ref"::"Prix Publics Bouygues Telecom"::nil)::nil; //::gestion des messages d'alertes:: set alert1 = _CHKmenu _APPitem _channel AlertMenu ME_ENABLED "Envoyer un message en privé" 0; set alert2 = _CHKmenu _APPitem _channel AlertMenu ME_ENABLED "Parlez, vous avez le micro" 0; set alert3 = _CHKmenu _APPitem _channel AlertMenu ME_ENABLED "On ne vous entends pas" 0; set alert4 = _CHKmenu _APPitem _channel AlertMenu ME_ENABLED "Vous n'avez plus le micro" 0; set alert5 = _CHKmenu _APPitem _channel AlertMenu ME_ENABLED "Questions en fin de réunion" 0; _CBmenu alert1 @CBAlertSpec pseudo; _CBmenu alert2 @CBAlert strbuild ("user"::pseudo::nil)::("message"::"l'Animateur vous a donné le micro,\nVous pouvez désormais parler.\nconseil: \npour une qualité de voix optimale, nous conseillons vivement l'utilisation d'un casque micro."::nil)::nil; _CBmenu alert3 @CBAlert strbuild ("user"::pseudo::nil)::("message"::"Désolé, personne ne vous entends,\nmerci de vérifier le branchement et l'état de votre micro"::nil)::nil; _CBmenu alert4 @CBAlert strbuild ("user"::pseudo::nil)::("message"::"l'Animateur vous a retiré le micro !\npersonne ne peut plus vous entendre"::nil)::nil; _CBmenu alert5 @CBAlert strbuild ("user"::pseudo::nil)::("message"::"Toutes les questions seront abordées en fin de réunion.\nMerci de les noter pour les reposer plus tard"::nil)::nil; _DRAWmenu w3d.V3dwin AdmModeMenu PosX+50 PosY+50 PM_LEFT_ALIGN; 0) ;; /*----------------::Callback correspondant à l'action ShowSelect de gestion des animations::----------------*/ fun CBShowSelectUser(Ob, cli, action, param, reply) = //_fooS strcat "valeur de Ob: " ObName Ob; //_fooS strcat "valeur de cli: " _DMSgetName cli; //_fooS strcat "valeur de action: " action; //_fooS strcat "valeur de param: " param; let _DMSgetName cli -> room_name in let strextr param -> list in let hd switchstr list "identity" -> id in let hd tl switchstr list "identity" -> pseudo1 in let hd tl tl switchstr list "identity" -> pseudo2 in let if !strcmp pseudo1 "Guest" then strcatn pseudo1::" "::pseudo2::nil else pseudo1 -> pseudo in let strcatn pseudo1::" "::pseudo2::nil -> pseudo in let _CRpopupMenu _channel -> UserModeMenu in let _APPitem _channel UserModeMenu ME_ENABLED strcatn ":: "::(_loc this "SELECT_ANIMATE" nil)::" "::pseudo::" ::"::nil -> ColorMenu in let _APPitem _channel UserModeMenu ME_SEPARATOR "" -> trait in let _APPpopup _channel UserModeMenu (_loc this "SELECT_HUMEURN2" nil) -> HumeurMenu in let _APPpopup _channel UserModeMenu (_loc this "SELECT_STATEN2" nil) -> StatutMenu in let _APPpopup _channel UserModeMenu (_loc this "SELECT_ANIMATEN2" nil) -> AnimMenu in let _APPitem _channel UserModeMenu ME_ENABLED (_loc this "SELECT_QUIT2" nil) -> QuitMenu in let _GETcursorPos w3d.V3dwin -> [PosX PosY] in ( //::gestion de l'humeur de l'avatar assis ou debout:: set hum1 = _CHKmenu _APPitem _channel HumeurMenu ME_ENABLED (_loc this "SELECT_HUMEUR1" nil) 0; set hum2 = _CHKmenu _APPitem _channel HumeurMenu ME_ENABLED (_loc this "SELECT_HUMEUR2" nil) 0; set hum3 = _CHKmenu _APPitem _channel HumeurMenu ME_ENABLED (_loc this "SELECT_HUMEUR3" nil) 0; set hum4 = _CHKmenu _APPitem _channel HumeurMenu ME_ENABLED (_loc this "SELECT_HUMEUR4" nil) 0; set hum5 = _CHKmenu _APPitem _channel HumeurMenu ME_ENABLED (_loc this "SELECT_HUMEUR5" nil) 0; _CBmenu hum1 @CBAnimKey strbuild ("Key"::"1250"::"1299"::nil)::("Speak"::(_loc this "SELECT_HUMEUR1" nil)::nil)::("Event"::".Humeur.oki"::nil)::nil; _CBmenu hum2 @CBAnimKey strbuild ("Key"::"1300"::"1349"::nil)::("Speak"::(_loc this "SELECT_HUMEUR2" nil)::nil)::("Event"::".Humeur.Notoki"::nil)::nil; _CBmenu hum3 @CBAnimKey strbuild ("Key"::"1350"::"1399"::nil)::("Speak"::(_loc this "SELECT_HUMEUR3" nil)::nil)::("Event"::".Humeur.Bof"::nil)::nil; _CBmenu hum4 @CBAnimKey strbuild ("Key"::"1400"::"1449"::nil)::("Speak"::(_loc this "SELECT_HUMEUR4" nil)::nil)::("Event"::".Humeur.Super"::nil)::nil; _CBmenu hum5 @CBAnimKey strbuild ("Key"::"1525"::"1574"::nil)::("Speak"::(_loc this "SELECT_HUMEUR5" nil)::nil)::("Event"::".Humeur.Applaudir"::nil)::nil; //::gestion du statut de l'avatar :: set stat1 = _CHKmenu _APPitem _channel StatutMenu ME_ENABLED (_loc this "SELECT_STATE1" nil) 0; set stat2 = _CHKmenu _APPitem _channel StatutMenu ME_ENABLED (_loc this "SELECT_STATE2" nil) 0; set stat3 = _CHKmenu _APPitem _channel StatutMenu ME_ENABLED (_loc this "SELECT_STATE3" nil) 0; _CBmenu stat1 @CBAnimKey strbuild ("Key"::"1150"::"1199"::nil)::("Speak"::(_loc this "SELECT_STATE1" nil)::nil)::("Event"::".Statut.Patiente"::nil)::nil; _CBmenu stat2 @CBAnimKey strbuild ("Key"::"1200"::"1249"::nil)::("Speak"::(_loc this "SELECT_STATE2" nil)::nil)::("Event"::".Statut.Occupé"::nil)::nil; _CBmenu stat3 @CBAnimKey strbuild ("Key"::"1100"::"1149"::nil)::("Speak"::(_loc this "SELECT_STATE3" nil)::nil)::("Event"::".Statut.Réfléchit"::nil)::nil; //::gestion des animations de l'avatar assis ou debout:: set anim1 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM1" nil) 0; set anim2 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM2" nil) 0; set anim3 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM3" nil) 0; set anim4 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM4" nil) 0; set anim5 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM5" nil) 0; set anim6 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM6" nil) 0; set anim7 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM7" nil) 0; set anim8 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM8" nil) 0; set anim9 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM9" nil) 0; set anim10 = _CHKmenu _APPitem _channel AnimMenu ME_ENABLED (_loc this "SELECT_ANIM10" nil) 0; _CBmenu anim1 @CBAnimKey strbuild ("Key"::"1575"::"1674"::nil)::("Speak"::(_loc this "SELECT_ANIM1" nil)::nil)::("Event"::".Animer.Question"::nil)::nil; _CBmenu anim2 @CBAnimKey strbuild ("Key"::"1675"::"1724"::nil)::("Speak"::(_loc this "SELECT_ANIM2" nil)::nil)::("Event"::".Animer.Son?"::nil)::nil; _CBmenu anim3 @CBAnimKey strbuild ("Key"::"2050"::"2090"::nil)::("Speak"::(_loc this "SELECT_ANIM3" nil)::nil)::("Event"::".Animer.Bonjour"::nil)::nil; _CBmenu anim4 @CBAnimKey strbuild ("Key"::"2100"::"2149"::nil)::("Speak"::(_loc this "SELECT_ANIM4" nil)::nil)::("Event"::".Animer.AuRevoir"::nil)::nil; _CBmenu anim5 @CBAnimKey strbuild ("Key"::"2300"::"2349"::nil)::("Speak"::(_loc this "SELECT_ANIM5" nil)::nil)::("Event"::""::nil)::nil; _CBmenu anim6 @CBAnimKey strbuild ("Key"::"2350"::"2399"::nil)::("Speak"::(_loc this "SELECT_ANIM6" nil)::nil)::("Event"::""::nil)::nil; _CBmenu anim7 @CBAnimKey strbuild ("Key"::"2400"::"2449"::nil)::("Speak"::(_loc this "SELECT_ANIM7" nil)::nil)::("Event"::""::nil)::nil; _CBmenu anim8 @CBAnimKey strbuild ("Key"::"2150"::"2199"::nil)::("Speak"::(_loc this "SELECT_ANIM8" nil)::nil)::("Event"::""::nil)::nil; _CBmenu anim9 @CBAnimKey strbuild ("Key"::"2200"::"2249"::nil)::("Speak"::(_loc this "SELECT_ANIM9" nil)::nil)::("Event"::""::nil)::nil; _CBmenu anim10 @CBAnimKey strbuild ("Key"::"2250"::"2299"::nil)::("Speak"::(_loc this "SELECT_ANIM10" nil)::nil)::("Event"::""::nil)::nil; _DRAWmenu w3d.V3dwin UserModeMenu PosX+50 PosY+50 PM_LEFT_ALIGN; 0) ;; /******************************************************************************* clic sur le lien -> demande de teleportation *******************************************************************************/ fun cbLinkClick(o, h, m, b, param) = //_fooS strcat "valeur de param pour le téléport : " param; if b != 1 then nil else _DMSevent this strcat class ".teleport" param nil ;; /******************************************************************************* New object creation o -> Ob : object <- I : not used *******************************************************************************/ fun newOb(o) = let hd UgetParam ObUi o "room_name" -> room_name in let hd UgetParam ObUi o "position" -> position in let hd UgetParam ObUi o "alias" -> alias in ( match hd ObAnchor o with (objAnchor [ah am _ _] -> ( ObSetLinks o [ah am alias HandCursor mkfun5 @cbLinkClick strbuild ("room_name"::room_name::nil)::("position"::position::nil)::nil nil nil]::nil; 0 ) ); ); ObRegisterAction o strcat ObName o ".select" @CBShowSelect; ObRegisterAction o strcat ObName o ".selectuser" @CBShowSelectUser; _CHKmenu pos1 1; _CHKmenu pos2 0; 0 ;; /******************************************************************************* Function called when plugin is initialised file -> S : '*.plug' file name <- I : not used *******************************************************************************/ fun IniPlug(file) = GD_InitDressing; set class = getInfo strextr _getpack _checkpack file "name"; PLUGsetinfo thisplug PLUGIN_NOTRESERVED|PLUGIN_MATERIAL; PLUGdefineEditor thisplug @dynamicedit; PlugRegister class @newOb nil; 0 ;;