The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Program template - scroller example
10-09-2016, 02:30 PM
Post: #1
Program template - scroller example
Hello,
I'm sharing here a small template I made to help building programs that need to displays graphics with scrolling.

Of course, this template have to be customized to build your own program, but it works out of the box with an example (it displays a graphic, and interact with mouse and key)

Features list :
- touchscreen horizontal and vertical scroll
- mouse click, it triggers function click(x,y) : draw a blue box in this example
- mouse double-click, it triggers function doubleclick(x,y) : draw a pink box in this example
- scroll with arrow keys (contiunous scrolling)
- enter key triggers function action() : invert screen in this example
- ESC key, to leave the program.

Important : This template use libList, download it here, you need to install it to make it work.

.hpprgm  prg_tpl2.hpprgm (Size: 10.32 KB / Downloads: 20)

For example,
To build a picture viewer program, all you have to do is to modify functions to have :
Code:

init()
BEGIN
G1:=AFiles("image.png");
END;

click(x,y) // do nothing
BEGIN
END;

doubleclick(x,y) // do nothing
BEGIN
END;

action() // do nothing
BEGIN
END;
it have never been so easier Wink

primer
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Program template - scroller example - primer - 10-09-2016 02:30 PM



User(s) browsing this thread: 1 Guest(s)