Skip to content

Commit

Permalink
GUI2: gave windows procedurally-drawn minimal borders
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 15, 2016
1 parent 0678895 commit 4f106b4
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 112 deletions.
78 changes: 22 additions & 56 deletions data/gui/default/widget/panel_title_screen.cfg
Expand Up @@ -27,65 +27,31 @@

[/pre_commit]

[image]
name = "dialogs/translucent54-border-topleft.png"
[/image]

[image]
x = {OFFSET_SIDE_1}
y = 0
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/translucent54-border-top.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = 0
name = "dialogs/translucent54-border-topright.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = {OFFSET_SIDE_1}
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/translucent54-border-right.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = "(height - {OFFSET_SIDE_2})"
name = "dialogs/translucent54-border-botright.png"
[/image]

[image]
x = {OFFSET_SIDE_1}
y = "(height - {OFFSET_SIDE_2})"
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/translucent54-border-bottom.png"
[/image]

[image]
[rectangle]
x = 0
y = "(height - {OFFSET_SIDE_2})"
name = "dialogs/translucent54-border-botleft.png"
[/image]

[image]
x = 0
y = {OFFSET_SIDE_1}
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/translucent54-border-left.png"
[/image]
y = 0
w = "(width)"
h = "(height)"

border_thickness = 3
border_color = "16, 22, 35, 255"
[/rectangle]

[rectangle]
x = 1
y = 1
w = "(width - 2)"
h = "(height - 2)"

border_thickness = 1
border_color = {GUI__BORDER_COLOR}
[/rectangle]

[image]
x = {OFFSET_SIDE_1}
y = {OFFSET_SIDE_1}
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
x = 3
y = 3
w = "(width - 6)"
h = "(height - 6)"
name = "dialogs/translucent54-background.png"
[/image]

Expand Down
78 changes: 22 additions & 56 deletions data/gui/default/widget/window_default.cfg
Expand Up @@ -22,65 +22,31 @@

{PRE_COMMIT}

[image]
name = "dialogs/{BASE_NAME}-border-topleft.png"
[/image]

[image]
x = {OFFSET_SIDE_1}
y = 0
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/{BASE_NAME}-border-top.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = 0
name = "dialogs/{BASE_NAME}-border-topright.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = {OFFSET_SIDE_1}
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/{BASE_NAME}-border-right.png"
[/image]

[image]
x = "(width - {OFFSET_SIDE_2})"
y = "(height - {OFFSET_SIDE_2})"
name = "dialogs/{BASE_NAME}-border-botright.png"
[/image]

[image]
x = {OFFSET_SIDE_1}
y = "(height - {OFFSET_SIDE_2})"
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/{BASE_NAME}-border-bottom.png"
[/image]

[image]
[rectangle]
x = 0
y = "(height - {OFFSET_SIDE_2})"
name = "dialogs/{BASE_NAME}-border-botleft.png"
[/image]

[image]
x = 0
y = {OFFSET_SIDE_1}
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
resize_mode = "stretch"
name = "dialogs/{BASE_NAME}-border-left.png"
[/image]
y = 0
w = "(width)"
h = "(height)"

border_thickness = 3
border_color = "16, 22, 35, 255"
[/rectangle]

[rectangle]
x = 1
y = 1
w = "(width - 2)"
h = "(height - 2)"

border_thickness = 1
border_color = {GUI__BORDER_COLOR}
[/rectangle]

[image]
x = {OFFSET_SIDE_1}
y = {OFFSET_SIDE_1}
w = "(if(width < {OFFSET_TOTAL}, 0, width - {OFFSET_TOTAL}))"
h = "(if(height < {OFFSET_TOTAL}, 0, height - {OFFSET_TOTAL}))"
x = 2
y = 2
w = "(width - 4)"
h = "(height - 4)"
name = "dialogs/{BASE_NAME}-background.png"
resize_mode = "tile"
[/image]
Expand Down

0 comments on commit 4f106b4

Please sign in to comment.