03-21-2025, 11:29 PM
Well cool, at least something works after all this puttering around...
Key #2 is the software popup.
Now it won't work without _PaletteColor, which is why I initially gave up on using _DISPLAYORDER. With it, it works. So now the hardware image is displayed underneath the popups.
Pete
- There's a lot more to life when you go cordless. That usually happens right after birth.
Key #2 is the software popup.
Code: (Select All)
Dim fb.a As String
fb.a = "Button"
j = Len(fb.a)
k = btnnbr
ReDim _Preserve x(btnnbr), y(btnnbr), button$(btnnbr), bl1(btnnbr), bl2(btnnbr)
Dest = _Dest
t = _NewImage((j + 3) * 8, 4 * 16, 32)
_Dest t
Line (2, 7 + 2)-((j + 2) * 8 - 2, 16 * 2 + 7 - 2), _RGB32(0, 0, 255), B
Line (0, 7)-((j + 2) * 8, 16 * 2 + 7), _RGB32(0, 255, 0), B
Line (8, 15)-((j + 1) * 8, 16 + 15), _RGB32(255, 0, 0), B
bl1(btnnbr) = _CopyImage(t, 33)
_FreeImage t
t = _NewImage((j + 3) * 8, 4 * 16, 32)
_Dest t
Line (2, 7 + 2)-((j + 2) * 8 - 2, 16 * 2 + 7 - 2), _RGB32(255, 255, 255), BF
square = _CopyImage(t, 33)
_FreeImage t
_Dest Dest
_PaletteColor 0, 0 ' Set color 0 to become 0 alpha, 0 red, 0 blue, 0 green -- transparent black instead of solid black.
Palette 7, 63
Print "Hello World!"
Do
_Limit 30
b$ = InKey$
If Len(b$) Then
If b$ = "1" Then pete = 1 - pete
If b$ = "2" Then soft = 1 - soft: If soft = 0 Then PCopy 1, 0: initiate = 0
If b$ = "3" Then convert = 1 - convert
If b$ = Chr$(27) Then System
End If
_PutImage (100, 100), bl1(btnnbr)
If pete Then _PutImage (100, 80), square ' Popup is a hardware image made in advance.
If soft Then ' Popup is a software image.
If initiate = 0 Then
initiate = 1
PCopy 0, 1
_DisplayOrder _Hardware , _Software ' Hardware under software.
Color 0, 7
Locate 8, 15
Print Space$(6);
Locate , 15
Print Space$(6)
Locate , 15
Print Space$(6)
Color 7, 0
End If
End If
If convert Then ' Popup is a software image converted to a hardware image, but this does not appear doable using text coding, only.
If initiate2 = 0 Then
t = _NewImage(600, 400, 32)
_Dest t
Locate 1, 1
Print String$(6, 219)
Locate , 1
Print String$(6, 219)
Locate , 1
Print String$(6, 219)
c = _CopyImage(t, 33)
_FreeImage t
_Dest 0
initiate2 = 1
End If
_PutImage (100, 80), c
End If
_Display
Loop
Now it won't work without _PaletteColor, which is why I initially gave up on using _DISPLAYORDER. With it, it works. So now the hardware image is displayed underneath the popups.
Pete
- There's a lot more to life when you go cordless. That usually happens right after birth.