Skip to content

Commit

Permalink
Procedurally draw combobox borders
Browse files Browse the repository at this point in the history
This avoids issues with the borders looking bad when scaled
  • Loading branch information
Vultraz committed Mar 14, 2016
1 parent b512ad2 commit e13cf1e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions data/gui/default/widget/combobox_default.cfg
Expand Up @@ -3,6 +3,19 @@
### Definition of the default button.
###

#define _GUI_DRAW_BORDER
[rectangle]
x = 0
y = 0
w = "(width)"
h = "(height)"

border_thickness = 1
border_color = "114, 79, 46, 255"

[/rectangle]
#enddef

#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE BASE_NAME IPF
[resolution]

Expand Down Expand Up @@ -31,6 +44,8 @@
name = "buttons/{BASE_NAME}.png{IPF}"
[/image]

{_GUI_DRAW_BORDER}

{GUI__LEFT_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}

[image]
Expand All @@ -52,6 +67,8 @@
name = "buttons/{BASE_NAME}.png~GS(){IPF}"
[/image]

{_GUI_DRAW_BORDER}

{GUI__LEFT_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_DISABLED__TITLE})}

[image]
Expand All @@ -73,6 +90,8 @@
name = "buttons/{BASE_NAME}-pressed.png{IPF}"
[/image]

{_GUI_DRAW_BORDER}

{GUI__LEFT_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}

[image]
Expand All @@ -95,6 +114,8 @@
name = "buttons/{BASE_NAME}-pressed.png{IPF}"
[/image]

{_GUI_DRAW_BORDER}

{GUI__LEFT_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})}

[image]
Expand All @@ -119,3 +140,4 @@
[/combobox_definition]

#undef _GUI_RESOLUTION
#undef _GUI_DRAW_BORDER
Binary file modified images/buttons/button_dropdown/button_dropdown-pressed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/buttons/button_dropdown/button_dropdown.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e13cf1e

Please sign in to comment.