Then we are using one of the variables we defined in the section at the beginning. So instead of a "pointer", we get a circle being filled as the value changes. This option tells the Roundline that instead of a single line, we want the meter to "fill" from the position defined as 0% to the current value represented by the measure. So in effect, a 5 pixel line at the outside edge. The result of these two options is a line that starts 15 pixels from the center, and extends to the full 20 pixels defined as the length from the center to the edge. Remember that our meter is 40 pixels wide in total, but only 20 pixels wide from the center to the outside edge. This sets the overall length of the line to 20 pixels. This tells the Roundline that we want the line to start 15 pixels from the center of the meter. There are few options we have used to control this. We don't want a "pointer" in this case, but want to draw and fill a circle. Roundline - The line optionsīy default, the Roundline meter will draw a single line from the center of the meter to the outside edge, pointing to the position represented by the value of the measure. Note that we are using the Rad(x) function to make it easier to convert degrees (which are easy to picture in our heads) into radians (which are mathematically useful, but stupidly complicated). We want the entire circle to fill when the value of the measure is 100%. Next, we are setting the RotationAngle option to 360° degrees in radians, which tells the Roundline that the distance to travel around the circle from the starting point defined in StartAngle will be the full circle (a circle has 360 degrees). That will move the starting point around clockwise to the "top" of the meter, which is what we want. So beginning with StartAngle, we are telling the Roundline that the starting point of the meter is a distance of 270° degrees in radians from the 0° position of directly right. I highly recommend taking a minute and reading through the explanation at Radians Guide. Radians are defined with 0° pointing to the right. This is important! Do not picture a compass in your head, which has 0° (North) pointing "up". Radians are a unit of measure used to define degrees of distance around a circle, starting with 0°, which is the point directly to the right of the center of the circle. The angles in a Roundline meter are defined in Radians. As you can see, we have set the value of StartAngle to StartAngle=(Rad(270)), and the value of RotationAngle to RotationAngle=(Rad(360)). This is done with the RotationAngle option. We also need to tell the Roundline how much of the circle to use as 100% (the distance to travel when the value is 100%). We need to tell the Roundline where the line should point when the value is 0% (the starting point). We first needed to define two options to control how the meter works. Keep in mind that this defines a circle that has a total width of 40 pixels, and a width from the center to the edge as 20 pixels. In this case, we have defined the size of the meter (and thus the circle) as 40x40 pixels. What the Roundline meter does is draw a line that rotates around the center of a circle defined by the W and H options of the meter. From the Manage dialog, find the System.ini entry in the list and click on the Load button on the upper right. So let's load our new skin and take a look at where we stand. Remember that if you define SolidColor on an image meter with no MeasureName option, it simply draws a square or rectangle based on the W and H (width and height) options. The meter will then use the value we defined as AlmostBlack=40,40,40,255 in the section earlier. Note that we have used the variable #AlmostBlack# in the SolidColor option for this meter. Let's go ahead and add that now, so we can demonstrate the first use of one of those variables we created above. In earlier tutorials, we waited until the end and put a solid background on the skin using an Image meter. In order to change the value in all places it is used, you only need to change it one time in the section of the skin. Variables are used to create a value, which can be used repeatedly in the skin by enclosing the variable name in # (example: #VarName#). The next thing we are going to do is define some variables for the skin. Building the System skinįirst, as we did in our earlier tutorial, let's add the section to control the Update speed of the skin. You only see one hard drive in that image? We will get to that. We are going to monitor the CPU with a Line meter, and display some information about the space on your hard drives. Then we are going to create some circular meters showing the usage with Roundline meters. What we are going to do is measure the percent usage of the CPU, and the space on a couple of hard drives.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |