Editor Brushes: Replaced the ugly red border marker with a radio button

behaviour.
This commit is contained in:
fendrin 2013-03-28 12:40:52 +01:00
parent cd73e9c879
commit cd25b98877
17 changed files with 7 additions and 11 deletions

View file

@ -3,7 +3,7 @@
[brush]
name= _ "Single Hex"
image="editor/brush-1.png"
image="editor/brush-1"
[relative]
x=0
y=0
@ -13,7 +13,7 @@
[brush]
radius=1
name= _ "Radius 1 Hex"
image="editor/brush-2.png"
image="editor/brush-2"
[relative]
x=0
y=0
@ -23,7 +23,7 @@
[brush]
radius=2
name= _ "Radius 2 Hex"
image="editor/brush-3.png"
image="editor/brush-3"
[relative]
x=0
y=0
@ -44,7 +44,7 @@
y=0
[/relative]
name= _ "Hex Line NW-SE"
image="editor/brush-nw-se.png"
image="editor/brush-nw-se"
[/brush]
[brush]
@ -60,7 +60,7 @@
x=0
[/relative]
name= _ "Hex Line SE-NW"
image="editor/brush-se-nw.png"
image="editor/brush-se-nw"
[/brush]
# [brush]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/core/images/editor/brush-1.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
data/core/images/editor/brush-2.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
data/core/images/editor/brush-3.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/core/images/editor/brush-nw-se.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
data/core/images/editor/brush-se-nw.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

@ -100,6 +100,8 @@ void brush_bar::draw(bool force) {
surface screen = gui_.video().getSurface();
for (size_t i = 0; i < brushes_.size(); i++) {
std::string filename = brushes_[i].image();
filename += ( i == selected_brush_size() ?
"-pressed.png" : ".png" );
surface image(image::get_image(filename));
if (image == NULL) {
ERR_ED << "Image " << filename << " not found." << std::endl;
@ -111,12 +113,6 @@ void brush_bar::draw(bool force) {
}
SDL_Rect dstrect = create_rect(x, gui_.brush_bar_area().y, image->w, image->h);
sdl_blit(image, NULL, screen, &dstrect);
const Uint32 color = i == selected_brush_size() ?
SDL_MapRGB(screen->format,0xFF,0x00,0x00) :
SDL_MapRGB(screen->format,0x00,0x00,0x00);
//TODO fendrin
//draw_rectangle(dstrect.x -1, dstrect.y -1, image->w +2, image->h+2, color, screen);
draw_rectangle(dstrect.x, dstrect.y, image->w, image->h, color, screen);
x += image->w + brush_padding_;
}
update_rect(loc);