Opened 12 years ago

Closed 12 years ago

#1122 closed enhancement (fixed)

[PATCH] Add terrain eyedropper tool / show current texture

Reported by: historic_bruno Owned by: ben
Priority: Nice to Have Milestone: Alpha 10
Component: Atlas editor Keywords: patch
Cc: Patch:

Description

Patch to add an eyedropper tool to Atlas, like what most paint programs have. It samples the terrain texture under the brush and makes it the currently selected texture. It's very handy for expanding texture areas. The patch also adds a box in the terrain panel to show current brush texture.

Attachments (2)

atlas_eyedropper-01182012.patch (21.6 KB ) - added by historic_bruno 12 years ago.
atlas_eyedropper-03202012.patch (20.3 KB ) - added by historic_bruno 12 years ago.

Download all attachments as: .zip

Change History (10)

by historic_bruno, 12 years ago

comment:1 by historic_bruno, 12 years ago

Eyedropper in action: http://i.imgur.com/Sik6D.jpg

comment:2 by Kieran P, 12 years ago

Milestone: Alpha 9Alpha 10

comment:3 by Philip Taylor, 12 years ago

Does the eye-dropper need to be a separate tool, rather than being something like right-click or shift-left-click with the normal 'paint' tool? The latter sounds more efficient since users will probably want to frequently switch between picking and painting textures, when working on a varied piece of land.

In LoadPreview, if you hit the "invalid/missing texture" case then you'll exit from the function and leave the panel in a frozen state. Probably should call Thaw() before return to ensure the freezedness state stays balanced.

in reply to:  3 comment:4 by historic_bruno, 12 years ago

Replying to Philip:

Does the eye-dropper need to be a separate tool, rather than being something like right-click or shift-left-click with the normal 'paint' tool? The latter sounds more efficient since users will probably want to frequently switch between picking and painting textures, when working on a varied piece of land.

Good point, it should be as convenient as possible. Right click is not viable, since that's used for lower priority painting. I'll ask Michael what he would prefer since he does most of the map making :)

by historic_bruno, 12 years ago

comment:5 by historic_bruno, 12 years ago

New patch:

  • The eyedropper is combined with the Paint tool (but not yet Replace or Fill - could be added later).
  • Shift key is used to activate eyedropper.
  • At first I tried combining the eyedropper with the painting states, but IMO it was too easy to accidentally paint terrain by releasing the Shift key while moving the mouse. I thought it's more intuitive to give the eyedropper its own state, so the states are like this:
    • Waiting - if Shift key pressed, enter the Eyedropper state, else if mouse button pressed, enter the Paint states.
    • Paint - if mouse button released, enter the Waiting state.
    • Eyedropper - if Shift key released, enter the Waiting state.
  • The eyedropper has its owns fixed-size brush separate from the paint brush, otherwise it's not clear which texture will be selected.
  • Fixed the missing Thaw().

comment:6 by Kieran P, 12 years ago

Keywords: patch added

comment:7 by historic_bruno, 12 years ago

Keywords: review removed

comment:8 by ben, 12 years ago

Owner: set to ben
Resolution: fixed
Status: newclosed

In 11528:

Adds eyedropper tool to Atlas terrain brush (Shift+Click to activate). Fixes #1122.
Adds preview box showing currently selected terrain.

Note: See TracTickets for help on using tickets.