HP Prime для всех

English  Русский 
Фоны graphics-app screenshot}}
Название Фоны
Описание View high resolution background images, scrolling through the image with the touchscreen or the cursor keys.
Автор Unknown

Исходный код (скачать):

Исходный код отформатирован программными средствами сайта

Строки с ICON ресурсами были обрезаны.

// +---------------------------------+ // | Generated by mViewer GX Creator | // | http://tiplanet.org/gxprime | // +---------------------------------+ ICON AA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON BA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON CA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON DA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON EA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON FA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON GA 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON AB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON BB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON CB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON DB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON EB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON FB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON GB 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON AC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON BC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON CC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON DC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON EC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON FC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON GC 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON AD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON BD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON CD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON DD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON ED 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON FD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON GD 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON AE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON BE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON CE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON DE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON EE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON FE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON GE 89504e470d0a1a0a0000000d4948445200000080000000800803000000f4e091f90000000467414d410000b18f0bfc610500000001735247… ICON AF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON BF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON CF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON DF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON EF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON FF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… ICON GF 89504e470d0a1a0a0000000d4948445200000080000000200803000000edfc80170000000467414d410000b18f0bfc610500000001735247… EXPORT BackPrime6_6() BEGIN LOCAL tw = 7; LOCAL th = 6; // +---------------------------------+ // | powered by mViewer GX Prime 1.4 | // | by Xavier (Critor) Andreani | // | licence: GPLv2 | // +---------------------------------+ LOCAL tw1 = GROBW_P("AA"), tw2 = GROBW_P(char(65+tw-1) + "A"); LOCAL th1 = GROBH_P("AA"), th2 = GROBH_P("A"+char(65+th-1)); LOCAL w = (tw-1) * tw1+tw2, h = (th-1) * th1+th2; // image LOCAL mx0 = 0, my0 = 0, is = 0, ig = 0, mx = 0, my = 0, ms = 0; // mouse LOCAL sw := 320, sh := 240; // screen LOCAL x := 0, y := 0, d := 0, ld := 0; LOCAL ss := 1, sf := 0, spu := 1.01, spd := 1.1; LOCAL ssu := 1, ssd := 1, ssl := 1, ssr := 1; LOCAL z := 1, zp := 1.01, zmin = MIN(MIN(sw/w, sh/h), 1), zmax = 4, zold = 1, zw = w, zh = h; // zoom LOCAL tk := {7, 2, 8, 12}; LOCAL td := {0, 0, 0, 0}; LOCAL ts := {1, 1, 1, 1}; LOCAL tt := {0, 0, 0, 0}; LOCAL i, dsh := 0, dsv := 0, dh := 0, wh = 1; // help grob coordinates LOCAL strh3 = 16, strh2 = 14, strh1 = 12, yt = 1; LOCAL x0 = 100, x1 = 0; LOCAL x5 = sw-5-x0-1; LOCAL x2 = x1 + (x5-x1) * 5/9; LOCAL x3 = x1 + (x2-x1) / 4, x4 = x2 + (x5-x2) / 3; DIMGROB_P(G1, sw, sh); // offscreen grob DIMGROB_P(G2, w, h); // image grob DIMGROB_P(G3, x5, 3+strh3+strh2+3*strh1); // help grob // render help grob RECT_P(G3, x1, 0, x5-1, strh3+strh2+3*strh1+2, 0, #FFFFFFh); RECT_P(G3, x1+1, 0, x5-2, strh3+strh2, 0, #FFFFFFh); TEXTOUT_P("mViewer GX 1.3", G3, x1+3, 0, 3); yt := strh3-strh2; TEXTOUT_P("(TI-Planet.org)", G3, x2, yt, 2); yt := strh3… TEXTOUT_P("http://tiplanet.org/gxprime", G3, x1+3, yt, 2, #FFh); yt := yt+strh2+2; TEXTOUT_P("+-", G3, x1+2, yt, 1); TEXTOUT_P("zoom in/out", G3, x3, yt, 1); TEXTOUT_P("Home", G3, x2, yt, 1); TEXTOUT_P("… TEXTOUT_P("Help", G3, x1+2, yt, 1); TEXTOUT_P("hide box", G3, x3, yt, 1); TEXTOUT_P("Esc", G3, x2, yt, 1); TEXTOUT_P("qu… TEXTOUT_P(CHAR(8853) + CHAR(8855), G3, x1+2, yt, 1); TEXTOUT_P("progressive scroll", G3, x3, yt, 1); TEXTOUT_P(CHAR(9742// concat image tiles FOR y FROM 0 TO th-1 DO FOR x FROM 0 TO tw-1 DO BLIT_P(G2, x*tw1, y*th1, char(65+x) + char(65+y), 0, 0); END; END; x := 0; y := 0; REPEAT tt := {0, 0, 0, 0}; dsh := 0; dsv := 0; // touch events mx := MOUSE(0); my := MOUSE(1); ms := MOUSE(4); IF ms = 2 THEN // drag IF NOT ig THEN ig := 1; mx0 := MOUSE(2); my0 := MOUSE(3); END; IF mx > mx0 THEN tt(1) := tt(1) + (mx-mx0) / z; ELSE tt(3) := tt(3) + (mx0-mx) / z; END; IF my > my0 THEN tt(2) := tt(2) + (my-my0) / z; ELSE tt(4) := tt(4) + (my0-my) / z; END; mx0 := mx; my0 := my; dsh := 1; dsv := 1; ELSE ig := 0; END; IF ms = 3 THEN // stretch IF is THEN IF (mx > sw/2 and mx > mx0) or (mx < sw/2 and mx < mx0) THEN z := z*zp; END; IF (mx > sw/2 and mx < mx0) or (mx < sw/2 and mx > mx0) THEN z := z/zp; END; ELSE is := 1; mx0 := mx; my0 := my; END; ELSE is := 0; END; // one time key events IF ISKEYDOWN(3) OR ISKEYDOWN(32) OR ISKEYDOWN(37) OR ISKEYDOWN(42) OR ISKEYDOWN(33) OR ISKEYDOWN(43) OR ISKEYDOWN(34) ORIF ISKEYDOWN(3) AND wh THEN dh := NOT dh; END; // help // screen scroll IF ISKEYDOWN(32) OR ISKEYDOWN(37) OR ISKEYDOWN(42) THEN tt(1) := sw/z*wh; dsh := 1; END; IF ISKEYDOWN(34) OR ISKEYDOWN(39) OR ISKEYDOWN(44) THEN tt(3) := sw/z*wh; dsh := 1; END; IF ISKEYDOWN(32) OR ISKEYDOWN(33) OR ISKEYDOWN(34) THEN tt(2) := sh/z*wh; dsv := 1; END; IF ISKEYDOWN(42) OR ISKEYDOWN(43) OR ISKEYDOWN(44) THEN tt(4) := sh/z*wh; dsv := 1; END; IF wh THEN wh := 0; END; ELSE wh := 1; END; // progressive/continuous key events // zoom keys IF ISKEYDOWN(50) or ISKEYDOWN(40) or ISKEYDOWN(38) THEN z := z*zp; END; IF ISKEYDOWN(45) or ISKEYDOWN(35) THEN z := z/zp; END; IF ISKEYDOWN(5) THEN z := 1; END; IF z > zmax THEN z := zmax; END; IF z < zmin THEN z := zmin; END; IF z < 1 and zold > 1 or z > 1 and zold < 1 THEN z := 1; END; IF z < zold or z > zold THEN zw := w*z; zh := h*z; x := x+sw/2/zold-sw/2/z; y := y+sh/2/zold-sh/2/z; zold := z; dsh := 1; dsv := 1; END; // scrolling FOR i FROM 1 TO 4 DO IF ISKEYDOWN(tk(i)) THEN IF i MOD 2 = 1 THEN dsh := 1; ELSE dsv := 1; END; td(i) := 1; ts(i) := MAX(ts(i) * spu, 1); tt(i) := tt(i) + MAX(ts(i) / z, 1); ELSE ts(i) := MAX(ts(i) / spd, 1); IF ts(i) > 1 THEN IF i MOD 2 = 1 THEN dsh := 1; ELSE dsv := 1; END; END; END; END; x := MAX(MIN(x-tt(1) + tt(3), w-sw/z), 0); y := MAX(MIN(y-tt(2) + tt(4), h-sh/z), 0); // repos image correctly BLIT_P(G1, -FP(x) * z, -FP(y) * z, sw + (CEILING(x+sw/z) - (x+sw/z)) * z, sh + (CEILING(y+sh/z) - (y+sh/z)) * z, G2, FLOOR(x), FLOOR(y), CEILING(x+sw/z), CEILING(y+sh/z)); // disp img // clean borders for images smaller than screen IF zw < sw THEN RECT_P(G1, zw+1, 0, sw-1, sh-1, #FFFFFFh, #FFFFFFh); END; IF zw > sw and dsh THEN RECT_P(G1, 0, sh-1, sw-5, sh-5, 0, #FFFFFFh); RECT_P(G1, 2 + (sw-9) * x/w, sh-3, 2 + (sw-9) * x/w + (sw-9) * sw/zw, sh-3, 0, 0); END; IF zh < sh THEN RECT_P(G1, 0, zh+1, sw-1, sh-1, #FFFFFFh, #FFFFFFh); END; IF zh > sh and dsv THEN RECT_P(G1, sw-1, 0, sw-5, sh-5, 0, #FFFFFFh); RECT_P(G1, sw-3, 2 + (sh-9) * y/h, sw-3, 2 + (sh-9) * y/h + (sh-9) * sh/h/z, 0, 0); END; IF(dh) THEN BLIT_P(G1, x0, 1, G3); END; BLIT_P(G0, 0, 0, sw, sh, G1, 0, 0, sw, sh); UNTIL ISKEYDOWN(4); END;

Комментарии