Page 1 of 1

Inconsistent disabling ButtonImage different depth

Posted: Mon Jan 31, 2011 10:18 pm
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

Re: Inconsistent disabling ButtonImage with different depths

Posted: Thu May 03, 2012 1:31 pm
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.

Re: Inconsistent disabling ButtonImage with different depths

Posted: Thu May 03, 2012 3:52 pm
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).