Jump to content





dCalc Keypad - Button Design

Posted by k-Pack, 28 March 2014 · 915 views

Diamond Calculator
I have taken the first step toward  a calculator application for the Diamond GOS environment.  I  may have an icon design for the virtual keypad. This is it so far.
 
A 16 X 16 bit icon seemed to be a good size to start.  Not so big that your arm is flailing around moving the mouse pointer or so small to cause fatigue from making micro adjustments. If at all possible, any way to make the keys appear 3 dimensional  may improve their aesthetics. Another important consideration is how they would look in a 4 X 4 matrix of icons. Is white space between keys necessary to make them look like separate keys?
 
Most of the design work was done on graph paper during TV commercials.  As you can see it ain't pretty.
 
Attached Image
Attached Image
Attached Image
 
 A program was written to place the icon on the screen to evaluate the preliminary design. The third design seemed to show some promise.
 
If you want to see the results add the following program lines to DIABASIC.BAS and it will display the designs. The icon will be displayed until the mouse button has been pressed.  To change the displayed icon requires changing the line number in the RESTORE command.  Don't forget to put DIABASIC.OBJ on the disk.
55 REM ***********************
57 REM TEST ICON DESIGN
59 REM CHANGE LINE 95 TO POINT
60 REM TO ICON DATA
62 REM ***********************
65 DIM ICON0$(32)
70 REM INIT SCREEN TO MODE 0
80 POKE B0,0:D=USR(DIAMOND,INIT)
90 REM LOAD ICON0$ WITH BIT MAP DATA
95 RESTORE 5020:REM ICON DATA POINTER
100 FOR X=1 TO 32:READ Y:ICON0$(X,X)=CHR$(Y):NEXT X
110 REM INSTALL ICON0
120 POKE B0,0:REM ICON NUMBER
130 POKE B1,9:REM X POSITION
140 POKE B2,40:REM Y POSITION
150 POKE B3,2:REM WIDTH IN BYTES
160 POKE B4,16:REM HEIGHT IN PIXELS
170 A=ADR(ICON0$)
180 POKE W0,A-(INT(A/256)*256):REM LOCATION OF ICON SHAPE DATA
190 POKE W0+1,INT(A/256)
200 D=USR(DIAMOND,INSTALLICON)
590 REM LOOP TO CHECK FOR EVENT
600 D=USR(DIAMOND,EVENT)
610 IF PEEK(EVENTTYPE)=0 THEN 600
620 D=USR(DIAMOND,EXIT)
630 END 
4999 REM ICON1
5000 DATA 0,0,42,168,85,84,96,2,97,132,99,130,97,132,97,130
5002 DATA 97,132,97,130,97,132,103,226,96,4,127,250,63,252,0,0
5009 REM ICON2
5010 DATA 0,0,85,84,170,170,192,4,193,130,195,132,199,130,193,132
5015 DATA 193,130,193,132,193,130,207,228,207,226,192,4,191,254,127,252
5019 DATA ICON2
5020 DATA 85,85,170,170,192,1,193,130,195,129,199,130,193,129,193,130
5025 DATA 193,129,193,130,193,129,207,242,207,241,192,2,191,253,127,254
Now onto testing the icon in a keypad arrangement and make final adjustment. Then I have to make an icon for each of the 15+ icons to build the keypad.  I'm thinking about how easy this would be in NS BASIC for the Palm OS.




November 2018

S M T W T F S
    123
45678910
11121314151617
1819 20 21222324
252627282930 

My Picture

Latest Visitors