Inconsistent disabling ButtonImage different depth

Windows specific forum
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Inconsistent disabling ButtonImage different depth

Post by c4s »

DisableGadget() is inconsistent with ButtonImageGadget() and different image depths:

Code: Select all

CreateImage(123, 100, 100, 32)  ; 32 bit, disabled is grayscale
StartDrawing(ImageOutput(123))
	DrawingMode(#PB_2DDrawing_Gradient)
	GradientColor(0.0, $0000FF)
	GradientColor(0.4, $00FFFF)
	GradientColor(0.6, $FFFF00)
	GradientColor(1.0, $FF0000)
	BoxedGradient(0, 0, 100, 100)
	Box(0, 0, 100, 100)
StopDrawing()

CreateImage(124, 100, 100, 24)  ; 24 bit, disabled is just gray
StartDrawing(ImageOutput(124))
	DrawingMode(#PB_2DDrawing_Gradient)
	GradientColor(0.0, $0000FF)
	GradientColor(0.4, $00FFFF)
	GradientColor(0.6, $FFFF00)
	GradientColor(1.0, $FF0000)
	BoxedGradient(0, 0, 100, 100)
	Box(0, 0, 100, 100)
StopDrawing()


If OpenWindow(1, #PB_Ignore, #PB_Ignore, 230, 120, "ButtonImage", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
	ButtonImageGadget(2, 10, 10, 100, 100, ImageID(123))
	 DisableGadget(2, #True)
	ButtonImageGadget(3, 120, 10, 100, 100, ImageID(124))
	 DisableGadget(3, #True)

	Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Fred
Administrator
Administrator
Posts: 18360
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Inconsistent disabling ButtonImage with different depths

Post by Fred »

We use the API 24 bit picture, so it's full gray and we use a custom draw for the alpha. Not really a bug.
c4s
Addict
Addict
Posts: 1981
Joined: Thu Nov 01, 2007 5:37 pm
Location: Germany

Re: Inconsistent disabling ButtonImage with different depths

Post by c4s »

Fred wrote:Not really a bug.
But an inconsistency as the title says. Maybe it should be noted in the help file (if it doesn't get repaired).
If any of you native English speakers have any suggestions for the above text, please let me know (via PM). Thanks!
Post Reply