It is currently October 22nd, 2021, 9:09 am

Custom [Strike]Skin[\Strike] Context Menu

Tips and Tricks from the Rainmeter Community
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by Yincognito »

death.crafter wrote: July 22nd, 2021, 8:09 pm Actually you are setting the Y of ContextOption7Background so you can't use [ContextOption7Background:Y]. For that purpose I made a First item for every child container.

[ContextOption7First:Y] would do the trick if you want to get the height.

But I am not feeling like working on this now. So I will try the above way tomorrow and let you know.
Yeah, it's actually [FirstItem7:Y] and not [ContextOption7First:Y]. Anyway, the problem remains: if using a hardcoded value before the ? almost everything, bar the taller submenu before being hovered on, works. As soon as I try to use the same difference before the ? as after the : stuff breaks...

Code: Select all

                local containerX = '(#MouseX# < #SCREENAREAWIDTH#-(#ContextWidth#+#SubContextWidth#+#SubContextBoxXOffset#) ? (#ContextWidth#+#SubContextBoxXOffset#) : 0)'
                local containerY = '((#MouseY#<(#SCREENAREAHEIGHT#-(384)))?([ContextOption'..i..':Y]):([ContextOption'..i..':Y]-([ContextOption'..i..'Last:Y]-[FirstItem'..i..':Y])))'
Replace 384 with, say half of your screen height, test it above your screen height and below it, and the Y will work. The height of the submenu will be higher, but only until you mouse over over all its items, mouse leave the submenu and spawn it again (it's only then when stuff will completely work).

If using ([ContextOption'..i..'Last:Y]-[FirstItem'..i..':Y]) instead of that 384 or whetever hardcoded value, things will stop working as expected.

I think I'll make a break too from this one. Will wait for you to check it out when you're in the mood for it - I'm not in a hurry, by the way. Till then, will try doing some other stuff I postponed, LOL.
User avatar
Jax
Posts: 37
Joined: June 7th, 2021, 11:46 am

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by Jax »

There's one slight issue where the content menu wouldn't be positioned correctly at bottom right edges of your screen, it would be put at the same location for any position on the screen. By testing it with the standard ctx menu you can see that if it touches the bottom edge of your screen it would be moved upwards and have your cursor touching the bottom edge of the ctx instead of the top edge. You can actually simply recreate this by:

Code: Select all

if MouseY + CtxH > ScreenH then CtxY = MouseY - CtxY
of course this isn't the actual code, just showing how it can be done.
Deviantart page // My site // Please make a proper settings menu for your skins
User avatar
death.crafter
Posts: 1058
Joined: April 24th, 2021, 8:13 pm

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by death.crafter »

Jax wrote: August 9th, 2021, 2:57 am There's one slight issue where the content menu wouldn't be positioned correctly at bottom right edges of your screen, it would be put at the same location for any position on the screen. By testing it with the standard ctx menu you can see that if it touches the bottom edge of your screen it would be moved upwards and have your cursor touching the bottom edge of the ctx instead of the top edge. You can actually simply recreate this by:

Code: Select all

if MouseY + CtxH > ScreenH then CtxY = MouseY - CtxY
of course this isn't the actual code, just showing how it can be done.
Nope. If you keep KeepOnScreen=1 then the main body will stay in place, but the submenus won't. I can't figure out how to do that. I have the formula and all, but when applied in real time it just doesn't work.

I will figure it out later when I've got more leisure time.
from the Realm of Death
My Current Desktop
User avatar
death.crafter
Posts: 1058
Joined: April 24th, 2021, 8:13 pm

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by death.crafter »

Yay!

Now it stays inside WORKAREA and you can have cool icons too.

Also it's more dynamic than ever.

Now vibe with Chika-san!
ChikaDanceVibeGIF.gif
You do not have the required permissions to view the files attached to this post.
from the Realm of Death
My Current Desktop
User avatar
Yincognito
Rainmeter Sage
Posts: 4070
Joined: February 27th, 2015, 2:38 pm
Location: Terra Yincognita

Re: Custom Skin Context Menu

Post by Yincognito »

Yabadabadoo! 8-)
User avatar
SilverAzide
Rainmeter Sage
Posts: 1616
Joined: March 23rd, 2015, 5:26 pm

