1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- class iPVector {
- int x, y, z;
- iPVector(int getx, int gety) {
- x = getx;
- y = gety;
- }
- iPVector(int getx, int gety, int getz) {
- x = getx;
- y = gety;
- z = getz;
- }
- }
-
- void pre() {
- //window resize event
- if (i_windowW != width || i_windowH != height) {
- i_windowW = width;
- i_windowH = height;
- i_uiY = i_windowH - i_uiH;
- i_uiW = i_windowW;
- i_uiH = i_windowH - i_uiY;
-
- buttons[0].i_x = i_windowW/2-buttons[0].i_w/2;
- buttons[0].setLabel(buttons[0].s_label);
-
- f_timeBoxCenterX = i_windowW/2;
- f_timeBoxCenterX = i_windowW/2;
- f_timeBoxX = f_timeBoxCenterX-f_timeBoxW / 2;
-
- i_iconX = int(1.2*i_windowW/20);
- i_iconY = 10+i_windowW/40;
- i_iconW = i_windowW/20;
- i_iconH = i_windowW/20;
- i_iconCorner = i_windowW/40;
- for (int i = 1; i < 6; i++) {
- buttons[i].i_y = i_iconY-i_iconH/2;
- buttons[i].i_w = i_iconW;
- buttons[i].i_h = i_iconH;
- buttons[i].i_corner = i_iconCorner;
- }
- buttons[1].i_x = i_iconX-i_iconW/2;
- buttons[2].i_x = 2*i_iconX-i_iconW/2;
- buttons[3].i_x = 2*i_iconX-i_iconW/2;
- buttons[4].i_x = 3*i_iconX-i_iconW/2;
- buttons[5].i_x = 3*i_iconX-i_iconW/2;
- }
- }
|