Ich wünsche mir das GetWindowColor + GetGadgetColor
endlich auch ohne einen SetColor Befehl die richtigen Farbwerte zurück geben.
Und nicht -1
Auch StartDrawing() ist unzuverlässig, siehe auf Button drücken
Code: Alles auswählen
OpenWindow(0, 0, 0, 322, 200, "Lieber Weihnachtsmann", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
ContainerGadget(1, 8, 8, 150, 180, #PB_Container_Flat)
CloseGadgetList()
PanelGadget(2, 165, 8, 150, 180)
AddGadgetItem (2, -1, "Panel 1")
ButtonGadget(3, 20, 50, 80, 30, "drücken")
AddGadgetItem (2, -1, "Panel 2")
CloseGadgetList()
Debug "Background-Farben ohne SetColor"
Debug GetWindowColor(0)
Debug Hex(GetWindowColor(0))
Debug GetGadgetColor(1, #PB_Gadget_BackColor)
Debug Hex(GetGadgetColor(1, #PB_Gadget_BackColor))
Debug GetGadgetColor(2, #PB_Gadget_BackColor)
Debug Hex(GetGadgetColor(2, #PB_Gadget_BackColor))
Debug ""
Debug "Background-Farbe mit StartDrawing()"
StartDrawing(WindowOutput(0))
Debug Hex(Point(1,1))
StopDrawing()
Repeat : Event = WaitWindowEvent()
Select Event
Case #PB_Event_Gadget
Select EventGadget()
Case 3
SetWindowColor(0, #Green)
SetGadgetColor(1, #PB_Gadget_BackColor, #Blue)
Debug ""
Debug "Background-Farben nach SetColor"
Debug GetWindowColor(0)
Debug Hex(GetWindowColor(0))
Debug GetGadgetColor(1, #PB_Gadget_BackColor)
Debug Hex(GetGadgetColor(1, #PB_Gadget_BackColor))
StartDrawing(WindowOutput(0))
Debug Hex(Point(1,1)) + " <--- Buh"
StopDrawing()
EndSelect
EndSelect
Until Event = #PB_Event_CloseWindow