For any feature requests to either the Skyline Engine or the websites and forums please leave your suggestion here.

Plugin Menu

Plugin Menu

Postby Shando » 27 Dec 2017, 03:10

Hi all,

Not sure if I've already requested this, but can we have a way to enable & disable menu items in Plugins?

Thanks in advance.

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Plugin Menu

Postby SolarPortal » 08 Jan 2018, 12:27

not sure lol :P

Enabling and disabling menu items is not as easy in qt as other elements are..... will add to todo list if not already :)
The last thing that was fixed was the sub editors open and closing.
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Plugin Menu

Postby Shando » 03 Feb 2018, 04:52

Hi SP,

I've been digging around looking at how to disable Menu items and came across this potential code:

Looking for the index of the action is not necessarily convenient. If you have built the interface with QtCreator's form editor then you will have an action for each menu item. Their names are based on the text that you first give to the actions. For example if you interactively enter a menu item with title Foo Bar then an action named actionFoo_Bar is created for you. Just type ui->action in the code editor and watch what "name completion" QtCreator will propose.

In such a case I would consider a call like this:

ui->actionFoo_Bar.setEnabled(false);

You can even make the menu item disappear with

ui->actionFoo_Bar.setVisible(false);


https://stackoverflow.com/questions/9506614/how-to-gray-out-a-menu-item-in-qt

Looks like it can be done relatively(?) simply by using 'setEnabled' on the "Action"??

HTH

Shando
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Plugin Menu

Postby SolarPortal » 07 Feb 2018, 14:57

will have a look asap :)
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Plugin Menu

Postby SolarPortal » 07 Feb 2018, 17:32

Done :)

Actions were not accounted for, so there may be more, but i have the setEnabled, setDisabled and hideWidget, showWidget working with the menu items :) This will be available in the next release.

Code: Select all
function main()
   lprint("Test Menu is engaged!");
   
   qt.setDisabled(thisEditor, "actionTest2");
   qt.setDisabled(thisEditor, "actionTest3");
   qt.setEnabled(thisEditor, "actionTest3");
   
   qt.hideWidget(thisEditor, "actionTest1");
end
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Plugin Menu

Postby Shando » 07 Feb 2018, 21:16

Cool 8-)
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer

Re: Plugin Menu

Postby SolarPortal » 07 Feb 2018, 21:32

Also, just added the ability to add icons to the plugins folder so the menu item in the plugins menu is shown which can use a *.ico or *.png of the same name as the plugin.

You can place plugins in sub folders to keep them more organised. I just have to update the refresh all plugins to make it only refresh the active ones and regen the list, so we can add more plugins without shutting down.
A later job could then be an extension manager list that you can enable / disable certain plugins for the editor or perhaps per scene?
Skyline Game Engine - Lead Dev.
Please provide as much info as possible when asking for help.


Specs: OS: Win 10 64bit, CPU: Intel i7 4770 3.4ghz x 4 core(8 threads), GPU: Nvidia GTX 1060 6GB, Ram: 16gig DDR3, Windows on 250gb Samsung Evo 860

Twitter: @SolarPortal
Instagram: @SolarPortal
User avatar
SolarPortal
Skyline Founder
Skyline Founder
 
Posts: 3631
Joined: 29 Jul 2012, 15:56
Location: UK
Skill: 3D Modeller
Skill: 2D Artist
Skill: Programmer
Skill: Level Designer

Re: Plugin Menu

Postby Shando » 08 Feb 2018, 11:51

an extension manager list that you can enable / disable certain plugins


Double thumbs up for this one :mrgreen:
Ryzen 7 4800H 16GB GTX1650 Win 11 64
Love, Hope, Strength http://www.lovehopestrength.co.uk
User avatar
Shando
Skyline Moderator
Skyline Moderator
 
Posts: 560
Joined: 06 Mar 2013, 22:35
Location: Moffat Beach, Queensland
Skill: Programmer
Skill: Scripter
Skill: Level Designer


Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 4 guests