RelPos (X & Y) measures additional width and height and distribute it to our rectangles. With these codes, ALL rectangles gets more width and height if you resize the window to a wider or higher size. $puts(RelPos_Y,$div($sub(%_height%,500),2)) *RelPos stands for relative positionĭelete codes in step 4 and replace it with these: Let's create 2 variables to measure the additional width and height of your window size, then divided them by two : The idea of this tutorial is that, when you drag the window wider and/or higher, you can distribute the additional width and height to your elements (at least 2 elements and e.g. With these codes, the green and grey rectangles gets wider if you widening the window, also the blue and grey rectangles gets more height if you drag the window higher,īut the red rectangle size remains the same.ĥ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |