It is currently May 5th, 2024, 12:18 am

Gameveiw 2

Get help with creating, editing & fixing problems with skins
Alucardisking
Posts: 11
Joined: January 15th, 2013, 1:59 am

Gameveiw 2

Post by Alucardisking »

hi im using gameveiw 2 and i want it to align to the right side but cant seem to figure it out i have tried to get ahold of the author but no word as of yet. http://www.deviantart.com/art/Gameview-2-432776682 is where i got it and others want to know to if you could take a look at it it would help alot thank you.
User avatar
Krainz
Posts: 186
Joined: May 27th, 2012, 5:16 am

Re: Gameveiw 2

Post by Krainz »

Set the text to be aligned to the right and then reposition the skin
Alucardisking
Posts: 11
Joined: January 15th, 2013, 1:59 am

Re: Gameveiw 2

Post by Alucardisking »

If you download the rainmeter skin and look there is no option to set it to the right side and the author is unsure of how to do it either
User avatar
Krainz
Posts: 186
Joined: May 27th, 2012, 5:16 am

Re: Gameveiw 2

Post by Krainz »

Is it a String meter?

Try putting a stringalign=right on every string meter you find on the skin

From http://docs.rainmeter.net/manual/meters/string
User avatar
VasTex
Posts: 407
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: Gameveiw 2

Post by VasTex »

After downloading the skin and taking a look at the code it should be relatively simple, although somewhat time consuming, to change the alignment so that everything sits (and fits) on the right side of the screen. Normally I would just rewrite the code from scratch as there are simple, more condensed ways of doing this with better results, but I don't have time to rework everything so I'll just tell you how to solve the issue with the current code.

