Editor Brushes: Replaced the ugly red border marker with a radio button
behaviour.
|
@ -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]
|
||||
|
|
BIN
data/core/images/editor/brush-1-active.png
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
data/core/images/editor/brush-1-pressed.png
Executable file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/core/images/editor/brush-1.png
Normal file → Executable file
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.1 KiB |
BIN
data/core/images/editor/brush-2-active.png
Executable file
After Width: | Height: | Size: 3.9 KiB |
BIN
data/core/images/editor/brush-2-pressed.png
Executable file
After Width: | Height: | Size: 3.9 KiB |
BIN
data/core/images/editor/brush-2.png
Normal file → Executable file
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 4 KiB |
BIN
data/core/images/editor/brush-3-active.png
Executable file
After Width: | Height: | Size: 3.8 KiB |
BIN
data/core/images/editor/brush-3-pressed.png
Executable file
After Width: | Height: | Size: 3.9 KiB |
BIN
data/core/images/editor/brush-3.png
Normal file → Executable file
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 3.9 KiB |
BIN
data/core/images/editor/brush-nw-se-active.png
Executable file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/core/images/editor/brush-nw-se-pressed.png
Executable file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/core/images/editor/brush-nw-se.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.2 KiB |
BIN
data/core/images/editor/brush-se-nw-active.png
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
data/core/images/editor/brush-se-nw-pressed.png
Executable file
After Width: | Height: | Size: 4.2 KiB |
BIN
data/core/images/editor/brush-se-nw.png
Normal file → Executable file
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 4.1 KiB |
|
@ -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);
|
||||
|
|