Discuss GUI programming with the MUI Royale plugin here
jPV
Posts: 674 Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:
Post
by jPV » 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
sinisrus
Posts: 347 Joined: Tue Apr 21, 2015 5:43 pm
Post
by sinisrus » Thu Dec 23, 2021 3:30 pm
Hello,
it doesn't work on Os4 ! For this use <button> class
Imagebutton class work only with image object:
– ArrowDown
– ArrowLeft
– ArrowRight
– ArrowUp
– Assign
– Brush:<id>
– CheckMark
– Chip
– Cycle
– Disk
– Drawer
– HardDisk
– ListCursor
– ListSelCur
– ListSelect
– Network
– PopDrawer
– PopFile
– PopUp
– PropKnob
– RadioButton
– SliderKnob
– TapeDown
– TapePause
– TapePlay
– TapePlayback
– TapeRecord
– TapeStop
– TapeUp
– Volume
jPV
Posts: 674 Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:
Post
by jPV » Fri Dec 24, 2021 9:47 am
There's "Brush:<id>" in that list too...
sinisrus
Posts: 347 Joined: Tue Apr 21, 2015 5:43 pm
Post
by sinisrus » Fri Dec 24, 2021 10:37 am
yes it works with the class <image> but not with class <imagebutton>
airsoftsoftwair
Posts: 5619 Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:
Post
by airsoftsoftwair » Mon Dec 27, 2021 12:56 pm
jPV wrote: ↑ 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?
Yes, since Imagebutton class derives from Image class it should actually work. Looks like this is broken. Will fix it.
TearsOfMe
Posts: 18 Joined: Fri Apr 24, 2020 2:15 pm
Post
by TearsOfMe » Sun Nov 10, 2024 8:58 pm
Hello.
I can't geht this to work.
Is it working current?
airsoftsoftwair
Posts: 5619 Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:
Post
by airsoftsoftwair » Sat Nov 23, 2024 12:12 am
TearsOfMe wrote: ↑ Sun Nov 10, 2024 8:58 pm
Hello.
I can't geht this to work.
Is it working current?
Unfortunately not, last MUI Royale version is from 2017. I guess it needs an update some time soon