RSS Bot Posted March 27, 2018 Share Posted March 27, 2018 When starting a Diamond project, I have a tendency to utilize a lot more design time before sitting down in front of a computer. Sketching out displays, icons and menus seem to consume a lot of time but having this all worked out before committing it to code helps. (Random Thought - Remember going into the office supply store and finding a whole section of graph paper. This time I had to ask the clerk where it was. He pointed me toward the paper section and said, "Its next to the carbon paper." I found one - 5 squares to the inch spiral binder.) Probably the first thing that I design is the title dialog box (sometimes called "about" or "Info…" in the drop down menu. It holds important information about the title, version #, author and the date. It kind of represents the big picture and helps solidify a commitment to the project. And…. Each time I start coding a project I seem to be spending a day or two trying to make the screen look like the sketches. And… I always say that I'm going to take notes on the process so I don't have relearn it each time. And…. Each time I didn't. So this time, I made this reference sheet on how to define a dialog box, put a text object into it and define the hole box as a touch area. All the information I need to create a simple info box. Its definitely not a substitute for the manual. All the information is in the Diamond Develop Manual but scattered on several pages though out the manual. My biggest problem was figuring out the reference points. Where the 0,0 reference point is seems to change. I concluded that the touch areas are located using the upper left corner on the outer edge of the boarder. The text is place in reference to the upper left-corner inside the boarder and is calculated using the lower left corner of the first print character. The other thing to keep straight is the count units. Are you counting bytes, characters, color clocks, pixels or scan lines? I did the rough draft of the reference sheet and tested it by designing the HELLO WORLD dialog box. I found one misconception on the reference sheet and 3 mistakes in math. I believe those have been corrected. I hope to be running more tests before the end of the year. I'll up date with any refinements in the comment area, so check back here if you should ever be in need of a simple text dialog box. This HELLO WORD Dialog box was programed using M65 and the Diamond macro library from the Diamond Develop Kit. 0100 ;HELLO WORLD dialog example0110 ;0120 .OPT NO LIST0130 *= $40000140 ;0150 .INCLUDE #D:DMACROS1.M650160 ;0170 HELLOOBJ0180 .BYTE 1 ;TEXT OBJECT0190 .WORD HELLOSTRING ;ADDRESS0200 .WORD 0 ;START X0210 .WORD 8 ;BOTTOM OF FIRST LINE OF TEXT0220 .BYTE 8 ;SCAN LINES/LINE FEED0230 .BYTE 255 ;END OF LIST0235 ;0240 HELLOSTRING ; TEXT0250 .BYTE "HELLO",13 ;LINE FEED0260 .BYTE "WORLD"0270 .BYTE 0 :END STRING0275 ;0280 HELLOTOUCH0290 .BYTE 0,28,0,36 ;WHOLE BOX0300 .BYTE 255 ;END OF LIST0310 ;0320 ;0330 START ; DIAMOND MACROS0340 INIT 00350 DODIALOG 7,32,HELLOOBJ,HELLOTOUCH0360 EVENTDIALOG 0370 RELEASEDIALOG 0380 EXIT 0390 EXECDESKTOP 0400 ;0410 *= $02E00420 .WORD START Attached File(s) Diamond Simple Dialog.pdf (528.34KB)Number of downloads: 0 http://atariage.com/forums/blog/556/entry-14627-diamond-gos-dialog-reference-sheet/ Link to comment Share on other sites More sharing options...
Recommended Posts