Imagebutton doesn't show a brush
Posted: Tue Dec 21, 2021 4:49 pm
If I try to use a custom brush in the imagebutton, I only get some predefined MUI image (on MorphOS). Shouldn't it work just like with the image class?
Code: Select all
@DISPLAY {hidden=True}
@REQUIRE "muiroyale"
Function p_EventFunc(msg)
Switch msg.Class
Case "Window":
Switch msg.Attribute
Case "CloseRequest":
End
EndSwitch
EndSwitch
EndFunction
CreateBrush(1, 32, 32, #RED)
gui$ = [[<?xml version="1.0" encoding="iso-8859-1"?>
<application base="HELLOWORLD">
<window title="Example GUI" muiid="MAIN" notify="closerequest" width="Visible:10">
<hgroup>
<vgroup>
<image source="brush:1"/>
<imagebutton source="brush:1"/>
</vgroup>
<rectangle/>
</hgroup>
</window>
</application>]]
mui.CreateGUI(gui$)
InstallEventHandler({MUIRoyale = p_EventFunc})
Repeat
WaitEvent
Forever