Skip to content

Commit

Permalink
ttip: added a separate window definition for floating tooltips
Browse files Browse the repository at this point in the history
The design is based on the 'menu' style window, with a tint applied.
  • Loading branch information
Vultraz committed Mar 14, 2016
1 parent b311135 commit 2fdc08d
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 1 deletion.
102 changes: 102 additions & 0 deletions data/gui/default/widget/window_tooltip_large.cfg
Expand Up @@ -44,3 +44,105 @@

[/window_definition]

[window_definition]

id = tooltip
description = "The window to show a large tooltip."

[resolution]

left_border = 10
right_border = 10
top_border = 10
bottom_border = 10

[background]

[draw]

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

[image]
x = 2
y = 0
w = "(if(width < 4, 0, width - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-top.png"
[/image]

[image]
x = "(width - 2)"
y = 0
name = "dialogs/menu-border-topright.png"
[/image]

[image]
x = "(width - 2)"
y = 2
h = "(if(height < 4, 0, height - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-right.png"
[/image]

[image]
x = "(width - 2)"
y = "(height - 2)"
name = "dialogs/menu-border-botright.png"
[/image]

[image]
x = 2
y = "(height - 2)"
w = "(if(width < 4, 0, width - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-bottom.png"
[/image]

[image]
x = 0
y = "(height - 2)"
name = "dialogs/menu-border-botleft.png"
[/image]

[image]
x = 0
y = 2
h = "(if(height < 4, 0, height - 4))"
resize_mode = "stretch"
name = "dialogs/menu-border-left.png"
[/image]

[image]
x = 2
y = 2
w = "(if(width < 4, 0, width - 4))"
h = "(if(height < 4, 0, height - 4))"
name = "dialogs/menu-background.png"
resize_mode = "tile"
[/image]

[rectangle]
x = 1
y = 1
w = "(width - 1)"
h = "(height - 1)"
fill_color = {GUI__BACKGROUND_COLOR_ENABLED}
[/rectangle]

[/draw]

[/background]

[foreground]

[draw]
[/draw]

[/foreground]

[/resolution]

[/window_definition]

2 changes: 1 addition & 1 deletion data/gui/default/window/tooltip_large.cfg
Expand Up @@ -185,7 +185,7 @@ def reevaluate_best_size(w, s)
description = "The tooltip popup window with large tooltips, eg in the main menu."

[resolution]
definition = "tooltip_large"
definition = "tooltip"

automatic_placement = "false"

Expand Down

0 comments on commit 2fdc08d

Please sign in to comment.