Home > Net >  How to realize the user interaction with the image?
How to realize the user interaction with the image?

Time:04-19

Put a small image on the background image is used for interaction, click the small image can perform some operation, how to determine which small users to click on the image? Here involves the background image on the small screen coordinates and component image coordinates transformation, change the location of the mouse into the background image on the small image coordinates, if the display resolution of the screen when programming with the user, when using can convert according to certain rules, but if the display resolution of the screen when using unlike when programming, it may not be able to transform,

CodePudding user response:

You really had a problem, or idle boring meditation? The mouse position relative to the image can detect, has nothing to do with the resolution of the screen!

CodePudding user response:

Learning research and development of specialized winform is control development, as for can only use Microsoft's existing controls "drag" design application window, that is enterprise in amateur practice, learn form control design and development, architectural form controls should be understood knowledge, know the internal mechanism of professional learning winform, WPF systematic principle and so on control framework,

CodePudding user response:

Small to develop a GridView control, an edit control organization framework, a form of automatic layout and edit control, etc., to develop a CAD above edit control, etc., and even a 2 d, 3 d automatically according to the data source to dynamic display background and tens of thousands of business "spirit" of the state of the system, are from the control development as the basic study, if you only know the basic "draw points, lines such as" basic statement, that is equivalent to have at least 5 years professional learning process needs to go,

CodePudding user response:

Let's change the problem and see will understand, if it is to do the game development, I control my "little person" I "big Boss", so we know the mouse is point person or a Boss?

Obviously, for game programmers, and the boss is object, the object has a click event, background and like a picture as to what you say in the game development "map" and "character", drawing images is the game engine (graphics engine), and the programmer actually only care about, which object which trigger events, need to do that kind of processing

Ps: you can choose to play a 2 d engine

CodePudding user response:

In the change, the question for some time, idle bored in the machine a wow you private server

Then you Gm log in, you will find a different world, that is every strange feet under a small box (no matter how large is the monster), then you can operate for a small box, change rate,

It is to tell you, the programmer actually matter what is the monster, the monster looks like just a map (or sp said elf), we programmers just tube I click on the small box triggered a Gm operations
  •  Tags:  
  • C#
  • Related