The parameter in Rainmeter that controls String (Text) Alignment is StringAlign=HorizontalAlignmentVerticalAlignment where HorizontalAlignment can be equal to Left, Center or Right and VerticalAlignment can be equal to Top, Center or Bottom. This allows for several combinations of alignments with the default alignment (The current alignment of GameView) being set to Left or LeftCenter (They're both equal).

So, to get the reverse of the default, LeftCenter, you simply need to swap the HorizontalAlignment from Left to Right. However, the meters controlling the text in this skin have no StringAlign Parameter so you'll need to create on for every single meter that displays a name.

For this first step locate the meters called [Link1] all the way through [Link56]. Inside of each of those meters you'll need to add the line StringAlign=RightCenter. For Example, let's take a look at the original [Link1] meter:
[Link1]
Meter=String
Group=GameGroup
X=#LeftMargin#
Y=#TopMargin#
Text=#App1Text#
StringStyle=#TextStyle#
FontColor=#TextColour#
FontSize=#TextSize#
FontFace=#Font#
AntiAlias=1
Hidden=1
LeftMouseUpAction=!Execute ["#App1Path#"][!HideMeterGroup GameGroup][!Update]
MouseOverAction=[!SetOption Link1 FontColor #MouseOverColour#][!SetOption View ImageName #*App1Image*#][!Update]
MouseLeaveAction=[!SetOption Link1 FontColor #TextColour#][!SetOption View ImageName ""][!Update]
In order to align this meter (the words) to the right hand side of our screen we'll need to add the line StringAlign=RightCenter like so (*Notice the changes marked in blue):
[Link1]
Meter=String
Group=GameGroup
X=#LeftMargin#
Y=#TopMargin#
Text=#App1Text#
StringStyle=#TextStyle#
StringAlign=RightCenter
FontColor=#TextColour#
FontSize=#TextSize#
FontFace=#Font#
AntiAlias=1
Hidden=1
LeftMouseUpAction=!Execute ["#App1Path#"][!HideMeterGroup GameGroup][!Update]
MouseOverAction=[!SetOption Link1 FontColor #MouseOverColour#][!SetOption View ImageName #*App1Image*#][!Update]
MouseLeaveAction=[!SetOption Link1 FontColor #TextColour#][!SetOption View ImageName ""][!Update]
Alright, so all we've done so far is told the text to anchor itself on its right side, but we haven't re-positioned the text to actually be on the right side yet. So for this we need to edit the X variable for each of the 56 link meters. Luckily, the author has set the X value of the links to be equal to the value of the variable LeftMargin so all we need to do is change the one single value for this variable and it will re-position the text for us.

So, under the [Variables] section you'll find the variable LeftMargin set equal to 15. This means that all of the text on our screen is 15 pixels from the Left so when we move it over we will need to make sure that our text is also 15 pixels from the Right. 15 pixels from the right of our screen is equal to the (Width of our Screen - 15). So we can use one of Rainmeters built in variables for this which will automatically grab the width of our screen even if it changes. That variable is #ScreenAreaWidth# and to set our text to be 15 pixels from the Right of our screen w'll need to subtract 15 from that.

To be blunt, under the [Variables] section you'll need to locate and change LeftMargin=15 to LeftMargin=(#ScreenAreaWidth# - 15). We're almost done now, but we need to fix the positioning of a few more things to make this fully functional. What we have left to move is the background that sits behind the text and the bar used to bring up the text in the first place.

To do this you'll need to locate the meters [MouseOverBar] and [Background]. We need to move both of these to right side of the screen much like we did with the text. The only difference now is that we don't need to worry about alignment because these are images, not text. What you'll notice is that both of these meters lack an X variable because the default value of X is 0 which is exactly what you want if you're lining it up with the left side of your screen, but we're working with the right so we'll need an X value greater than 0. So, find both of those meters and add the line X= to both of them right above their Width (W=) parameters. When you're done the two meters should look like this (*Notice the changes made in blue):
[MouseOverBar]
Meter=Image
MeasureName=MeasureScroll
X=
W=1
H=#ScreenHeight#
SolidColor=0,0,0,1
MouseOverAction=[!ShowMeterGroup GameGroup][!Update]
MouseScrollDownAction=[!SetOption Link1 Y ([Link1:Y]-#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
MouseScrollUpAction=[!SetOption Link1 Y ([Link1:Y]+#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
[Background]
Meter=Image
MeasureName=MeasureScroll
Group=GameGroup
SolidColor=22,22,29
SolidColor2=22,22,29,0
X=
W=#BarWidth#
H=#ScreenHeight#
AntiAlias=1
Hidden=1
MouseLeaveAction=[!HideMeterGroup GameGroup][!Update]
MouseScrollDownAction=[!SetOption Link1 Y ([Link1:Y]-#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
MouseScrollUpAction=[!SetOption Link1 Y ([Link1:Y]+#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
Now all that's left to do is to add value to those empty X parameters. All we need to do is change their X values the same way we did with the text. We'll need to take the width of our screen (#ScreenAreaWidth#) and we'll need to subtract the width of both of these meters respectively. For the meter [MouseOverBar] we have a width of 1 pixel. so we'll need to subtract that from our right sided X position. What we end up with is the new value for X which is X=(#ScreenAreaWidth# - 1). Once that's positioned we can move on to the last meter [Background] which will need just a few additional tweaks to make it look right.

To start with, we'll need to change it's X position as well, but if you'll notice it's width is set to a variable value of #BarWidth# which is fine since we can still use the same method of (ScreenWidth - MeterWidth). So, in the [Background] meter find the line we created earlier for our X value and change it to X=(#ScreenAreaWidth# - #BarWidth#). Now everything should be positioned to work properly on the right side, but we're not quite done yet.

We need to change one more thing in the [Background] meter. It uses two SolidColors to create a gradient which is dark on the left and transparent on the right which looks nice on the left side, but we need it to be reversed for the right side now. The easiest way to do this is to simply swap the values of SolidColor with SolidColor2 and vice versa.

So we need to take these values:
SolidColor=22,22,29
SolidColor2=22,22,29,0


And swap them around to look like these values:
SolidColor=22,22,29,0
SolidColor2=22,22,29


Now we're done except for one more small adjustment and only because I noticed that, while testing, this skin throws out an error nearly every second due to a poorly placed mouse action. You don't need to follow this next step if you don't want to because with the changes we made above everything should be aligned to the right now if you did it all exactly as I said. You'll only need to save the changes we made and right click on the skin and choose 'Refresh' and you're changes will be applied. However, if you want to get rid of the error, and I suggest you do, you'll need to follow a few more steps below:

Locate the meter [MouseOverBar] and find the two lines called MouseScrollDownAction and MouseScrollUpAction. Highlight both of those lines, copy them and paste them under the [Rainmeter] section at the top of the skin. When you've moved them to the top of your skin the code should look like this (*Notice the added lines in blue):
[Rainmeter]
Update=1000
SolidColor=0,0,0,1
DynamicWindowSize=1
MouseScrollDownAction=[!SetOption Link1 Y ([Link1:Y]-#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
MouseScrollUpAction=[!SetOption Link1 Y ([Link1:Y]+#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
Once you've added those lines to the [Rainmeter] section you'll need to remove them completely from the [MouseOverBar] and [Background] meters as well as the line MeasureName=MeasureScroll. Once you've removed those lines the two meters should look like this (*Notice the REMOVED lines have been colored red and crossed out):
[MouseOverBar]
Meter=Image
MeasureName=MeasureScroll
X=(#SCREENAREAWIDTH# - 1)
W=1
H=#ScreenHeight#
SolidColor=0,0,0,1
MouseOverAction=[!ShowMeterGroup GameGroup][!Update]
MouseScrollDownAction=[!SetOption Link1 Y ([Link1:Y]-#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
MouseScrollUpAction=[!SetOption Link1 Y ([Link1:Y]+#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
[Background]
Meter=Image
MeasureName=MeasureScroll
Group=GameGroup
SolidColor=22,22,29,0
SolidColor2=22,22,29
X=(#SCREENAREAWIDTH# - #BarWidth#)
W=#BarWidth#
H=#ScreenHeight#
AntiAlias=1
Hidden=1
MouseLeaveAction=[!HideMeterGroup GameGroup][!Update]
MouseScrollDownAction=[!SetOption Link1 Y ([Link1:Y]-#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
MouseScrollUpAction=[!SetOption Link1 Y ([Link1:Y]+#ScrollSpeed#)][!Update][!SetOption Link1 Y [*MeasureScroll*]][!Update]
Once you've done that you should now, genuinely, be good to go. You're skin should now be properly aligned to the right of you screen, the visual appearance of the meters should reflect that as well and the code should have 1 less bug in it. I followed my own instructions above as I edited the skin and it worked perfectly for me so if it doesn't end up working for you please double check your code and your changes along with my directions carefully before telling me that it still doesn't work. If you have done that and it is still broken then I'll do my best to help out, but I am not the author of this skin and the code being used could use a lot of clean up and it's messy. Like I said there are much better ways of making a skin like this, but I don't feel like making one right now (I may do so later to prove a point), but for now you'll have to deal with the edits I've suggested. For now, don't expect much more help from me for several hours. It's nearly 4:00am here and like usual I should be sleeping.

Good luck! :thumbup:
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011
Alucardisking
Posts: 11
Joined: January 15th, 2013, 1:59 am

Re: Gameveiw 2

Post by Alucardisking »

Wonderful thank you very much this is amazing it looks exactly like a mirrored copy thank you so much. if you do a make a version of this yourself i would love to see it and try it out
:D
User avatar
VasTex
Posts: 407
Joined: September 20th, 2012, 3:17 pm
Location: USA - Montana

Re: Gameveiw 2

Post by VasTex »

Glad I could help.

I'm fairly busy playing around with skins of my own, but if I do ever get around to fine-tuning something like this I'll post it here and you can have a look at it.
01010100 01100101 01100011 01101000 01101110 01101111 01101100 01101111 01100111 01101001
01100011 01100001 01101100 00100000 01000010 01100001 01100100 01100001 01110011 01110011
Alucardisking
Posts: 11
Joined: January 15th, 2013, 1:59 am

Re: Gameveiw 2

Post by Alucardisking »

thank you :welcome: have a wonderful day