2026-05-01 12:36:29 +02:00
|
|
|
function textinput$ (x as integer,y as integer,w as integer,h as integer,__text as string)
|
2026-05-20 10:39:08 +02:00
|
|
|
dim text as string,keyin as string
|
|
|
|
|
dim cursor as integer,done as integer
|
2026-05-01 12:36:29 +02:00
|
|
|
text=__text
|
2026-05-20 10:39:08 +02:00
|
|
|
if not (_mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h) then
|
2026-05-01 12:36:29 +02:00
|
|
|
drawtextinput x,y,w,h,__text,0
|
2026-05-01 12:23:46 +02:00
|
|
|
exit function
|
|
|
|
|
end if
|
2026-05-01 12:36:29 +02:00
|
|
|
drawtextinput x,y,w,h,__text,1
|
2026-05-01 12:23:46 +02:00
|
|
|
if not mouseclicked then exit function
|
2026-05-12 10:17:52 +02:00
|
|
|
'text=""
|
2026-05-01 12:36:29 +02:00
|
|
|
cursor=len(text)+1
|
2026-05-20 10:39:08 +02:00
|
|
|
dim relativex as integer
|
2026-05-01 12:23:46 +02:00
|
|
|
do
|
2026-05-01 12:36:29 +02:00
|
|
|
keyin=inkey$
|
|
|
|
|
if len(keyin)=2 then
|
|
|
|
|
select case asc(right$(keyin,1))
|
2026-05-01 12:23:46 +02:00
|
|
|
case 75 ' Left Arrow
|
2026-05-01 12:36:29 +02:00
|
|
|
if cursor>1 then cursor=cursor-1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 77 ' Right Arrow
|
2026-05-01 12:36:29 +02:00
|
|
|
if cursor<=len(text) then cursor=cursor+1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 71 ' Home Key
|
2026-05-01 12:36:29 +02:00
|
|
|
cursor=1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 79 ' End Key
|
2026-05-01 12:36:29 +02:00
|
|
|
cursor=len(text)+1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 83 ' Delete Key
|
2026-05-01 12:36:29 +02:00
|
|
|
if cursor<=len(text) then
|
|
|
|
|
text=left$(text,cursor-1)+mid$(text,cursor+1)
|
2026-05-01 12:23:46 +02:00
|
|
|
end if
|
|
|
|
|
end select
|
2026-05-20 10:39:08 +02:00
|
|
|
elseif len(keyin)=1 then
|
2026-05-01 12:23:46 +02:00
|
|
|
select case asc(keyin)
|
|
|
|
|
case 22 ' Ctrl + V (Paste)
|
2026-05-01 12:36:29 +02:00
|
|
|
text=left$(text,cursor-1)+_clipboard$+mid$(text,cursor)
|
2026-05-20 10:39:08 +02:00
|
|
|
cursor=cursor+len(pastedata)
|
2026-05-01 12:23:46 +02:00
|
|
|
case 32 to 126 ' Regular Typing
|
2026-05-01 12:36:29 +02:00
|
|
|
text=left$(text,cursor-1)+keyin+mid$(text,cursor)
|
|
|
|
|
cursor=cursor+1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 8 ' Backspace
|
2026-05-20 10:39:08 +02:00
|
|
|
if cursor>1 then
|
2026-05-01 12:36:29 +02:00
|
|
|
text=left$(text,cursor-2)+mid$(text,cursor)
|
|
|
|
|
cursor=cursor-1
|
2026-05-01 12:23:46 +02:00
|
|
|
end if
|
|
|
|
|
case 13 ' Enter
|
2026-05-01 12:36:29 +02:00
|
|
|
done=-1
|
2026-05-01 12:23:46 +02:00
|
|
|
case 27 ' Escape (Cancel)
|
2026-05-01 12:36:29 +02:00
|
|
|
text=__text
|
|
|
|
|
done=-1
|
2026-05-01 12:23:46 +02:00
|
|
|
end select
|
|
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
while _mouseinput:wend
|
2026-05-01 12:36:29 +02:00
|
|
|
if _mousebutton(1) then
|
2026-05-20 10:39:08 +02:00
|
|
|
if (_mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h) then
|
|
|
|
|
relativex=_mousex-x
|
|
|
|
|
cursor=(relativex\8)+1
|
2026-05-01 12:36:29 +02:00
|
|
|
if cursor<1 then cursor=1
|
|
|
|
|
if cursor>len(text)+1 then cursor=len(text)+1
|
|
|
|
|
else
|
2026-05-05 11:17:29 +02:00
|
|
|
done=-1
|
2026-05-01 12:36:29 +02:00
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
drawtextinput x,y,w,h,text,cursor
|
2026-05-01 12:23:46 +02:00
|
|
|
_limit 60
|
|
|
|
|
_display
|
|
|
|
|
loop until done
|
2026-05-01 12:36:29 +02:00
|
|
|
textinput=text
|
2026-05-01 12:23:46 +02:00
|
|
|
end function
|
2026-05-01 11:29:53 +02:00
|
|
|
|
2026-05-01 12:36:29 +02:00
|
|
|
sub drawtextinput (x as integer,y as integer,w as integer,h as integer,text as string,state as integer)
|
2026-05-01 12:23:46 +02:00
|
|
|
dim outtext as string
|
2026-05-20 10:39:08 +02:00
|
|
|
dim charwidth as integer:charwidth=8
|
|
|
|
|
dim cursorx as integer,textx as integer,texty as integer
|
2026-05-01 12:36:29 +02:00
|
|
|
if state>0 then
|
2026-05-01 12:23:46 +02:00
|
|
|
color backgroundcolor1
|
|
|
|
|
else
|
|
|
|
|
color backgroundcolor2
|
|
|
|
|
end if
|
2026-05-01 12:36:29 +02:00
|
|
|
line(x,y)-(x+w,y+h),,bf
|
|
|
|
|
if state>0 then
|
2026-05-01 12:23:46 +02:00
|
|
|
color highlightcolor
|
2026-05-20 10:39:08 +02:00
|
|
|
else
|
2026-05-01 12:23:46 +02:00
|
|
|
color textcolor
|
|
|
|
|
end if
|
2026-05-01 12:36:29 +02:00
|
|
|
line(x,y)-(x+w,y+h),,b
|
2026-05-01 12:23:46 +02:00
|
|
|
_printmode _keepbackground
|
2026-05-20 10:39:08 +02:00
|
|
|
outtext=right$(text,min(w/charwidth,len(text)))
|
|
|
|
|
textx=2+x
|
|
|
|
|
texty=1+y+h/2-8
|
|
|
|
|
_printstring(textx,texty),outtext
|
2026-05-01 12:36:29 +02:00
|
|
|
if state>0 then
|
|
|
|
|
if int(timer*2) mod 2=0 then
|
2026-05-20 10:39:08 +02:00
|
|
|
dim relativecursor as integer
|
|
|
|
|
relativecursor=state-(len(text)-len(outtext))
|
|
|
|
|
if relativecursor>=1 and relativecursor<=len(outtext)+1 then
|
|
|
|
|
cursorx=textx+(relativecursor-1)*charwidth
|
|
|
|
|
line(cursorx,texty)-(cursorx,texty+14),highlightcolor
|
2026-05-01 12:23:46 +02:00
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
end if
|
|
|
|
|
end sub
|
2026-05-01 11:29:53 +02:00
|
|
|
|
|
|
|
|
function min(a,b)
|
|
|
|
|
if a<=b then min=a else min=b
|
|
|
|
|
end function
|
2026-05-01 12:23:46 +02:00
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function clickregion(x as integer,y as integer,w as integer,h as integer)
|
2026-05-11 12:41:20 +02:00
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h then
|
|
|
|
|
if mouseclicked then clickregion=-1
|
|
|
|
|
if rmouseclicked then clickregion=-2
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
2026-04-29 09:28:35 +02:00
|
|
|
function button (x as integer,y as integer,w as integer,h as integer,caption as string)
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h then
|
|
|
|
|
drawbutton x,y,w,h,caption,1
|
|
|
|
|
if mouseclicked then button=-1
|
|
|
|
|
else
|
|
|
|
|
drawbutton x,y,w,h,caption,0
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function buttonhold (x as integer,y as integer,w as integer,h as integer,caption as string)
|
2026-05-20 10:39:08 +02:00
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h then
|
2026-04-29 09:28:35 +02:00
|
|
|
drawbutton x,y,w,h,caption,1
|
|
|
|
|
if _mousebutton(1)then buttonhold=-1
|
|
|
|
|
else
|
|
|
|
|
drawbutton x,y,w,h,caption,0
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function imagebutton (x as integer,y as integer,w as integer,h as integer,iconhandle as long)
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h then
|
|
|
|
|
drawimagebutton x,y,w,h,iconhandle,1
|
|
|
|
|
if mouseclicked then imagebutton=-1
|
2026-04-29 12:36:31 +02:00
|
|
|
if rmouseclicked then imagebutton=-2
|
2026-04-29 09:28:35 +02:00
|
|
|
else
|
|
|
|
|
drawimagebutton x,y,w,h,iconhandle,0
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function imagebuttonhold (x as integer,y as integer,w as integer,h as integer,iconhandle as long)
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+h then
|
|
|
|
|
drawimagebutton x,y,w,h,iconhandle,1
|
|
|
|
|
if _mousebutton(1) then imagebuttonhold=-1
|
|
|
|
|
else
|
|
|
|
|
drawimagebutton x,y,w,h,iconhandle,0
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function checkbox (x as integer,y as integer,state as integer)
|
2026-04-29 09:28:35 +02:00
|
|
|
if _mousex>x and _mousey>y and _mousex<x+16 and _mousey<y+16 then
|
2026-05-20 10:39:08 +02:00
|
|
|
drawcheckbox x,y,2+state
|
2026-04-29 09:28:35 +02:00
|
|
|
if mouseclicked then checkbox=(state+1) mod 2:exit function
|
|
|
|
|
else
|
2026-05-20 10:39:08 +02:00
|
|
|
drawcheckbox x,y,0+state
|
2026-04-29 09:28:35 +02:00
|
|
|
end if
|
|
|
|
|
checkbox=state
|
|
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function link(x,y,label as string)
|
|
|
|
|
dim w as integer
|
|
|
|
|
w=len(label)*8
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+16 then
|
|
|
|
|
drawlink x,y,label,1
|
|
|
|
|
if mouseclicked then link=-1
|
|
|
|
|
else
|
|
|
|
|
drawlink x,y,label,0
|
|
|
|
|
end if
|
|
|
|
|
end function
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function slider(x as long,y as long,w as long,value as single)
|
2026-05-05 11:17:29 +02:00
|
|
|
dim tmpval as single
|
2026-05-20 10:39:08 +02:00
|
|
|
tmpval=value
|
|
|
|
|
if _mousex>x and _mousey>y-5 and _mousex<x+w and _mousey<y+15 then
|
|
|
|
|
drawslider x,y,w,value,1
|
|
|
|
|
if _mousebutton(1) then
|
|
|
|
|
tmpval=((_mousex-x)/w)*100
|
2026-05-05 11:17:29 +02:00
|
|
|
end if
|
|
|
|
|
else
|
2026-05-20 10:39:08 +02:00
|
|
|
drawslider x,y,w,value,0
|
2026-05-05 11:17:29 +02:00
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
if tmpval<0 then tmpval=0
|
|
|
|
|
if tmpval>100 then tmpval=100
|
|
|
|
|
slider=tmpval
|
2026-05-05 11:17:29 +02:00
|
|
|
end function
|
|
|
|
|
|
2026-04-29 09:28:35 +02:00
|
|
|
function vscrollbar(x as long,y as long,h as long,value as single)
|
2026-05-20 10:39:08 +02:00
|
|
|
dim tmpval as single
|
|
|
|
|
tmpval=value
|
|
|
|
|
if buttonhold(x,y,23,23,"U") then tmpval=tmpval-1
|
|
|
|
|
if buttonhold(x,h-23,23,23,"D") then tmpval=tmpval+1
|
|
|
|
|
tmpval=vbar(x,y+23,h-46,tmpval)
|
|
|
|
|
if tmpval<0 then tmpval=0
|
|
|
|
|
if tmpval>100 then tmpval=100
|
|
|
|
|
vscrollbar=tmpval
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function vbar(x as long,y as long,h as long,value as single)
|
|
|
|
|
dim tmpval as single
|
|
|
|
|
tmpval=value
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+23 and _mousey<y+h then
|
|
|
|
|
drawvbar x,y,h,value,1
|
|
|
|
|
if _mousebutton(1) then tmpval=((_mousey-y)/(h))*100
|
|
|
|
|
else
|
|
|
|
|
drawvbar x,y,h,value,0
|
|
|
|
|
end if
|
|
|
|
|
vbar=tmpval
|
|
|
|
|
end function
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function hscrollbar(x as long,y as long,w as long,value as single)
|
2026-04-29 09:28:35 +02:00
|
|
|
dim tmpval as single
|
2026-05-20 10:39:08 +02:00
|
|
|
tmpval=value
|
|
|
|
|
if button(x,y,23,23,"L") then tmpval=tmpval-1
|
|
|
|
|
if button(x+w-23,y,23,23,"R") then tmpval=tmpval+1
|
|
|
|
|
tmpval=hbar(x+23,y,w-46,tmpval)
|
|
|
|
|
if tmpval<0 then tmpval=0
|
|
|
|
|
if tmpval>100 then tmpval=100
|
|
|
|
|
hscrollbar=tmpval
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function hbar(x as long,y as long,w as long,value as single)
|
2026-04-29 09:28:35 +02:00
|
|
|
dim tmpval as single
|
2026-05-20 10:39:08 +02:00
|
|
|
tmpval=value
|
|
|
|
|
if _mousex>x and _mousey>y and _mousex<x+w and _mousey<y+23 then
|
|
|
|
|
drawhbar x,y,w,value,1
|
2026-04-29 09:28:35 +02:00
|
|
|
if _mousebutton(1) then tmpval=((_mousex-x)/(w))*100
|
|
|
|
|
else
|
2026-05-20 10:39:08 +02:00
|
|
|
drawhbar x,y,w,value,0
|
2026-04-29 09:28:35 +02:00
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
hbar=tmpval
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
sub drawbutton(x as integer,y as integer,w as integer,h as integer,caption as string,state as integer)
|
2026-04-29 09:28:35 +02:00
|
|
|
if state and 2 then
|
2026-05-01 11:29:53 +02:00
|
|
|
color backgroundcolor1
|
2026-04-29 09:28:35 +02:00
|
|
|
line (x,y)-(x+w,y+h),,bf
|
|
|
|
|
else
|
|
|
|
|
color backgroundcolor2
|
|
|
|
|
line (x,y)-(x+w,y+h),,bf
|
|
|
|
|
end if
|
|
|
|
|
if state and 1 then
|
|
|
|
|
color highlightcolor
|
|
|
|
|
line (x,y)-(x+w,y+h),,b
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
line (x,y)-(x+w,y+h),,b
|
|
|
|
|
end if
|
|
|
|
|
_printmode _keepbackground
|
|
|
|
|
_printstring (1+x+w/2-len(caption)*8/2,1+y+h/2-8),caption
|
|
|
|
|
end sub
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
sub drawimagebutton(x as integer,y as integer,w as integer,h as integer,iconhandle as long,state as integer)
|
2026-04-29 09:28:35 +02:00
|
|
|
if state and 2 then
|
|
|
|
|
color backgroundcolor2
|
|
|
|
|
line (x,y)-(x+w,y+h),,bf
|
|
|
|
|
_putimage (x,y),iconhandle
|
|
|
|
|
else
|
|
|
|
|
color backgroundcolor2
|
|
|
|
|
line (x,y)-(x+w,y+h),,bf
|
|
|
|
|
_putimage (x,y),iconhandle
|
|
|
|
|
end if
|
|
|
|
|
if state and 1 then
|
|
|
|
|
color highlightcolor
|
|
|
|
|
line (x,y)-(x+w,y+h),,b
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
line (x,y)-(x+w,y+h),,b
|
|
|
|
|
end if
|
|
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub drawcheckbox(x,y,state)
|
|
|
|
|
if state and 2 then
|
|
|
|
|
color highlightcolor
|
|
|
|
|
line (x,y)-(x+16,y+16),&hffdddddd,b
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
line (x,y)-(x+16,y+16),&hffbbbbbb,b
|
|
|
|
|
end if
|
|
|
|
|
if state and 1 then
|
|
|
|
|
color textcolor
|
|
|
|
|
line (x+3,y+3)-(x+13,y+13),,bf
|
|
|
|
|
end if
|
|
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub drawframe(x,y,w,h,label as string)
|
|
|
|
|
|
|
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub drawlink(x,y,label as string,state as integer)
|
|
|
|
|
if state=1 then
|
|
|
|
|
color highlightcolor
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
_printstring (x,y),label
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub drawhline(x,y,w)
|
|
|
|
|
line (x,y)-(x+w,y),backgroundcolor1
|
|
|
|
|
line (x,y+1)-(x+w,y+1),backgroundcolor2
|
|
|
|
|
end sub
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
sub drawslider(x as long,y as long,w as long,value as single,state as integer)
|
|
|
|
|
dim handlex as long
|
|
|
|
|
handlex=x+(w*(value/100))
|
2026-05-05 11:17:29 +02:00
|
|
|
color backgroundcolor1
|
2026-05-20 10:39:08 +02:00
|
|
|
line (x,y+4)-(x+w,y+6),,bf
|
|
|
|
|
if state=1 then color highlightcolor else color textcolor
|
|
|
|
|
line (x,y+4)-(x+w,y+6),,b
|
|
|
|
|
if state=1 then
|
2026-05-05 11:17:29 +02:00
|
|
|
color highlightcolor
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
line (handlex-5,y-2)-(handlex+5,y+12),,bf
|
2026-05-05 11:17:29 +02:00
|
|
|
color backgroundcolor1
|
2026-05-20 10:39:08 +02:00
|
|
|
line (handlex-5,y-2)-(handlex+5,y+12),,b
|
2026-05-05 11:17:29 +02:00
|
|
|
end sub
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
sub drawvbar(x as long,y as long,h as long,value as single,state as integer)
|
|
|
|
|
if state and 2 then
|
2026-04-29 09:28:35 +02:00
|
|
|
color backgroundcolor2
|
|
|
|
|
line (x,y)-(x+23,y+h),,bf
|
|
|
|
|
else
|
|
|
|
|
color backgroundcolor2
|
|
|
|
|
line (x,y)-(x+23,y+h),,bf
|
|
|
|
|
end if
|
|
|
|
|
if state and 1 then
|
|
|
|
|
color highlightcolor
|
|
|
|
|
line (x,y)-(x+23,y+h),,b
|
|
|
|
|
else
|
|
|
|
|
color textcolor
|
|
|
|
|
line (x,y)-(x+23,y+h),,b
|
|
|
|
|
end if
|
|
|
|
|
dim indicator as long
|
2026-05-20 10:39:08 +02:00
|
|
|
indicator=((h-23)/100)*value
|
|
|
|
|
line (x+1,y+indicator)-step (21,21),,bf
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
sub drawhbar(x as long,y as long,w as long,value as single,state as integer)
|
2026-04-29 09:28:35 +02:00
|
|
|
color backgroundcolor2
|
2026-05-20 10:39:08 +02:00
|
|
|
line (x,y)-(x+w,y+23),,bf
|
2026-04-29 09:28:35 +02:00
|
|
|
if state and 1 then
|
|
|
|
|
color highlightcolor
|
2026-05-20 10:39:08 +02:00
|
|
|
line (x,y)-(x+w,y+23),,b
|
2026-04-29 09:28:35 +02:00
|
|
|
else
|
|
|
|
|
color textcolor
|
2026-05-20 10:39:08 +02:00
|
|
|
line (x,y)-(x+w,y+23),,b
|
2026-04-29 09:28:35 +02:00
|
|
|
end if
|
|
|
|
|
dim indicator as long
|
2026-05-20 10:39:08 +02:00
|
|
|
indicator=((w-23)/100)*value
|
|
|
|
|
line (x+indicator,y+1)-step (21,21),,bf
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sub textcolor (value as long)
|
2026-05-20 10:39:08 +02:00
|
|
|
ignore=__interncolors(1,1,value)
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub highlightcolor (value as long)
|
2026-05-20 10:39:08 +02:00
|
|
|
ignore=__interncolors(1,2,value)
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub backgroundcolor1 (value as long)
|
2026-05-20 10:39:08 +02:00
|
|
|
ignore=__interncolors(1,3,value)
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
sub backgroundcolor2 (value as long)
|
2026-05-20 10:39:08 +02:00
|
|
|
ignore=__interncolors(1,4,value)
|
2026-04-29 09:28:35 +02:00
|
|
|
end sub
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function textcolor ()
|
2026-05-20 10:39:08 +02:00
|
|
|
textcolor=__interncolors(2,1,ignore)
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function highlightcolor ()
|
2026-05-20 10:39:08 +02:00
|
|
|
highlightcolor=__interncolors(2,2,ignore)
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function backgroundcolor1 ()
|
2026-05-20 10:39:08 +02:00
|
|
|
backgroundcolor1=__interncolors(2,3,ignore)
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
function backgroundcolor2 ()
|
2026-05-20 10:39:08 +02:00
|
|
|
backgroundcolor2=__interncolors(2,4,ignore)
|
2026-04-29 09:28:35 +02:00
|
|
|
end function
|
|
|
|
|
|
|
|
|
|
|
2026-05-20 10:39:08 +02:00
|
|
|
function __interncolors(mode as integer,object as integer,value as long)
|
|
|
|
|
static textc as long
|
|
|
|
|
static highc as long
|
|
|
|
|
static bgrc1 as long
|
|
|
|
|
static bgrc2 as long
|
|
|
|
|
static linc as long
|
|
|
|
|
static init as long
|
|
|
|
|
if init=0 then
|
|
|
|
|
textc=&hffbbbbbb
|
|
|
|
|
highc=&hffdddddd
|
|
|
|
|
bgrc1=&hff282828
|
|
|
|
|
bgrc2=&hff282828
|
|
|
|
|
linc=&hffdddddd
|
|
|
|
|
init=-1
|
|
|
|
|
end if
|
2026-04-29 09:28:35 +02:00
|
|
|
if mode=1 then
|
2026-05-20 10:39:08 +02:00
|
|
|
select case object
|
|
|
|
|
case 1
|
|
|
|
|
textc=value
|
|
|
|
|
case 2
|
|
|
|
|
highc=value
|
|
|
|
|
case 3
|
|
|
|
|
bgrc1=value
|
|
|
|
|
case 4
|
|
|
|
|
bgrc2=value
|
|
|
|
|
end select
|
2026-04-29 09:28:35 +02:00
|
|
|
end if
|
2026-05-20 10:39:08 +02:00
|
|
|
if mode=2 then
|
|
|
|
|
select case object
|
|
|
|
|
case 1
|
|
|
|
|
__interncolors=textc
|
|
|
|
|
case 2
|
|
|
|
|
__interncolors=highc
|
|
|
|
|
case 3
|
|
|
|
|
__interncolors=bgrc1
|
|
|
|
|
case 4
|
|
|
|
|
__interncolors=bgrc2
|
|
|
|
|
end select
|
2026-04-29 09:28:35 +02:00
|
|
|
end if
|
|
|
|
|
end function
|