This is an extension that adds functionality for mini menu cursor support! It’s an add-on for @richardsRiknoll/arcade-mini-menu extension, and uses the new Browser Events extension to let you to move and scroll menus with your cursor!
All 6 added blocks can be found at the bottom of the Mini Menu tab, and can be combined with the Browser Events blocks to control menus with your cursor!
The 2 unused blocks, “(all menus)” and “[simulate click of button ]” are blocks I felt went well the extension. “(all menus)” is an array of all menu sprites, regardless of which “sprite type” they are, and the “simulate click” block lets you “click” a button using code, without actually having to click said button, which is how I’m triggering the “(myMenu) on [A] button pressed with (selection) (selectedIndex)” blocks in the menus!
Make sure to set “button events enabled” to false on menus you don’t want clicked, because all menus will all have their “button pressed” when you click one menu. That’s just something I didn’t find a way around.
When you add the extension, both Browser Events and Mini Menu will be automatically added if they aren’t already in your project, which is very convenient!
@WoofWoof FYI, the reason that two fingered clicks on mac trackpads is wheel click right now is because I made a mistake in the extension! the hotfix we’ll be releasing soon for arcade will correct that.
The extension has been updated! This is a major update, with block changes, so idk what will happen when you update the extension in existing projects.
Changes:
added image support! Instead of a single set size for each menu item, the size of every individual menu item is grabbed, so the menu works correctly regardless of the size of each individual menu item. This means this will also work if you change menu item sizes some other way, such as changing the default font of the extension, which looks like it would be pretty simple to do with a simple edit to the extension… maybe a future project?
I figured out how to “click” the menus without clicking the button for everything in your game, which I didn’t do before because… idk why, I didn’t even look into it before, so that’s on me I guess. Now you can simulate a click for all menus touching the cursor without clicking everything. I left the old “simulate click of button…” function in just because there isn’t any real reason to remove it.
The “scroll menu” blocks have been consolidated into a single block with an up/down dropdown menu.
Added a block for simulating a button click in a specified menu.
Fixed some features like scrolling up/down by moving the cursor above/under the menu.
Tiny edit to stop the click function from instantly clicking new menus that get created while the function is running. Basically if you have a new menu appear when you click a menu option, this change prevents that new menu from getting clicked.
Ok! These are famous last words, but I believe I have the extension all done! I just updated it so that it can detect whether or not a menu is “relative to camera” and adjust the cursor position accordingly. I think that was the last thing… I hope that was the last thing!!
If you find something wrong or that you want changed, just ask!
It seems to work fine for me. I don’t see any conflicts, and all the tile util functions are in their own namespace, so I can’t see what might be causing this. Can you send the project that’s having the issue? I should be able to fix it if it’s actually a problem with my extension…
(@Stickman4269 cause this didn’t send as a reply to your post for some reason)
The issue turned out to be that I was importing the demo project for some reason instead of the actual extension. The error was that they were both exporting the Transparency16 const.
Oh, yeah, that error is the one that pops up first when you have duplicate “tilemap.ts” files, so that makes sense! I actually have no idea how to import the demo (test files) without just importing the extension as its own project, so that’s weird!
Hi, @WoofWoof is there a way so that when my mouse hovers over one of the menu items, if it is bigger than the screen, it scrolls sideways to show the whole thing?
Bigger than the screen or longer than the width of the menu sprite?
I believe it will already scroll after a second or two if the text is longer than the menu. That’s a mini menu feature. Idk about if it’s an image longer than the menu, I’ve never tested that.
If you are talking about physically moving the menu sprite if the sprite itself is off the screen, I’m going to say that you can definitely figure out how to do that yourself if you really want to.
Personally, I like my menus to be fully in the screen, and the cursor can’t go off the edge of the screen, so if your menu is off the screen, it obviously can’t be controlled by the cursor unless I pull out some real fancy stuff somehow.
If you are talking about the menu going below the screen and being un-scroll-down-able, that can be fixed by using the “scroll menus down” block when the cursor is at the bottom of the screen, which I’m sure you can figure out!
I mean the text is longer than the width of the screen. My code is what you showed us in the image, specifically the On Left Mouse Button Pressed code.