home *** CD-ROM | disk | FTP | other *** search
- procedure button
- parameters y,x,string
- private hotkey
-
- hotkey = at('~',string)
-
- if (hotkey>0)
- string =stuff(string,hotkey,1,'')
- endif
-
- set color to w+/g
- @ y,x say string
- set color to n/w
- ?? '▄'
- @ y+1,x+1 say replicate('▀',len(string))
-
- if (hotkey>0)
- set color to gr+/g
- @ y,x+hotkey-1 say substr(string,hotkey,1)
- endif
-
-
- return
-
-
- procedure Xcenter
- parameters y, str
-
- @ y,40-len(str)/2 say str
- return
-
-
- procedure IntWindow
- parameters y1,x1,y2,x2,title
-
- do FrameIntWin with y1,x1,y2,x2
- do ClearIntWin with y1,x1,y2,x2,title
-
- return
-
- Procedure FrameIntWin
- parameters y1,x1,y2,x2
-
- if iscolor()
- set color to n+/w
- endif
- @ y1,x1 say replicate('▄',x2-x1+1)
- i=y1+1
- do while i<y2
- @ i,x1 say '█'
- i=i+1
- enddo
- if iscolor()
- set color to w+/w
- endif
- @ y2,x1 say replicate('▀',x2-x1+1)
- i=y1+1
- do while i<y2
- @ i,x2 say '█'
- i=i+1
- enddo
-
-
- Procedure ClearIntWin
- parameters y1,x1,y2,x2,title
-
- * title1=' '
-
- if (len(title)>0)
- set color to w+/rb
- title1 = space ((x2-x1-len(title))/2)+title + space((x2-x1-len(title))/2)
- @ y1+1,x1+1 say left (title1,x2-x1-1)
- endif
-
- * ? title1
- * ? x2-x1-1
- * ? left(title1,x2-x1-1)
- * wait
-
- set color to W+/BG
-
- if len(title)>0
- @ y1+2,x1+1 clear to y2-1,x2-1
- else
- @ y1+1,x1+1 clear to y2-1,x2-1
- endif
- return
-
-
- procedure XWindow
- parameters y1,x1,y2,x2,heading
-
- if iscolor()
- set color to w+/w
- endif
- @ y1,x1 say '█'+ replicate('▀',x2-x1-1)
- set color to n+/w
- ??'▄'
- set color to w+/w
- i=y1+1
- do while i<y2
- @ i,x1 say '█'
- i=i+1
- enddo
- if iscolor()
- set color to w+/w
- endif
- @ y2,x1 say '▀'
- if iscolor()
- set color to w+/w
- endif
- @ y1+1,x1+1 clear to y2-1,x2-1
- if iscolor()
- set color to n+/w
- endif
- @ y2,x1+1 say replicate('▄',x2-x1)
- i=y1+1
- set color to n+/n
- do while i<=y2
- @ i,x2 say '█'
- i=i+1
- enddo
- if (len(heading)>0)
- set color to w+/w
- @ y1+1,(x1+x2+1-len(heading))/2 say heading
- endif
- return
-
- procedure flatWindow
- parameters y1,x1,y2,x2
-
- if iscolor()
- set color to w+/b
- endif
- @ y1,x1 clear to y2,x2
- @ y1,x1 say '┌'
- ?? replicate ('─',x2-x1-1)
- ?? '┐'
- @ y2,x1 say '└'
- ?? replicate ('─',x2-x1-1)
- ?? '┘'
- i=y1+1
- do while i<y2
- @ i,x1 say '│'
- @ i,x2 say '│'
- i=i+1
- enddo
- ** @ y2,x1+1 clear to y2,x2
- ** @ y1+1,x2 clear to y2,x2
- return
-
-