Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Submenu Clickable
Re: Submenu Clickable [message #51345 is a reply to message #51341] Tue, 12 March 2019 15:08 Go to previous message
Qwak is currently offline  Qwak
Messages: 8
Registered: October 2018
Promising Member
Hey Oblivion thanks again, i had what you proposed.

i finnaly came up with :

void TrayMenu(Bar& bar) {
	bar.Add(connect ? "Deconnexion":"Connexion automatique", THISBACK(SwitchConnect)).Enable(!error);
	if (connect)
		bar.Add("Pause", THISBACK(PauseMenu)).Enable(connect);
	else
		bar.Add("Pause", THISBACK(BreakOut)).Enable(!error);
	bar.Add("About", THISBACK(About));
	bar.Add("Quitter", THISBACK(Exit));
}

void PauseMenu(Bar& bar) {
	for(Argument &b : breaks) {
        bar.Add(b.ArgValue, [=] {
		currentBreak != std::stoi(b.ArgName.ToStd()) ? BreakIn(std::stoi(b.ArgName.ToStd())) : BreakOut();
        }).Check(currentBreak == std::stoi(b.ArgName.ToStd()));
    }
}


it actually works fine but i feel like it would be better to be able to open and click on the same itemMenu.

Thanks Oblivion for brainstorming with me.

Qwak.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved] Is it an encoding problem ?
Next Topic: Confusion about where to start or what to use
Goto Forum:
  


Current Time: Fri May 10 02:35:16 CEST 2024

Total time taken to generate the page: 0.01985 seconds