Page 1 of 1

Make any Hamburger entry clickable

Posted: 27 Jul 2025 04:53
by kiwichick
In the Hamburger menu, it would be great to have the option to make any item clickable instead of only the last submenu item being clickable.

For example:

Code: Select all

ThisFolder
	Another Folder here
		Third Folder
Currently, only Third Folder is clickable, but I might also want to go to ThisFolder. The only way to achieve it is to add another menu item for that. And if I want to go to Another Folder Here, I have to add yet another item. This makes the Hamburger unnecessarily bloated and having an option to make all, or some, of them clickable would make it more compact.

Re: Make any Hamburger entry clickable

Posted: 27 Jul 2025 09:02
by admin
Submenu parents cannot be clicked. Windows law.

Re: Make any Hamburger entry clickable

Posted: 27 Jul 2025 09:14
by kiwichick
admin wrote: 27 Jul 2025 09:02 Submenu parents cannot be clicked. Windows law.
Darn Windows 😆

Re: Make any Hamburger entry clickable

Posted: 12 Aug 2025 00:23
by bossi

Code: Select all

function load_menu($menu){
		$menu = replace($menu,"	"," ");
		$cmd = trim(popupnested($menu, , , , , ,  , "|" , ));
		if startswith($cmd,"#") == FALSE AND startswith($cmd,":") == FALSE AND $cmd != '' {
			if (get("trigger", "menushift") == 1 && strpos($cmd, '" "') != -1) {
				$remove  = gettoken($cmd, 2, '" "', "t", 2);
				$cmd = regexreplace(replace($cmd, $remove), "[ ]+?[""]$", chr(39));
			}
			load $cmd, , "s"; 
		}	
	}

"_ : clickableMenu"
 $menu = <<<MENU
	some caption         |somefunction()     |someicon.png
	 sub_entry            |somefunction("sufix", "prefix") |someicon.png
	somecaption        |zip($somevar)     |someicon.png
MENU;
	load_menu($menu);

this will do what you want , expands on hover and lets you click any element within the menu , indent is 1xSpace = 1xLevel

Re: Make any Hamburger entry clickable

Posted: 12 Aug 2025 12:05
by kiwichick
bossi wrote: 12 Aug 2025 00:23

Code: Select all

function load_menu($menu){
		$menu = replace($menu,"	"," ");
		$cmd = trim(popupnested($menu, , , , , ,  , "|" , ));
		if startswith($cmd,"#") == FALSE AND startswith($cmd,":") == FALSE AND $cmd != '' {
			if (get("trigger", "menushift") == 1 && strpos($cmd, '" "') != -1) {
				$remove  = gettoken($cmd, 2, '" "', "t", 2);
				$cmd = regexreplace(replace($cmd, $remove), "[ ]+?[""]$", chr(39));
			}
			load $cmd, , "s"; 
		}	
	}

"_ : clickableMenu"
 $menu = <<<MENU
	some caption         |somefunction()     |someicon.png
	 sub_entry            |somefunction("sufix", "prefix") |someicon.png
	somecaption        |zip($somevar)     |someicon.png
MENU;
	load_menu($menu);

this will do what you want , expands on hover and lets you click any element within the menu , indent is 1xSpace = 1xLevel
Thanks. Cab you please tell me how I use it with the hamburger menu?

Re: Make any Hamburger entry clickable

Posted: 13 Aug 2025 01:48
by bossi
i just posted a solution for the feature request , youd have to rewrite the Hamburger menu into :

<caption> | <function or code or whatever> | <icon path or leave empty >
<caption> | <function or code or whatever> | <icon path or leave empty >
via 1x space you ident the entries making them sub entries ..

it produces same hamburger menu but with all clickable elements and some more additional features i guess

Re: Make any Hamburger entry clickable

Posted: 14 Aug 2025 02:29
by kiwichick
bossi wrote: 13 Aug 2025 01:48 i just posted a solution for the feature request , youd have to rewrite the Hamburger menu
So it's something Don would have to do. Hopefully he'll see this and consider it, if it's able to be used without breaking anything.