Probleme MuiRoyal, menu with RightMouse button

Discuss GUI programming with the MUI Royale plugin here
Post Reply
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

Probleme MuiRoyal, menu with RightMouse button

Post by sinisrus »

Hello,

If i presse and I release RightMouse button with menu MuiRoyal it always return 1
Do you have a solution ?

Thank you

Code: Select all

/* Created with BuildOther v1.0 */
/* By Sinisrus © 2014 */

@VERSION 8,0
@REQUIRE "MUIRoyale"


@DISPLAY 1, {Hidden=True,color=#WHITE}


Function  p_EventFunc(msg)
    Switch msg.action
    Case "MUIRoyale":
        Switch msg.attribute
        Case "CloseRequest":
            End
        EndSwitch
    Case "HideWindow":
        mui.Set("app", "iconified", True)
    Case "ShowWindow":
        mui.Set("app", "iconified", False)
    EndSwitch
EndFunction


; listen to these events!
InstallEventHandler({MUIRoyale = p_EventFunc})


; dynamically create MUI GUI from an external *.xml file definition
mui.CreateGUI([[
<?xml version="1.0" encoding="iso-8859-1"?>
<application id="app" base="NOUVEAU" menustrip="menu">
    <menustrip id="menu">
        <menu title="menu">
            <item id="id_Menu_New"  notify="selected" shortcut="N">test</item>
            <item id="id_Menu_Load" notify="selected" shortcut="O">menu</item>
        </menu>
    </menustrip>
  <window id="win1" width="400" height="400" title="Nouveau" notify="closerequest">
  <vgroup>
<hollywood display="1" minwidth="32" minheight="32" maxwidth="950" maxheight="600" innertop="0" innerleft="0" innerright="0" innerbottom="0"/>
<button>test</button>
  </vgroup> 
  </window>
</application>
]])


Function p_MainLoop()
debugprint(IsLeftMouse(), IsRightMouse())
EndFunction

SetInterval(1, p_MainLoop, 1000/50) ; 50fps 

EscapeQuit(True)

/* Boucle infinie */
Repeat
        WaitEvent
Forever

User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Probleme MuiRoyal, menu with RightMouse button

Post by airsoftsoftwair »

This is a limitation in MUI. See here. Listening to the right mouse button is only possible when not using a menu at the same time.
Post Reply