Hello I want to make a skin with dropdown menus. I have the dropdown menus down but I would like for it to like slide down or across from the button that is pressed. I looked up ActionTimer on the Rainmeter Manual but can't seem to get it to work. here's my code without the ActionTimer plugin. I'm new to creating skins in rainmeter so this might be to advanced for me but I would like to try to create this.
ScyllaGames wrote: ↑October 28th, 2018, 11:55 pm
Hello I want to make a skin with dropdown menus. I have the dropdown menus down but I would like for it to like slide down or across from the button that is pressed. I looked up ActionTimer on the Rainmeter Manual but can't seem to get it to work. here's my code without the ActionTimer plugin. I'm new to creating skins in rainmeter so this might be to advanced for me but I would like to try to create this.
I don't have nor SubMenu1.png, nor MainMenuUp.png, both used in your code, however here is a first approach:
I modified your code a bit in the following terms:
I removed (commented out) the Hidden=1 options of the [Dropdown1] and [Dropdown2] meters. These options are not needed, because I hidden the meters not setting them to hidden, but setting their height to 0 (see the H option of both).
I introduced a H variable, which is the height of the [Dropdown1] and [Dropdown2] meters. This variable will be set dynamically by the newly added [MeasureSlide] ActionTimer plugin measure.
Because of the dynamically set H variable, I had to add a DynamicVariables=1 option to the [Dropdown1] and [Dropdown2] meters.
I added another few new variables: Open, which is 0 when the menu isn't open, respectively 1 when it's open; U is used by the ActionTimer plugin, stablishing which sections are updated when the plugin runs.
Based on the value of Open variable, the [MeasureOpen] measure starts / stops running the ActionTimer plugin measure, whenever the value of this variable changes.
I removed the LeftMouseDownAction and RightMouseDownAction options of [Rainmeter] section, adding one single LeftMouseUpAction option to [GameBackground]. This LeftMouseUpAction option does both, opens and closes the menu, setting the value of the Open variable. This was needed because the [Rainmeter] section doesn't support dynamic variables, but the section used to open / close the menu should have to. Because of this, beside adding the LeftMouseUpAction, I also added a DyanmicVariables=1 option to [GameBackground] (note here that LeftMouseUpAction is always preferred in front of LeftMouseDownAction, here can you find out why).
I replaced the Update=1500 option of [Rainmeter] section, with the default Update=1000.
I modified the BackgroundMode=1 option of [Rainmeter] section to BackgroundMode=2. BackgroundMode=1 option means transparent background and if you set this, the SolidColor isn't needed.
Please test the above code (which can be improved, being just a first quickly written code) and let me know how does it work.
balala wrote: ↑October 29th, 2018, 5:14 pm
I don't have nor SubMenu1.png, nor MainMenuUp.png, both used in your code, however here is a first approach:
I modified your code a bit in the following terms:
I removed (commented out) the Hidden=1 options of the [Dropdown1] and [Dropdown2] meters. These options are not needed, because I hidden the meters not setting them to hidden, but setting their height to 0 (see the H option of both).
I introduced a H variable, which is the height of the [Dropdown1] and [Dropdown2] meters. This variable will be set dynamically by the newly added [MeasureSlide] ActionTimer plugin measure.
Because of the dynamically set H variable, I had to add a DynamicVariables=1 option to the [Dropdown1] and [Dropdown2] meters.
I added another few new variables: Open, which is 0 when the menu isn't open, respectively 1 when it's open; U is used by the ActionTimer plugin, stablishing which sections are updated when the plugin runs.
Based on the value of Open variable, the [MeasureOpen] measure starts / stops running the ActionTimer plugin measure, whenever the value of this variable changes.
I removed the LeftMouseDownAction and RightMouseDownAction options of [Rainmeter] section, adding one single LeftMouseUpAction option to [GameBackground]. This LeftMouseUpAction option does both, opens and closes the menu, setting the value of the Open variable. This was needed because the [Rainmeter] section doesn't support dynamic variables, but the section used to open / close the menu should have to. Because of this, beside adding the LeftMouseUpAction, I also added a DyanmicVariables=1 option to [GameBackground] (note here that LeftMouseUpAction is always preferred in front of LeftMouseDownAction, here can you find out why).
I replaced the Update=1500 option of [Rainmeter] section, with the default Update=1000.
I modified the BackgroundMode=1 option of [Rainmeter] section to BackgroundMode=2. BackgroundMode=1 option means transparent background and if you set this, the SolidColor isn't needed.
Please test the above code (which can be improved, being just a first quickly written code) and let me know how does it work.
Yep, you're perfectly right. I'm sorry, I put at the end of the code a [Uptime] String meter, for seeing the variables. Before I posted the code, I should had to remove this meter, but forgot it. My bad! So, please remove it.
If it doesn't work properly, please pack the whole config you have and upload it. I'd need the resource files (images), to can properly check what's going on.
balala wrote: ↑October 29th, 2018, 9:11 pm
Yep, you're perfectly right. I'm sorry, I put at the end of the code a [Uptime] String meter, for seeing the variables. Before I posted the code, I should had to remove this meter, but forgot it. My bad! So, please remove it.
If it doesn't work properly, please pack the whole config you have and upload it. I'd need the resource files (images), to can properly check what's going on.
Oh no I completely understand why you put that variable in a string. I do a little programming myself(visual basic currently learning JS) so it's understandable. I'll make a link with the whole folder including the resources. If it wasn't that obvious by the [GameText] meter I made a .inc file for variables but have yet to create one for Colors.inc(for modifying all the colors in the skin such as the text and possibly the shape if I change to use the rainmeter shapes instead of an image). thanks again for the fast reply as well! I'll PM you the download.
balala wrote: ↑October 29th, 2018, 9:24 pm
Don't PM. Post it publicly. Maybe someone will have a better idea or solution then me.
Alright. Link to File: Removed Link...
Last edited by eclectic-tech on October 30th, 2018, 12:15 am, edited 1 time in total.
Reason:Removed link. Reason: Link initiates an attack by malware!