Added XWL:egpToMouse(E)
EGP is my cookiejar!
I use it a lot.
Sometimes.
Nope.
Err, what? / Dislike EGP
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
SVN Tutorial
My SVN:Get dropbox and get 250 MB extra space: DropboxCode:http://divranspack.googlecode.com/svn/trunk/%20divranspack/
By becoming more powerful, EGP is becoming more user-friendly.
Das ist kewl.
"It's easy to win forgiveness for being wrong; being right is what gets you into real trouble." - Bjarne Stroustrup
Lífið læðist lúmskt áfram
i got the first bug in the EGP2 ... BLUESCREEN!
as i started to open an old EGP chip to rewrite and optimize the code , my computer crashes.... i dunno if the problem is on Win7 or somthing but i will try it twice to be sure its not the problem on the EGP
EDIT: checked the EGP again .... problem was on win7 and is gone![]()
Last edited by Timomo; 02-18-2010 at 12:36 PM.
Having some problems found a bug?
Plz post a screen shot of EGP. Your E2 code. And any errors you may get.
Code:@name OS-egp3 #version 0.005 ---bootscreen,taskbar,coursor,loadingcoursor,sidebar @inputs Screen:wirelink OnButton Xinput:number Yinput:number Click:number SideBar:number @outputs DebugVariable1 DebugVariable2 X Y SideBarAlpha #2D Vector variables @persist BootTextpos1:vector2 BoxOutline1pos:vector2 BoxOutline1size:vector2 Loadinglinepos1:vector2 Loadinglinepos2:vector2 @persist BlueTaskbarPos:vector2 BlueTaskbarSize:vector2 CoursorPOS:vector2 CoursorPOSline:vector2 TriangleB:vector2 TriangleC:vector2 #4D vector Variables @persist White:vector4 Red:vector4 Blue:vector4 Grey:vector4 #bool variables @persist LoadinglineposX:number Bootscreen:number OSloaded:number AtDesktop:number Startmenu:number #normal changable Numbers @persist DrawDesktop:number X:number Y:number CoursorModel:number Processing:number OperationsPercent:number SideBarAlpha:number Zhr:number Zmin:number @persist Ping:number #arrays @persist CourserModel2:array runOnTick(1) if(first()){Screen:egpClear() Screen:egpRemove(4) Screen:egpRemove(5) Screen:egpRemove(6) Screen:egpRemove(7) Screen:egpRemove(8) Screen:egpRemove(9) Screen:egpRemove(10) Screen:egpRemove(11) Screen:egpRemove(12) Screen:egpRemove(13) Screen:egpRemove(14) Screen:egpRemove(15) Screen:egpRemove(39)# <-- coursorpart1 Screen:egpRemove(40)# <-- coursorpart2 } if(~OnButton&OnButton & !OSloaded){ Bootscreen=1 LoadinglineposX = 160 } if(Bootscreen) {LoadinglineposX++ #codeblock for all the bootscreen opreations #mathematical Operations if(LoadinglineposX > 355){stoptimer("red-line-ticker") LoadinglineposX = 160 Bootscreen=0 OSloaded = 1 DrawDesktop++ } #graphical operations Screen:egpText(1,"Booting OS...",BootTextpos1,White)#white color Screen:egpBoxoutline(2,BoxOutline1pos,BoxOutline1size,White) Screen:egpLine(3,Loadinglinepos1,Loadinglinepos2,Red) } #BUGz are here if ( OSloaded) { AtDesktop = 1 CoursorEnable = 1 #enables the coursor and disables him if PC is off CoursorModel=1 Screen:egpRemove(1) Screen:egpRemove(2) Screen:egpRemove(3) }else{ CoursorEnable = 0 Screen:egpRemove(4)} if(Processing){CoursorModel=2 timer("CoursorModelTimer",500)}else{CoursorModel=1} if(clk("CoursorModelTimer")){Processing=0} if (CoursorEnable&CoursorModel==1){ Screen:egpTriangle(39,CoursorPOS,TriangleB,TriangleC,Grey) Screen:egpLine(40,CoursorPOS,CoursorPOSline,Grey) Screen:egpRemove(37) Screen:egpRemove(38) }elseif #draws a loading coursor (CoursorEnable&CoursorModel==2){ Screen:egpTriangle(39,CoursorPOS,TriangleB,TriangleC,Grey) Screen:egpLine(40,CoursorPOS,CoursorPOSline,Grey) Screen:egpTriangle(37,CourserModel2[1,vector2],CourserModel2[5,vector2],CourserModel2[6,vector2],Grey) Screen:egpTriangle(38,CourserModel2[2,vector2],CourserModel2[3,vector2],CourserModel2[4,vector2],Grey) } if(DrawDesktop) { Screen:egpBox(4,BlueTaskbarPos,BlueTaskbarSize,Blue)#blue Taskbar Screen:egpCircle(5,82,497,35,35,0,255,0,255)#part of the corner from the "START" buton Screen:egpBox(6,0,480,80,32,0,255,0,255)#green "START" button Screen:egpText(7,"START",20,485,1,1,1,255) Screen:egpText(8,toString(time("hour"))+":"+toString(time("min")),430,485,1,1,1,255) } if(AtDesktop & X<100 &Y>480 & Click &~Click){Startmenu=1 Processing++}else{AtDesktop=0} if(Startmenu){ if(Startmenu &Y<180 & Click &~Click) {Startmenu=0}elseif (Startmenu& X>201 & Y>180 & Click &~Click) {Startmenu=0} Screen:egpBox(9,2,180,200,300,0,0,255,50) Screen:egpBox(10,152,442,37,37,255,0,0,255) Screen:egpCircle(11,170,460,32,32,255,255,255,255) Screen:egpCircle(12,170,460,30,30,255,0,0,255) Screen:egpLine(13,170,450,170,470,255,255,255,255) }else{ Screen:egpRemove(9) Screen:egpRemove(10) Screen:egpRemove(11) Screen:egpRemove(12) Screen:egpRemove(13) } if(SideBar){ timer("SideBarAlpha",100) if(SideBarAlpha < 250){ SideBarAlpha+=1}#ausprobieren wie viel er braucht #sidebar Screen:egpBox(14,390,1,122,478,255,255,255,SideBarAlpha) # draws the white sidebar line # OPS widget Screen:egpBoxoutline(15,400,18,100,30,1,1,1,SideBarAlpha) Screen:egpBox(16,401,19,OperationsPercent-1,28,0,255,0,SideBarAlpha) Screen:egpText(17,"Ops",415,2,1,1,1,SideBarAlpha) Screen:egpText(18,OperationsPercent+"%",420,19,1,1,1,SideBarAlpha) #Clock widget "under construction" Zhr = (time("hour")+1)%24 Zmin = time("min") Screen:egpBoxoutline(19,395,70,110,110,1,1,1,SideBarAlpha) Screen:egpPoly(20,StarClockModel,CostumGreen) # Screen:egpBox(21,450-50,125-5,100,10,0,0,0,SideBarAlpha) # Screen:egpBox(22,450-30,125-33,60,60,255,255,255,SideBarAlpha) Screen:egpLine(23,450,125,450+sin(Zmin*6)*30,125-cos(Zmin*6)*30,0,0,0,SideBarAlpha) Screen:egpLine(24,450,125,450+sin(Zhr*30)*20,125-cos(Zhr*30)*20,0,0,0,SideBarAlpha) Screen:egpText(25,(Zhr<10? "0" : "")+Zhr+":"+(Zmin<10? "0" : "")+Zmin,450-30,125-8,100,100,255,SideBarAlpha) #ping widget Ping = owner():ping() Screen:egpBoxoutline(26,395,200,110,50,1,1,1,SideBarAlpha) if(Ping>4&Ping<100){ Screen:egpBox(27,395+10,200+25,25,50-26,0,255,0,SideBarAlpha) Screen:egpBox(28,395+40,200+15,25,50-16,0,255,0,SideBarAlpha) Screen:egpBox(29,395+70,200+5 ,25,50-6,0,255,0,SideBarAlpha) }elseif (Ping>100&Ping<200){ Screen:egpBox(27,395+10,200+25,25,50-26,0,255,0,SideBarAlpha) Screen:egpBox(28,395+40,200+15,25,50-16,0,255,0,SideBarAlpha) Screen:egpRemove(29) }elseif (Ping>200) { Screen:egpBox(27,395+10,200+25,25,50-26,0,255,0,SideBarAlpha) Screen:egpRemove(28) Screen:egpRemove(29) } }else{ Screen:egpRemove(14) Screen:egpRemove(15) Screen:egpRemove(16) Screen:egpRemove(17) Screen:egpRemove(18) Screen:egpRemove(19) Screen:egpRemove(20) Screen:egpRemove(21) Screen:egpRemove(22) Screen:egpRemove(23) Screen:egpRemove(24) Screen:egpRemove(25) Screen:egpRemove(26) Screen:egpRemove(27) Screen:egpRemove(28) Screen:egpRemove(29) SideBarAlpha=0 } Screen:egpDraw() #some declared variables for colours etc #some permanent 2D position vectors BootTextpos1 = vec2(150,100) BoxOutline1pos = vec2(150,400) BoxOutline1size = vec2(200,10) Loadinglinepos1 = vec2(155,405) Loadinglinepos2 = vec2(LoadinglineposX,405) BlueTaskbarPos = vec2(0,480) BlueTaskbarSize = vec2(512,32) CoursorPOS = vec2(X,Y) TriangleB = vec2(X,Y+20) TriangleC = vec2(X+15,Y+15) CoursorPOSline = vec2(X+9,Y+25) # some permanent 4D Colors # R G B Alpha White = vec4(255,255,255,255) Grey = vec4(200,200,200,255) Red = vec4(255,0 ,0 ,255) Blue = vec4(0,0,255,255) CostumGreen=vec4(181,230,29,SideBarAlpha) # normal numbers that are changable or not X = Xinput*512 Y = Yinput*512 Screen:egpSetFont(17,"arial",10) OperationsPercent = round(minquota()/maxquota()*100) # Mousecoursor model arrays CourserModel2 = array(vec2(CoursorPOS:x()+17,CoursorPOS:y()) , vec2(CoursorPOS:x()+27,CoursorPOS:y()+10) , vec2(CoursorPOS:x()+17,CoursorPOS:y()+25) , vec2(CoursorPOS:x()+37,CoursorPOS:y()+25) , vec2(CoursorPOS:x()+27,CoursorPOS:y()+15) , vec2(CoursorPOS:x()+37,CoursorPOS:y())) StarClockModel = array(vec2(450,70),vec2(463,111),vec2(504,125),vec2(463,138),vec2(450,179),vec2(436,138),vec2(395,125),vec2(436,111)) # implant the Variable "DebugVariable1" anywhere in the code #debug panel DebugVariable1 = Ping #DebugVariable2
this is my code, it was an OS done with the EGP..
but the problem is gone now it doesnt exist anymore ^_^
BTW: the Angle function isnt working at me.. i dont know why but here are some pics:
Code:@name @inputs EGP:wirelink @outputs AngleNumber @persist AngleNumber @trigger runOnTick(1) timer("turner",100) if(clk("turner")){AngleNumber++} EGP:egpBox(1,vec2(256-50,256-50),vec2(100,100)) EGP:egpColor(1,vec(255,0,0),255) EGP:egpAngle(1,AngleNumber) EGP:egpText(2,"Angle : "+toString(AngleNumber),vec2(100,100)) EGP:egpDraw() #sbox_maxwire_egp_frames 12
Bookmarks