From ea56778b8fc42cd063b1d09ed9361d4499a8fd96 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Tue, 4 Jun 2013 20:28:43 +1100 Subject: [PATCH] Use opacity IPF for transparent button images. Value set to 65% --- data/gui/default/widget/button_25x25.cfg | 60 +++++++++++++--------- data/gui/default/widget/button_default.cfg | 18 +++---- 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/data/gui/default/widget/button_25x25.cfg b/data/gui/default/widget/button_25x25.cfg index d1e840383fb..579bbf9481a 100644 --- a/data/gui/default/widget/button_25x25.cfg +++ b/data/gui/default/widget/button_25x25.cfg @@ -4,7 +4,7 @@ ### - down arrow button for the listbox. ### - up arrow button for the listbox. -#define _GUI_RESOLUTION RESOLUTION SIZE IMAGE IMAGE_OVERLAY +#define _GUI_RESOLUTION RESOLUTION SIZE IMAGE IMAGE_OVERLAY IPF [resolution] {RESOLUTION} @@ -25,13 +25,13 @@ [image] w = {SIZE} h = {SIZE} - name = {IMAGE} + ".png" + name = {IMAGE} + ".png{IPF}" [/image] [image] w = {SIZE} h = {SIZE} - name = {IMAGE_OVERLAY} + ".png" + name = {IMAGE_OVERLAY} + ".png{IPF}" [/image] [/draw] @@ -45,13 +45,13 @@ [image] w = {SIZE} h = {SIZE} - name = {IMAGE} + "-disabled.png" + name = {IMAGE} + "-disabled.png{IPF}" [/image] [image] w = {SIZE} h = {SIZE} - name = {IMAGE_OVERLAY} + ".png~GS()" + name = {IMAGE_OVERLAY} + ".png~GS(){IPF}" [/image] [/draw] @@ -65,13 +65,13 @@ [image] w = {SIZE} h = {SIZE} - name = {IMAGE} + "-pressed.png" + name = {IMAGE} + "-pressed.png{IPF}" [/image] [image] w = {SIZE} h = {SIZE} - name = {IMAGE_OVERLAY} + "-pressed.png" + name = {IMAGE_OVERLAY} + "-pressed.png{IPF}" [/image] [/draw] @@ -85,13 +85,13 @@ [image] w = {SIZE} h = {SIZE} - name = {IMAGE} + "-active.png" + name = {IMAGE} + "-active.png{IPF}" [/image] [image] w = {SIZE} h = {SIZE} - name = {IMAGE_OVERLAY} + "-active.png" + name = {IMAGE_OVERLAY} + "-active.png{IPF}" [/image] [/draw] @@ -101,13 +101,13 @@ [/resolution] #enddef -#define _GUI_DEFINITION ID DESCRIPTION IMAGE IMAGE_OVERLAY +#define _GUI_DEFINITION ID DESCRIPTION IMAGE IMAGE_OVERLAY IPF [button_definition] id = {ID} description = {DESCRIPTION} - {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 12 ({IMAGE}) ({IMAGE_OVERLAY})} - {_GUI_RESOLUTION () 25 ({IMAGE}) ({IMAGE_OVERLAY})} + {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 12 ({IMAGE}) ({IMAGE_OVERLAY}) ({IPF})} + {_GUI_RESOLUTION () 25 ({IMAGE}) ({IMAGE_OVERLAY}) ({IPF})} [/button_definition] #enddef @@ -117,6 +117,7 @@ "Down arrow button for a scrollbar." "buttons/button_square/button_square_25" "icons/arrows/arrows_ornate_down_25" + () } {_GUI_DEFINITION @@ -124,6 +125,7 @@ "Up arrow button for a scrollbar." "buttons/button_square/button_square_25" "icons/arrows/arrows_ornate_up_25" + () } {_GUI_DEFINITION @@ -131,6 +133,7 @@ "Left arrow button for a scrollbar." "buttons/button_square/button_square_25" "icons/arrows/arrows_ornate_left_25" + () } {_GUI_DEFINITION @@ -138,6 +141,7 @@ "Right arrow button for a scrollbar." "buttons/button_square/button_square_25" "icons/arrows/arrows_ornate_right_25" + () } {_GUI_DEFINITION @@ -145,6 +149,7 @@ "Addition button." "buttons/button_square/button_square_25" "icons/action/ornate_add_25" + () } {_GUI_DEFINITION @@ -152,6 +157,7 @@ "Deletion button." "buttons/button_square/button_square_25" "icons/action/ornate_delete_25" + () } # The transparent version @@ -159,43 +165,49 @@ {_GUI_DEFINITION "down_arrow_transparent" "Down arrow button for a transparent scrollbar." - "buttons/button_square/button_square_25_transparent" - "icons/arrows/arrows_ornate_down_25_transparent" + "buttons/button_square/button_square_25" + "icons/arrows/arrows_ornate_down_25" + "~O(65%)" } {_GUI_DEFINITION "up_arrow_transparent" "Up arrow button for a transparent scrollbar." - "buttons/button_square/button_square_25_transparent" - "icons/arrows/arrows_ornate_up_25_transparent" + "buttons/button_square/button_square_25" + "icons/arrows/arrows_ornate_up_25" + "~O(65%)" } {_GUI_DEFINITION "left_arrow_transparent" "Left arrow button for a transparent scrollbar." - "buttons/button_square/button_square_25_transparent" - "icons/arrows/arrows_ornate_left_25_transparent" + "buttons/button_square/button_square_25" + "icons/arrows/arrows_ornate_left_25" + "~O(65%)" } {_GUI_DEFINITION "right_arrow_transparent" "Right arrow button for a transparent scrollbar." - "buttons/button_square/button_square_25_transparent" - "icons/arrows/arrows_ornate_right_25_transparent" + "buttons/button_square/button_square_25" + "icons/arrows/arrows_ornate_right_25" + "~O(65%)" } {_GUI_DEFINITION "add_transparent" "Transparent addition button." - "buttons/button_square/button_square_25_transparent" - "icons/action/ornate_add_25_transparent" + "buttons/button_square/button_square_25" + "icons/action/ornate_add_25" + "~O(65%)" } {_GUI_DEFINITION "delete_transparent" "Transparent deletion button." - "buttons/button_square/button_square_25_transparent" - "icons/action/ornate_delete_25_transparent" + "buttons/button_square/button_square_25" + "icons/action/ornate_delete_25" + "~O(65%)" } #undef _GUI_DEFINITION diff --git a/data/gui/default/widget/button_default.cfg b/data/gui/default/widget/button_default.cfg index b03a52876b1..f35d2106a5f 100644 --- a/data/gui/default/widget/button_default.cfg +++ b/data/gui/default/widget/button_default.cfg @@ -3,7 +3,7 @@ ### Definition of the default button. ### -#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE BASE_NAME +#define _GUI_RESOLUTION RESOLUTION MIN_WIDTH DEFAULT_WIDTH HEIGHT EXTRA_WIDTH EXTRA_HEIGHT FONT_SIZE BASE_NAME IPF [resolution] {RESOLUTION} @@ -28,7 +28,7 @@ [image] w = "(width)" h = "(height)" - name = "buttons/{BASE_NAME}.png" + name = "buttons/{BASE_NAME}.png{IPF}" [/image] {GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})} @@ -44,7 +44,7 @@ [image] w = "(width)" h = "(height)" - name = "buttons/{BASE_NAME}-disabled.png" + name = "buttons/{BASE_NAME}-disabled.png{IPF}" [/image] {GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_DISABLED__TITLE})} @@ -60,7 +60,7 @@ [image] w = "(width)" h = "(height)" - name = "buttons/{BASE_NAME}-pressed.png" + name = "buttons/{BASE_NAME}-pressed.png{IPF}" [/image] {GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})} @@ -76,7 +76,7 @@ [image] w = "(width)" h = "(height)" - name = "buttons/{BASE_NAME}-active.png" + name = "buttons/{BASE_NAME}-active.png{IPF}" [/image] {GUI__CENTERED_TEXT ({FONT_SIZE}) () ({GUI__FONT_COLOR_ENABLED__TITLE})} @@ -94,8 +94,8 @@ description = "Default button" # Tiny gui sizes haven't been tested yet so might need some tuning. - {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 54 11 6 2 ({GUI_TINY__FONT_SIZE__SMALL}) "button_normal/button_H22" } - {_GUI_RESOLUTION () 40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button_normal/button_H22" } + {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 54 11 6 2 ({GUI_TINY__FONT_SIZE__SMALL}) "button_normal/button_H22" ()} + {_GUI_RESOLUTION () 40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button_normal/button_H22" ()} [/button_definition] @@ -105,8 +105,8 @@ description = "Default transparent button" # Tiny gui sizes haven't been tested yet so might need some tuning. - {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 54 11 6 2 ({GUI_TINY__FONT_SIZE__SMALL}) "button_normal/button_copper_transparent_H22" } - {_GUI_RESOLUTION () 40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button_normal/button_copper_transparent_H22" } + {_GUI_RESOLUTION ({GUI_TINY__RESOLUTION}) 20 54 11 6 2 ({GUI_TINY__FONT_SIZE__SMALL}) "button_normal/button_H22" "~O(65%)"} + {_GUI_RESOLUTION () 40 108 22 13 4 ({GUI_NORMAL__FONT_SIZE__SMALL}) "button_normal/button_H22" "~O(65%)"} [/button_definition]