"How many Chinese characters know" "Development Zhi (5)

xiaoxiao2021-03-06  47

Today Task: Join the About Options to introduce software features and related information; add pause, turn page

Correct a bug before proceeding. That is to show the first screen, there is a superimposed phenomenon on the lower side of the screen and is not a line! In fact, I found last night, but it was too late, ME had to rest, so I put it down. The problem should come out when you first generate coordinates and characters, browse the source code, oh, sure. Use the global variable height to limit the rule fills of the column column, change to Stars.length, OK. The dead stuff can be seen that the importance of judging according to the number of numbers!

Increase the pause function is to let users have the opportunity to ask other people or check the dictionary, huh, huh. The flip page function is that the speed of the screen is too slow, and the user may read it when I wanted to look down. Leisure less, transfer to the topic. In fact, it is very simple, and the action of setting the button is line, you need to operate the keypressed, PointerPressed. When you are suspended, you will not regenerate into new coordinates and character numbers; The next button generates a new screen display content manufacturing; upward key, the left and right keys do not define any action; other keys are the same as the keyword. Look at this code a day long, or no longer use the internal class. Update to CVSRepository, remove the CANVAS internal class into a separate class.

However, if the internal class is not too difficult to maintain, there is still a lot of convenience, such as the sharing of variables.

? ? ? Preliminary ideas Set a global variable pause (boolean) to control whether pauses are reversed in PointerPress. Check the PAUSE in the scroll method (updated), if you don't update the number, if you are fake, updated. The results did not test, the first click, there is a role, the screen stops, and then click the screen again but no longer again!

I didn't understand that a simple method was used, and the pause and continued function were used on different keys. Consider user operating habits, adjust the above concept: upper key, left button, click on the screen, suspend mobile; down key, right button, turn the screen (that is, display a completely different next page); Determine the key, the keyboard The key is continued on the screen. In order to support the scroll, the content placed in the builder and the contents of the coordinate number and the character number column is set separately as a method to facilitate the call call. Debug, pass.

! ! ! Initializing the screen prints, it is generally easy to write into g.setgrayscale (255); g.FillRect (0, 0, width, height); actually the second sentence is written for g.fillRect (0, 0, Width - 1, Height - 1 ); The line ME that does not need to be displayed without knowing how much system performance can be improved, but the resources are affirmative. After all, the mobile phone, the PDA is CLDC, and the savings are a little bit.

When you make a watermark on the screen, because the content has three rows, the ME statement is like this:

// Take watermark in the center of the screen, huh, huh g.setgrayscale (191); g.drawstring ("garden.eooo.com", width / 2, height / 2- (fonth * 3) / 2, g.baseline | g. Hcenter); g.drawstring ("Post Garden", Width / 2, Height / 2-FONTH / 2, G.Baseline | G.hcenter; g.drawstring ("Heart5", Width / 2, Height / 2 FONTH / 2, g.baseline | g.hcenter; use setgrayscale because it is less than SETCOLOR should write less than two parameters, and then do not support color, such as Motorola A388, write into setcolor pure waste, then said ME this " How many Chinese characters know "is basically a black and white grayscale screen such as 388, huh, huh. The 191 is the closest gray level of pure white 255, just a little trace, after all, is a watermark.

! ! ! Seeing Baseline and thought of the wrong mistake, 忿, then emphasized once: String only supports Baseline, Image only supports hcenter, don't be wrong.

? ? ? In again, the positioning of DrawString, where fonth is the height of the font, meaning it is obvious, the middle of the screen, followed by the top, one line below. Tested normally in Motorola J2ME Launchpad, the watermark is located in the center, but in NetBean imported the DefaultColorPhone test from WRK, it is located on the top of the screen, obviously biased, don't know why?

转载请注明原文地址:https://www.9cbs.com/read-110142.html

New Post(0)