There is:

alt text

The plate with the coordinates of the database, which stores the value of X, Y and TYPE. Type carries the value of the color coordinates (for perception I will say that this is a map of the game).

Required: Mass and convenient to edit color coordinates. For example, select a color from the palette, and draw with the mouse along the coordinates like a pencil by pixels in Photoshop. Or something simpler, but more convenient than choosing a color from the drop-down list.

Question: How is it better to implement? I want to note that I do this work for training in php . That is to say, I set the task and completed it. Now I just want to add functionality and convenience, as I can do it differently, but the method does not allow you to quickly make changes to a large map. But at the same time, I do not want to delve into the details of javascript or something else. I know what I need, but not now.

Now, without talking, can anyone see or know how to implement something like that? I would be very grateful for the code examples.

  • five
    It just will be training on JS, but not on PHP. - Oleg Arkhipov
  • Then at least advise in which direction to dig, or some kind of farewell, because I do not know where to start. - Andrei Stifurak

1 answer 1

For example, Color Picker - jQuery plugin .

  • Read about events in jquery ;
  • Write a function that reads the selected color and writes it to the css property of the square of the playing field;
  • Assign a written function to a color picker above.

PS: jQuery ColorPicker - choose a color .