Re: Custom Skin Context Menu

Post by SilverAzide »

death.crafter wrote: August 9th, 2021, 10:12 pm Yay!

Now it stays inside WORKAREA and you can have cool icons too.

Also it's more dynamic than ever.
Man, if only I had a clock that was both annoying AND creepy... Great job! ;-)
Gadgets Wiki GitHub More Gadgets...
User avatar
Jax
Posts: 37
Joined: June 7th, 2021, 11:46 am

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by Jax »

Nice work on v2! Thanks for your hard work :D

Here's a few issues I've encountered... (click to view gif)

1. The position issue: ctx menu won't flip when clipping w/ lower border, but rather stay on screen
2021-08-10 12-48-09.gif
2. The leave issue: sub menu won't disappear when mouse is off the mother option
2021-08-10 12-48-28 (2).gif
By the way, is animation on the to-do list? :)
You do not have the required permissions to view the files attached to this post.
Deviantart page // My site // Please make a proper settings menu for your skins
User avatar
death.crafter
Posts: 1058
Joined: April 24th, 2021, 8:13 pm

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by death.crafter »

Jax wrote: August 10th, 2021, 4:52 am Nice work on v2! Thanks for your hard work :D

Here's a few issues I've encountered... (click to view gif)

1. The position issue: ctx menu won't flip when clipping w/ lower border, but rather stay on screen
2021-08-10 12-48-09.gif

2. The leave issue: sub menu won't disappear when mouse is off the mother option
2021-08-10 12-48-28 (2).gif

By the way, is animation on the to-do list? :)
1. I can't do that. It will just make the formulas used more complex. I am happy as long as it stays inside the workarea lol. That alone gave me hell. I am not saying it's hard, just that I don't want to make it more complex as it is.

2. That's something cannot be done. If you leave the meter to use the submenu... poof. But it goes poof when you leave the submenu. And I don't want to show it on mouse over since I can't dismiss on mouse over. Also staying inside the workarea comes with a cost. :(

Nope, animation is not, but you can incorporate it if you want to. In the lua look for lines with: ContextOption'..i..'Background and do what you want to do there. P.S. the height of submenus are stored as SubcontextNHeight variable. You can use that for limits.

Also there are a lot of things I need to refine.
from the Realm of Death
My Current Desktop
User avatar
death.crafter
Posts: 1058
Joined: April 24th, 2021, 8:13 pm

Re: Custom Skin Context Menu

Post by death.crafter »

SilverAzide wrote: August 10th, 2021, 3:03 am Man, if only I had a clock that was both annoying AND creepy... Great job! ;-)
Lol

Thanks for the compliment :P
from the Realm of Death
My Current Desktop
User avatar
Jax
Posts: 37
Joined: June 7th, 2021, 11:46 am

Re: Custom [Strike]Skin[\Strike] Context Menu

Post by Jax »

death.crafter wrote: August 10th, 2021, 5:25 am 1. I can't do that. It will just make the formulas used more complex. I am happy as long as it stays inside the workarea lol. That alone gave me hell. I am not saying it's hard, just that I don't want to make it more complex as it is.

2. That's something cannot be done. If you leave the meter to use the submenu... poof. But it goes poof when you leave the submenu. And I don't want to show it on mouse over since I can't dismiss on mouse over. Also staying inside the workarea comes with a cost. :(

Nope, animation is not, but you can incorporate it if you want to. In the lua look for lines with: ContextOption'..i..'Background and do what you want to do there. P.S. the height of submenus are stored as SubcontextNHeight variable. You can use that for limits.

Also there are a lot of things I need to refine.
I see... don't worry about them, those are just minor issues. :bow:
Deviantart page // My site // Please make a proper settings menu for your skins