ok so I stumbeled upon this OSD Menu plugin. i loved the fading in and out and the transparency it had, but crappy thing was it's locked to your primary monitor and people have asked about it getting fixed.
so i fixed it.
it now supports multiple monitors
i also added the ability to change the font color for highlighted and not as well as the background color.
i also added the ability to adjust the transparency
and the border thickness as well
i do plan on making it able to load from a variable and support like 5 tier nested menus.
have fun with it kiddos
K
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
OSDMenu Plugin
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: OSDMenu Plugin
ok ladies, I got the menu style system working on this thing.
it can handle an infinite amount of levels. I have personally tested it with a 24 deep nexted menu and it works flawless.
now the Action to load the data into it does not have a dialog, i didn't really see a need to put one in so you just have to copy it as python code and pass a variable with the data
the syntax for the data is a list and you do not technically wanna nest them.
I have it set up so that you pass to it the text as seen in the menu, the event and a payload
if you want to make a submenu you replace the suffix with 'LVL' and the payload with the indices of where the next menu is located in the file
so the file is organized in this fashon
[
[[text, event, payload],[text, event, payload],[text, 'LVL', 1],[text, event, payload],[text, event, payload],[text, event, payload]],
[[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload]]
]
so as you can see it's not really nested. but as depicted in the example the 2 separate menu's are tied together this makes for an extremely simple system because all i do is keep track of where you have gone in the menu not where you are going.
all i do when you change levels is append the data to a list and as you go backwards through the menu i just remove that menu from that storage.
now one thing i have not done is to go way up in the menu and have a pointer there pointing backwards in a sence at a liwer indicies menu.
that could be a bug. dunno just thought if it. gonna have to test it.
but here is the release for those of you interested..
K
it can handle an infinite amount of levels. I have personally tested it with a 24 deep nexted menu and it works flawless.
now the Action to load the data into it does not have a dialog, i didn't really see a need to put one in so you just have to copy it as python code and pass a variable with the data
the syntax for the data is a list and you do not technically wanna nest them.
I have it set up so that you pass to it the text as seen in the menu, the event and a payload
if you want to make a submenu you replace the suffix with 'LVL' and the payload with the indices of where the next menu is located in the file
so the file is organized in this fashon
[
[[text, event, payload],[text, event, payload],[text, 'LVL', 1],[text, event, payload],[text, event, payload],[text, event, payload]],
[[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload],[text, event, payload]]
]
so as you can see it's not really nested. but as depicted in the example the 2 separate menu's are tied together this makes for an extremely simple system because all i do is keep track of where you have gone in the menu not where you are going.
all i do when you change levels is append the data to a list and as you go backwards through the menu i just remove that menu from that storage.
now one thing i have not done is to go way up in the menu and have a pointer there pointing backwards in a sence at a liwer indicies menu.
that could be a bug. dunno just thought if it. gonna have to test it.
but here is the release for those of you interested..
K
- Attachments
-
- OSDMenu.zip
- (10.96 KiB) Downloaded 206 times
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: OSDMenu Plugin
ok i wanted to post an update,
i have one glitch i am working on but it's almost complete
full multi level with backing up in the menu structure.
i added scrolling to the menu in case there are to many items on the screen, auto senses the screen size but i also have a parameter to override that in case you want to have less items display on the screen.
you can change the color of the text, selected text, background, selected background, border
you can set the width of the border, the transparency of the background and the text, as well as the font
i have added a nice little remote that is not locked to always on top for controlling the menu or testing.
if you have a menu displayed and a different one is called and not in the existing structure (example: you call another menu from an action. say something that contains variable data) it stores the other menu and when you back up it will reload the previous system.
*************
i have one glitch i am working on and if Pako can shed some light on it, it's got me stumped
i love the way the menu looks and runs, but i had to add the ability to scroll to it, and no matter what i did it would come out messed up if i did that or i would have a scroll control on the side.
so i decided to do it a different way since the displayed screen gets iterated through i just had to make like a moving segment out of all of the available data.
problem is when the data all fits inside the screen properly there is no need to make that moving block and that works fine, but what happens is when it makes the moving block the menu shows with the background but no text, until i move the menu then it appears i have been changing things about hoping for a solution, but it keeps doing the same thing
i know there is a way to create the frame so it will scroll without a slide bar and not using ctypes and the win32 for the transparency, but if i use the set transparency it works if i key a solid number into the call but if i use a variable it tells me about using bytes and i have yet to find a successful means of creating a byte list for the thing.
***********
*********Edit
Never Mind, I got it running, wx really likes to have every variable passed to it, it doesn't like to much if you just pass the plugin function to it and then call the variable through that.
dunno why.
not all things tho, this is my first time having to deal with wx on a larger scale.
it's starting to make a little sense now
***
thanks again
K
i have one glitch i am working on but it's almost complete
full multi level with backing up in the menu structure.
i added scrolling to the menu in case there are to many items on the screen, auto senses the screen size but i also have a parameter to override that in case you want to have less items display on the screen.
you can change the color of the text, selected text, background, selected background, border
you can set the width of the border, the transparency of the background and the text, as well as the font
i have added a nice little remote that is not locked to always on top for controlling the menu or testing.
if you have a menu displayed and a different one is called and not in the existing structure (example: you call another menu from an action. say something that contains variable data) it stores the other menu and when you back up it will reload the previous system.
*************
i have one glitch i am working on and if Pako can shed some light on it, it's got me stumped
i love the way the menu looks and runs, but i had to add the ability to scroll to it, and no matter what i did it would come out messed up if i did that or i would have a scroll control on the side.
so i decided to do it a different way since the displayed screen gets iterated through i just had to make like a moving segment out of all of the available data.
problem is when the data all fits inside the screen properly there is no need to make that moving block and that works fine, but what happens is when it makes the moving block the menu shows with the background but no text, until i move the menu then it appears i have been changing things about hoping for a solution, but it keeps doing the same thing
i know there is a way to create the frame so it will scroll without a slide bar and not using ctypes and the win32 for the transparency, but if i use the set transparency it works if i key a solid number into the call but if i use a variable it tells me about using bytes and i have yet to find a successful means of creating a byte list for the thing.
***********
*********Edit
Never Mind, I got it running, wx really likes to have every variable passed to it, it doesn't like to much if you just pass the plugin function to it and then call the variable through that.
dunno why.
not all things tho, this is my first time having to deal with wx on a larger scale.
it's starting to make a little sense now
***
thanks again
K
Re: OSDMenu Plugin
Thanks for the reply in my last post on the OSM thread.
I installed this plugin to test it out, but was getting an error trying to activate it.
Do you just copy over the OSDMenu folder into EG's plugin folder and execute the Build Menu action to build a menu?
I installed this plugin to test it out, but was getting an error trying to activate it.
Code: Select all
On Screen Menu: Build Menu
Error in Action: "On Screen Menu: Build Menu"
Traceback (most recent call last) (0.5.0-rc4):
File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionBase.py", line 116, in CallWrapper
return self(*args)
TypeError: __call__() takes exactly 2 arguments (1 given)- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: OSDMenu Plugin
Ok this plugin works in a very odd manner. Yes you simply unzip the attached zip file into %programdata%/EventGhost/plugins folder.
The build menu action can only be created from a Python script. This is how it works.
so this is how you have to make the python script look.
How the levels work is you have to put 'LVL' where the event would be. And where the payload would go you enter the index number of the menu you want to load.
So a list is exactly that think of a grocery list. The first item on the list is numbered 0 the first item is the only menu loaded when you open it.
So what you have is a list of menus. And each menu it's self is a list of the items you want to display. If you want to add a SubMenu then you need to create a new list of menu items and tell the program where that new menu is. That is the number you put in to the payload field.
There could be some typos in that example. I keyed it up from my phone.
The build menu action can only be created from a Python script. This is how it works.
so this is how you have to make the python script look.
Code: Select all
MY_MENU = [
#menu 0 this is the base menu.
[
["Menu Item 1", "Some.Event.1", "Payload"],
["Menu Item 2", "Some.Event.2", "Payload"],
#creating a sub menu. That menu location is 1
["Submenu 1", 'LVL', 1],
["Menu Item 3", "Some.Event.3", "Payload"],
["Menu Item 4", "Some.Event.4", "Payload"],
["Menu Item 5", "Some.Event.5", "Payload"],
],
# menu 1
[
["SubMenu 1 Item 1", "Some.Event.6", "Payload"],
["SubMenu 1 Item 2", "Some.Event.7", "Payload"],
["SubMenu 1 Item 3", "Some.Event.8", "Payload"],
["SubMenu 1 Item 4", "Some.Event.9", "Payload"],
["Submenu 2", 'LVL', 2],
["SubMenu 1 Item 5", "Some.Event.10", "Payload"]
],
# menu 2
[
["SubMenu 2 Item 1", "Some.Event.11", "Payload"],
["SubMenu 2 Item 2", "Some.Event.12", "Payload"]
]
]
eg.plugins.OSDMenu.BuildMenu(MY_MENU)
So a list is exactly that think of a grocery list. The first item on the list is numbered 0 the first item is the only menu loaded when you open it.
So what you have is a list of menus. And each menu it's self is a list of the items you want to display. If you want to add a SubMenu then you need to create a new list of menu items and tell the program where that new menu is. That is the number you put in to the payload field.
There could be some typos in that example. I keyed it up from my phone.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: OSDMenu Plugin
If you leave the plugin at it's defaults. You might like the defaulted values. But it will also show you what it can look like. And from there do some tweaking
