diff --git a/data/gui/bar.png b/data/gui/bar.png deleted file mode 100644 index 65577f1e7..000000000 Binary files a/data/gui/bar.png and /dev/null differ diff --git a/data/gui/online/networking_lobby.stkgui b/data/gui/online/networking_lobby.stkgui index fbed2df06..63d84bc82 100644 --- a/data/gui/online/networking_lobby.stkgui +++ b/data/gui/online/networking_lobby.stkgui @@ -2,22 +2,21 @@
- -
+ +
- +
- -
- - + +
+
@@ -26,15 +25,13 @@
- - - - - + + +
- +
diff --git a/data/skins/Coal.stkskin b/data/skins/Coal.stkskin new file mode 100644 index 000000000..fe35fb976 --- /dev/null +++ b/data/skins/Coal.stkskin @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/data/skins/Forest.stkskin b/data/skins/Forest.stkskin index ac6a071d0..2dde3a2b1 100644 --- a/data/skins/Forest.stkskin +++ b/data/skins/Forest.stkskin @@ -67,7 +67,9 @@ when the border that intersect at this corner are enabled. - + + + - @@ -111,7 +113,7 @@ when the border that intersect at this corner are enabled. left_border="20" right_border="20" top_border="0" bottom_border="0" preserve_h_aspect_ratios="true" /> - @@ -128,20 +130,33 @@ when the border that intersect at this corner are enabled. left_border="75" right_border="75" top_border="0" bottom_border="15" hborder_out_portion="0.2" /> + + + + + + + - - - - - @@ -149,7 +164,7 @@ when the border that intersect at this corner are enabled. - @@ -157,21 +172,21 @@ when the border that intersect at this corner are enabled. left_border="110" right_border="110" top_border="0" bottom_border="36" preserve_h_aspect_ratios="true" hborder_out_portion="0.0" /> - - - - - @@ -187,15 +202,15 @@ when the border that intersect at this corner are enabled. - - + + - @@ -209,38 +224,38 @@ when the border that intersect at this corner are enabled. be mirrorred for bottom. Buttons can be in neutral or down state. Advanced stretching is not used here. --> - + - + - - + + - - - + + + - - - - @@ -263,7 +278,7 @@ when the border that intersect at this corner are enabled. - + diff --git a/data/skins/Ocean.stkskin b/data/skins/Ocean.stkskin index 72b93bfda..f06b1b49a 100644 --- a/data/skins/Ocean.stkskin +++ b/data/skins/Ocean.stkskin @@ -66,7 +66,9 @@ when the border that intersect at this corner are enabled. - + + + - @@ -110,7 +112,7 @@ when the border that intersect at this corner are enabled. left_border="20" right_border="20" top_border="0" bottom_border="0" preserve_h_aspect_ratios="true" /> - @@ -127,20 +129,33 @@ when the border that intersect at this corner are enabled. left_border="75" right_border="75" top_border="0" bottom_border="15" hborder_out_portion="0.2" /> + + + + + + + - - - - - @@ -148,7 +163,7 @@ when the border that intersect at this corner are enabled. - @@ -156,21 +171,21 @@ when the border that intersect at this corner are enabled. left_border="110" right_border="110" top_border="0" bottom_border="36" preserve_h_aspect_ratios="true" hborder_out_portion="0.0" /> - - - - - @@ -186,15 +201,15 @@ when the border that intersect at this corner are enabled. - - + + - @@ -208,38 +223,38 @@ when the border that intersect at this corner are enabled. be mirrorred for bottom. Buttons can be in neutral or down state. Advanced stretching is not used here. --> - + - + - - + + - - - + + + - - - - @@ -262,7 +277,7 @@ when the border that intersect at this corner are enabled. - + diff --git a/data/skins/Peach.stkskin b/data/skins/Peach.stkskin index 2f2ab97d4..737d50bc8 100644 --- a/data/skins/Peach.stkskin +++ b/data/skins/Peach.stkskin @@ -66,7 +66,9 @@ when the border that intersect at this corner are enabled. - + + + - @@ -110,7 +112,7 @@ when the border that intersect at this corner are enabled. left_border="15" right_border="15" top_border="15" bottom_border="15" preserve_h_aspect_ratios="false" /> - @@ -128,20 +130,32 @@ when the border that intersect at this corner are enabled. hborder_out_portion="0.2" /> + + + + + + - - - - - @@ -149,7 +163,7 @@ when the border that intersect at this corner are enabled. - @@ -157,20 +171,21 @@ when the border that intersect at this corner are enabled. left_border="110" right_border="110" top_border="0" bottom_border="36" preserve_h_aspect_ratios="true" hborder_out_portion="0.0" /> - - + - - - @@ -185,15 +200,15 @@ when the border that intersect at this corner are enabled. - - + + - @@ -206,38 +221,38 @@ when the border that intersect at this corner are enabled. be mirrorred for bottom. Buttons can be in neutral or down state. Advanced stretching is not used here. --> - + - + - - + + - - - + + + - - - - @@ -260,7 +275,7 @@ when the border that intersect at this corner are enabled. - + diff --git a/data/skins/Ruby.stkskin b/data/skins/Ruby.stkskin index 844fcc2d9..02af617ce 100644 --- a/data/skins/Ruby.stkskin +++ b/data/skins/Ruby.stkskin @@ -67,7 +67,9 @@ when the border that intersect at this corner are enabled. - + + + - @@ -111,7 +113,7 @@ when the border that intersect at this corner are enabled. left_border="15" right_border="15" top_border="15" bottom_border="15" preserve_h_aspect_ratios="false" /> - @@ -129,20 +131,32 @@ when the border that intersect at this corner are enabled. hborder_out_portion="0.2" /> + + + + + + - - - - - @@ -150,7 +164,7 @@ when the border that intersect at this corner are enabled. - @@ -158,20 +172,21 @@ when the border that intersect at this corner are enabled. left_border="110" right_border="110" top_border="0" bottom_border="36" preserve_h_aspect_ratios="true" hborder_out_portion="0.0" /> - - + - - - @@ -186,15 +201,15 @@ when the border that intersect at this corner are enabled. - - + + - @@ -207,38 +222,38 @@ when the border that intersect at this corner are enabled. be mirrorred for bottom. Buttons can be in neutral or down state. Advanced stretching is not used here. --> - + - + - - + + - - - + + + - - - - @@ -261,7 +276,7 @@ when the border that intersect at this corner are enabled. - + diff --git a/data/skins/coal/License.txt b/data/skins/coal/License.txt new file mode 100644 index 000000000..e894da8b4 --- /dev/null +++ b/data/skins/coal/License.txt @@ -0,0 +1,7 @@ +friend.png, error.png, achievement.png - Licensed under CC-BY-SA 3.0 by Magne Djupvik (notification_backgrounds.xcf), + based on cup_gold.png licensed under CC-BY-SA 3+ from Open Game Art (art by onyum.com, comissionned by Bart Kelsey) + glass_section.png licensed under CC-BY-SA 3.0 Unported and main_about.png licensed under Creative-Commons BY-SA 3, By yeKcim (Anthony Carré) + +This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. +To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send +a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. diff --git a/data/skins/coal/achievement.png b/data/skins/coal/achievement.png new file mode 100644 index 000000000..ecbcfc413 Binary files /dev/null and b/data/skins/coal/achievement.png differ diff --git a/data/skins/coal/background.jpg b/data/skins/coal/background.jpg new file mode 100644 index 000000000..63bf94498 Binary files /dev/null and b/data/skins/coal/background.jpg differ diff --git a/data/skins/coal/bottom_bar.png b/data/skins/coal/bottom_bar.png new file mode 100644 index 000000000..27398c55a Binary files /dev/null and b/data/skins/coal/bottom_bar.png differ diff --git a/data/skins/coal/bubble.png b/data/skins/coal/bubble.png new file mode 100644 index 000000000..aafd8dae6 Binary files /dev/null and b/data/skins/coal/bubble.png differ diff --git a/data/skins/coal/dialog.png b/data/skins/coal/dialog.png new file mode 100644 index 000000000..760fb7e3a Binary files /dev/null and b/data/skins/coal/dialog.png differ diff --git a/data/skins/coal/error.png b/data/skins/coal/error.png new file mode 100644 index 000000000..9d59db0a7 Binary files /dev/null and b/data/skins/coal/error.png differ diff --git a/data/skins/coal/friend.png b/data/skins/coal/friend.png new file mode 100644 index 000000000..2640d27a0 Binary files /dev/null and b/data/skins/coal/friend.png differ diff --git a/data/skins/coal/generic.png b/data/skins/coal/generic.png new file mode 100644 index 000000000..4483b532c Binary files /dev/null and b/data/skins/coal/generic.png differ diff --git a/data/skins/coal/glass_iconhighlight_focus.png b/data/skins/coal/glass_iconhighlight_focus.png new file mode 100644 index 000000000..9dfdc6793 Binary files /dev/null and b/data/skins/coal/glass_iconhighlight_focus.png differ diff --git a/data/skins/coal/glass_rsection.png b/data/skins/coal/glass_rsection.png new file mode 100644 index 000000000..27592d0d0 Binary files /dev/null and b/data/skins/coal/glass_rsection.png differ diff --git a/data/skins/coal/glass_section.png b/data/skins/coal/glass_section.png new file mode 100644 index 000000000..537120126 Binary files /dev/null and b/data/skins/coal/glass_section.png differ diff --git a/data/skins/coal/glassbutton.png b/data/skins/coal/glassbutton.png new file mode 100644 index 000000000..b455946ac Binary files /dev/null and b/data/skins/coal/glassbutton.png differ diff --git a/data/skins/coal/glassbutton_focused.png b/data/skins/coal/glassbutton_focused.png new file mode 100644 index 000000000..39f9dd892 Binary files /dev/null and b/data/skins/coal/glassbutton_focused.png differ diff --git a/data/skins/coal/glasscheckbox.png b/data/skins/coal/glasscheckbox.png new file mode 100644 index 000000000..c704cf70a Binary files /dev/null and b/data/skins/coal/glasscheckbox.png differ diff --git a/data/skins/coal/glasscheckbox_checked.png b/data/skins/coal/glasscheckbox_checked.png new file mode 100644 index 000000000..966af201b Binary files /dev/null and b/data/skins/coal/glasscheckbox_checked.png differ diff --git a/data/skins/coal/glasscheckbox_checked_focus.png b/data/skins/coal/glasscheckbox_checked_focus.png new file mode 100644 index 000000000..434129fad Binary files /dev/null and b/data/skins/coal/glasscheckbox_checked_focus.png differ diff --git a/data/skins/coal/glasscheckbox_focus.png b/data/skins/coal/glasscheckbox_focus.png new file mode 100644 index 000000000..fd4eb002f Binary files /dev/null and b/data/skins/coal/glasscheckbox_focus.png differ diff --git a/data/skins/coal/glasssgauge_fill.png b/data/skins/coal/glasssgauge_fill.png new file mode 100644 index 000000000..fecf64e32 Binary files /dev/null and b/data/skins/coal/glasssgauge_fill.png differ diff --git a/data/skins/coal/glassspinner_down.png b/data/skins/coal/glassspinner_down.png new file mode 100644 index 000000000..5eae18a31 Binary files /dev/null and b/data/skins/coal/glassspinner_down.png differ diff --git a/data/skins/coal/glassspinner_focus.png b/data/skins/coal/glassspinner_focus.png new file mode 100644 index 000000000..41a519ea4 Binary files /dev/null and b/data/skins/coal/glassspinner_focus.png differ diff --git a/data/skins/coal/glassspinner_halo.png b/data/skins/coal/glassspinner_halo.png new file mode 100644 index 000000000..45c2e393a Binary files /dev/null and b/data/skins/coal/glassspinner_halo.png differ diff --git a/data/skins/coal/glasstab.png b/data/skins/coal/glasstab.png new file mode 100644 index 000000000..6f2f0e111 Binary files /dev/null and b/data/skins/coal/glasstab.png differ diff --git a/data/skins/coal/glasstab_down.png b/data/skins/coal/glasstab_down.png new file mode 100644 index 000000000..be3eedbc4 Binary files /dev/null and b/data/skins/coal/glasstab_down.png differ diff --git a/data/skins/coal/glasstab_focus.png b/data/skins/coal/glasstab_focus.png new file mode 100644 index 000000000..6b6708c14 Binary files /dev/null and b/data/skins/coal/glasstab_focus.png differ diff --git a/data/skins/coal/glasstab_vert.png b/data/skins/coal/glasstab_vert.png new file mode 100644 index 000000000..b8abb0214 Binary files /dev/null and b/data/skins/coal/glasstab_vert.png differ diff --git a/data/skins/coal/glasstab_vert_down.png b/data/skins/coal/glasstab_vert_down.png new file mode 100644 index 000000000..641212f42 Binary files /dev/null and b/data/skins/coal/glasstab_vert_down.png differ diff --git a/data/skins/coal/glasstab_vert_focus.png b/data/skins/coal/glasstab_vert_focus.png new file mode 100644 index 000000000..dc54862b6 Binary files /dev/null and b/data/skins/coal/glasstab_vert_focus.png differ diff --git a/data/skins/coal/left_arrow_focus.png b/data/skins/coal/left_arrow_focus.png new file mode 100644 index 000000000..96e918f89 Binary files /dev/null and b/data/skins/coal/left_arrow_focus.png differ diff --git a/data/skins/coal/right_arrow_focus.png b/data/skins/coal/right_arrow_focus.png new file mode 100644 index 000000000..06bd18882 Binary files /dev/null and b/data/skins/coal/right_arrow_focus.png differ diff --git a/data/skins/coal/scrollbar_btn_down.png b/data/skins/coal/scrollbar_btn_down.png new file mode 100644 index 000000000..902264f59 Binary files /dev/null and b/data/skins/coal/scrollbar_btn_down.png differ diff --git a/data/skins/coal/scrollbar_thumb.png b/data/skins/coal/scrollbar_thumb.png new file mode 100644 index 000000000..07f86f259 Binary files /dev/null and b/data/skins/coal/scrollbar_thumb.png differ diff --git a/data/skins/coal/select.png b/data/skins/coal/select.png new file mode 100644 index 000000000..d7130732d Binary files /dev/null and b/data/skins/coal/select.png differ diff --git a/data/skins/coal/table_header.png b/data/skins/coal/table_header.png new file mode 100644 index 000000000..902d4d13b Binary files /dev/null and b/data/skins/coal/table_header.png differ diff --git a/data/skins/coal/table_header_down.png b/data/skins/coal/table_header_down.png new file mode 100644 index 000000000..f875afe52 Binary files /dev/null and b/data/skins/coal/table_header_down.png differ diff --git a/data/skins/coal/textbubble.png b/data/skins/coal/textbubble.png new file mode 100644 index 000000000..9a603bc60 Binary files /dev/null and b/data/skins/coal/textbubble.png differ diff --git a/data/skins/coal/textbubble2.png b/data/skins/coal/textbubble2.png new file mode 100644 index 000000000..853d5a500 Binary files /dev/null and b/data/skins/coal/textbubble2.png differ diff --git a/data/skins/common/License.txt b/data/skins/common/License.txt new file mode 100644 index 000000000..62ae18ea9 --- /dev/null +++ b/data/skins/common/License.txt @@ -0,0 +1,5 @@ +glass_section.png licensed under CC-BY-SA 3.0 Unported, By yeKcim (Anthony Carré) + +This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported License. +To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ or send +a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. diff --git a/data/skins/common/background.jpg b/data/skins/common/background.jpg new file mode 100644 index 000000000..d32134516 Binary files /dev/null and b/data/skins/common/background.jpg differ diff --git a/data/skins/common/bottom_bar.png b/data/skins/common/bottom_bar.png new file mode 100644 index 000000000..072a147a0 Binary files /dev/null and b/data/skins/common/bottom_bar.png differ diff --git a/data/skins/common/dialog.png b/data/skins/common/dialog.png new file mode 100644 index 000000000..d095a381d Binary files /dev/null and b/data/skins/common/dialog.png differ diff --git a/data/skins/forest/glass_rsection.png b/data/skins/common/glass_rsection.png similarity index 100% rename from data/skins/forest/glass_rsection.png rename to data/skins/common/glass_rsection.png diff --git a/data/skins/forest/glass_section.png b/data/skins/common/glass_section.png similarity index 100% rename from data/skins/forest/glass_section.png rename to data/skins/common/glass_section.png diff --git a/data/skins/common/glass_square_black.png b/data/skins/common/glass_square_black.png new file mode 100644 index 000000000..c9fef7cdd Binary files /dev/null and b/data/skins/common/glass_square_black.png differ diff --git a/data/skins/common/glass_square_cyan.png b/data/skins/common/glass_square_cyan.png new file mode 100644 index 000000000..6176f1922 Binary files /dev/null and b/data/skins/common/glass_square_cyan.png differ diff --git a/data/skins/common/glass_square_focused_black.png b/data/skins/common/glass_square_focused_black.png new file mode 100644 index 000000000..32d636e9d Binary files /dev/null and b/data/skins/common/glass_square_focused_black.png differ diff --git a/data/skins/peach/glass_square_focused_bw.png b/data/skins/common/glass_square_focused_bw.png similarity index 100% rename from data/skins/peach/glass_square_focused_bw.png rename to data/skins/common/glass_square_focused_bw.png diff --git a/data/skins/forest/glass_square_focused4.png b/data/skins/common/glass_square_focused_cyan.png similarity index 100% rename from data/skins/forest/glass_square_focused4.png rename to data/skins/common/glass_square_focused_cyan.png diff --git a/data/skins/forest/glass_square_focused.png b/data/skins/common/glass_square_focused_green.png similarity index 100% rename from data/skins/forest/glass_square_focused.png rename to data/skins/common/glass_square_focused_green.png diff --git a/data/skins/ruby/glass_square_focused.png b/data/skins/common/glass_square_focused_pink.png similarity index 100% rename from data/skins/ruby/glass_square_focused.png rename to data/skins/common/glass_square_focused_pink.png diff --git a/data/skins/forest/glass_square_focused3.png b/data/skins/common/glass_square_focused_red.png similarity index 100% rename from data/skins/forest/glass_square_focused3.png rename to data/skins/common/glass_square_focused_red.png diff --git a/data/skins/forest/glass_square_focused2.png b/data/skins/common/glass_square_focused_yellow.png similarity index 100% rename from data/skins/forest/glass_square_focused2.png rename to data/skins/common/glass_square_focused_yellow.png diff --git a/data/skins/common/glass_square_green.png b/data/skins/common/glass_square_green.png new file mode 100644 index 000000000..69861a3af Binary files /dev/null and b/data/skins/common/glass_square_green.png differ diff --git a/data/skins/common/glass_square_red.png b/data/skins/common/glass_square_red.png new file mode 100644 index 000000000..5be371284 Binary files /dev/null and b/data/skins/common/glass_square_red.png differ diff --git a/data/skins/common/glass_square_yellow.png b/data/skins/common/glass_square_yellow.png new file mode 100644 index 000000000..3c868581e Binary files /dev/null and b/data/skins/common/glass_square_yellow.png differ diff --git a/data/skins/common/glassbutton_deactivated.png b/data/skins/common/glassbutton_deactivated.png new file mode 100644 index 000000000..d84db698f Binary files /dev/null and b/data/skins/common/glassbutton_deactivated.png differ diff --git a/data/skins/forest/glasscheckbox_checked_deactivated.png b/data/skins/common/glasscheckbox_checked_deactivated.png similarity index 100% rename from data/skins/forest/glasscheckbox_checked_deactivated.png rename to data/skins/common/glasscheckbox_checked_deactivated.png diff --git a/data/skins/forest/glasscheckbox_deactivated.png b/data/skins/common/glasscheckbox_deactivated.png similarity index 100% rename from data/skins/forest/glasscheckbox_deactivated.png rename to data/skins/common/glasscheckbox_deactivated.png diff --git a/data/skins/common/glassspinner.png b/data/skins/common/glassspinner.png new file mode 100644 index 000000000..7baaa5b55 Binary files /dev/null and b/data/skins/common/glassspinner.png differ diff --git a/data/skins/common/glassspinner_deactivated.png b/data/skins/common/glassspinner_deactivated.png new file mode 100644 index 000000000..7baaa5b55 Binary files /dev/null and b/data/skins/common/glassspinner_deactivated.png differ diff --git a/data/skins/common/left_arrow.png b/data/skins/common/left_arrow.png new file mode 100644 index 000000000..fc0116cc6 Binary files /dev/null and b/data/skins/common/left_arrow.png differ diff --git a/data/skins/forest/list_sort_down.png b/data/skins/common/list_sort_down.png similarity index 100% rename from data/skins/forest/list_sort_down.png rename to data/skins/common/list_sort_down.png diff --git a/data/skins/forest/list_sort_up.png b/data/skins/common/list_sort_up.png similarity index 100% rename from data/skins/forest/list_sort_up.png rename to data/skins/common/list_sort_up.png diff --git a/data/skins/common/rating_star.png b/data/skins/common/rating_star.png new file mode 100644 index 000000000..543efe3a2 Binary files /dev/null and b/data/skins/common/rating_star.png differ diff --git a/data/skins/common/right_arrow.png b/data/skins/common/right_arrow.png new file mode 100644 index 000000000..d5e1f99a4 Binary files /dev/null and b/data/skins/common/right_arrow.png differ diff --git a/data/skins/forest/scrollbar_bg.png b/data/skins/common/scrollbar_bg.png similarity index 100% rename from data/skins/forest/scrollbar_bg.png rename to data/skins/common/scrollbar_bg.png diff --git a/data/skins/forest/scrollbar_btn.png b/data/skins/common/scrollbar_btn.png similarity index 100% rename from data/skins/forest/scrollbar_btn.png rename to data/skins/common/scrollbar_btn.png diff --git a/data/skins/forest/table_header.png b/data/skins/common/table_header.png similarity index 100% rename from data/skins/forest/table_header.png rename to data/skins/common/table_header.png diff --git a/data/skins/forest/tooltip.png b/data/skins/common/tooltip.png similarity index 100% rename from data/skins/forest/tooltip.png rename to data/skins/common/tooltip.png diff --git a/data/skins/forest/achievement.png b/data/skins/forest/achievement.png index a6847c795..e3a053ecf 100644 Binary files a/data/skins/forest/achievement.png and b/data/skins/forest/achievement.png differ diff --git a/data/skins/forest/background.jpg b/data/skins/forest/background.jpg deleted file mode 100644 index 06b04709b..000000000 Binary files a/data/skins/forest/background.jpg and /dev/null differ diff --git a/data/skins/forest/bubble.png b/data/skins/forest/bubble.png index dc97ad1c8..bd0ca7ad3 100644 Binary files a/data/skins/forest/bubble.png and b/data/skins/forest/bubble.png differ diff --git a/data/skins/forest/dialog.png b/data/skins/forest/dialog.png deleted file mode 100644 index 02dff0ba7..000000000 Binary files a/data/skins/forest/dialog.png and /dev/null differ diff --git a/data/skins/forest/error.png b/data/skins/forest/error.png index f8ebdb7f5..2ed53a79f 100755 Binary files a/data/skins/forest/error.png and b/data/skins/forest/error.png differ diff --git a/data/skins/forest/friend.png b/data/skins/forest/friend.png index fb9550a72..92a38c842 100644 Binary files a/data/skins/forest/friend.png and b/data/skins/forest/friend.png differ diff --git a/data/skins/forest/generic.png b/data/skins/forest/generic.png index 5352e53f0..e251a71f1 100644 Binary files a/data/skins/forest/generic.png and b/data/skins/forest/generic.png differ diff --git a/data/skins/forest/glass_iconhighlight_focus.png b/data/skins/forest/glass_iconhighlight_focus.png index 17fb5b218..a4c3bdbc0 100644 Binary files a/data/skins/forest/glass_iconhighlight_focus.png and b/data/skins/forest/glass_iconhighlight_focus.png differ diff --git a/data/skins/forest/glass_square1.png b/data/skins/forest/glass_square1.png deleted file mode 100644 index b123039e9..000000000 Binary files a/data/skins/forest/glass_square1.png and /dev/null differ diff --git a/data/skins/forest/glass_square2.png b/data/skins/forest/glass_square2.png deleted file mode 100644 index 795b10cf6..000000000 Binary files a/data/skins/forest/glass_square2.png and /dev/null differ diff --git a/data/skins/forest/glass_square3.png b/data/skins/forest/glass_square3.png deleted file mode 100644 index bd4f33145..000000000 Binary files a/data/skins/forest/glass_square3.png and /dev/null differ diff --git a/data/skins/forest/glass_square4.png b/data/skins/forest/glass_square4.png deleted file mode 100644 index a6e5906a3..000000000 Binary files a/data/skins/forest/glass_square4.png and /dev/null differ diff --git a/data/skins/forest/glass_square_focused_bw.png b/data/skins/forest/glass_square_focused_bw.png deleted file mode 100644 index 300633757..000000000 Binary files a/data/skins/forest/glass_square_focused_bw.png and /dev/null differ diff --git a/data/skins/forest/glassbutton.png b/data/skins/forest/glassbutton.png index a3c555696..2c7f7484d 100644 Binary files a/data/skins/forest/glassbutton.png and b/data/skins/forest/glassbutton.png differ diff --git a/data/skins/forest/glassbutton_deactivated.png b/data/skins/forest/glassbutton_deactivated.png deleted file mode 100644 index 9f292cc04..000000000 Binary files a/data/skins/forest/glassbutton_deactivated.png and /dev/null differ diff --git a/data/skins/forest/glassbutton_focused.png b/data/skins/forest/glassbutton_focused.png index ee79de87e..710b10172 100644 Binary files a/data/skins/forest/glassbutton_focused.png and b/data/skins/forest/glassbutton_focused.png differ diff --git a/data/skins/forest/glasscheckbox.png b/data/skins/forest/glasscheckbox.png index 27d359f39..44d79b26e 100644 Binary files a/data/skins/forest/glasscheckbox.png and b/data/skins/forest/glasscheckbox.png differ diff --git a/data/skins/forest/glasscheckbox_checked.png b/data/skins/forest/glasscheckbox_checked.png index 7b5fd70f5..8c11fe712 100644 Binary files a/data/skins/forest/glasscheckbox_checked.png and b/data/skins/forest/glasscheckbox_checked.png differ diff --git a/data/skins/forest/glasscheckbox_checked_focus.png b/data/skins/forest/glasscheckbox_checked_focus.png index 9d2d0c6aa..e07237a65 100644 Binary files a/data/skins/forest/glasscheckbox_checked_focus.png and b/data/skins/forest/glasscheckbox_checked_focus.png differ diff --git a/data/skins/forest/glasscheckbox_focus.png b/data/skins/forest/glasscheckbox_focus.png index e9cbf3437..efe172e01 100644 Binary files a/data/skins/forest/glasscheckbox_focus.png and b/data/skins/forest/glasscheckbox_focus.png differ diff --git a/data/skins/forest/glasssgauge_fill.png b/data/skins/forest/glasssgauge_fill.png index a96016515..2bab8b6de 100644 Binary files a/data/skins/forest/glasssgauge_fill.png and b/data/skins/forest/glasssgauge_fill.png differ diff --git a/data/skins/forest/glassspinner.png b/data/skins/forest/glassspinner.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/forest/glassspinner.png and /dev/null differ diff --git a/data/skins/forest/glassspinner_deactivated.png b/data/skins/forest/glassspinner_deactivated.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/forest/glassspinner_deactivated.png and /dev/null differ diff --git a/data/skins/forest/glassspinner_down.png b/data/skins/forest/glassspinner_down.png index 8dd0602cc..95874f384 100644 Binary files a/data/skins/forest/glassspinner_down.png and b/data/skins/forest/glassspinner_down.png differ diff --git a/data/skins/forest/glassspinner_focus.png b/data/skins/forest/glassspinner_focus.png index c246a77ea..306afe9d7 100644 Binary files a/data/skins/forest/glassspinner_focus.png and b/data/skins/forest/glassspinner_focus.png differ diff --git a/data/skins/forest/glassspinner_halo.png b/data/skins/forest/glassspinner_halo.png index eb7605829..bc520d4fd 100644 Binary files a/data/skins/forest/glassspinner_halo.png and b/data/skins/forest/glassspinner_halo.png differ diff --git a/data/skins/forest/glasstab.png b/data/skins/forest/glasstab.png index a02f25e22..3afb7296f 100644 Binary files a/data/skins/forest/glasstab.png and b/data/skins/forest/glasstab.png differ diff --git a/data/skins/forest/glasstab_down.png b/data/skins/forest/glasstab_down.png index 7e51a2b57..d8eb14a5b 100644 Binary files a/data/skins/forest/glasstab_down.png and b/data/skins/forest/glasstab_down.png differ diff --git a/data/skins/forest/glasstab_focus.png b/data/skins/forest/glasstab_focus.png index f7de13065..5aa844413 100644 Binary files a/data/skins/forest/glasstab_focus.png and b/data/skins/forest/glasstab_focus.png differ diff --git a/data/skins/forest/glasstab_vert.png b/data/skins/forest/glasstab_vert.png new file mode 100644 index 000000000..e86c93986 Binary files /dev/null and b/data/skins/forest/glasstab_vert.png differ diff --git a/data/skins/forest/glasstab_vert_down.png b/data/skins/forest/glasstab_vert_down.png new file mode 100644 index 000000000..68c585b0a Binary files /dev/null and b/data/skins/forest/glasstab_vert_down.png differ diff --git a/data/skins/forest/glasstab_vert_focus.png b/data/skins/forest/glasstab_vert_focus.png new file mode 100644 index 000000000..d3b77676d Binary files /dev/null and b/data/skins/forest/glasstab_vert_focus.png differ diff --git a/data/skins/forest/left_arrow.png b/data/skins/forest/left_arrow.png deleted file mode 100644 index b80b35828..000000000 Binary files a/data/skins/forest/left_arrow.png and /dev/null differ diff --git a/data/skins/forest/left_arrow_focus.png b/data/skins/forest/left_arrow_focus.png index eeeb4f578..eb13bdca5 100644 Binary files a/data/skins/forest/left_arrow_focus.png and b/data/skins/forest/left_arrow_focus.png differ diff --git a/data/skins/forest/rating_star.png b/data/skins/forest/rating_star.png deleted file mode 100644 index 63e8bc882..000000000 Binary files a/data/skins/forest/rating_star.png and /dev/null differ diff --git a/data/skins/forest/right_arrow.png b/data/skins/forest/right_arrow.png deleted file mode 100644 index 3e176494b..000000000 Binary files a/data/skins/forest/right_arrow.png and /dev/null differ diff --git a/data/skins/forest/right_arrow_focus.png b/data/skins/forest/right_arrow_focus.png index 82c51d2ed..0f4882d27 100644 Binary files a/data/skins/forest/right_arrow_focus.png and b/data/skins/forest/right_arrow_focus.png differ diff --git a/data/skins/forest/scrollbar_btn_down.png b/data/skins/forest/scrollbar_btn_down.png index a5b1ae9f7..ae521dfde 100644 Binary files a/data/skins/forest/scrollbar_btn_down.png and b/data/skins/forest/scrollbar_btn_down.png differ diff --git a/data/skins/forest/scrollbar_thumb.png b/data/skins/forest/scrollbar_thumb.png index f5fd7616c..d76d7b6fe 100644 Binary files a/data/skins/forest/scrollbar_thumb.png and b/data/skins/forest/scrollbar_thumb.png differ diff --git a/data/skins/forest/select.png b/data/skins/forest/select.png index 39896d6f7..ca231fa4e 100644 Binary files a/data/skins/forest/select.png and b/data/skins/forest/select.png differ diff --git a/data/skins/forest/table_header_down.png b/data/skins/forest/table_header_down.png index a4736e61d..8fc05ea0e 100644 Binary files a/data/skins/forest/table_header_down.png and b/data/skins/forest/table_header_down.png differ diff --git a/data/skins/forest/textbubble.png b/data/skins/forest/textbubble.png index f01094108..467802e52 100644 Binary files a/data/skins/forest/textbubble.png and b/data/skins/forest/textbubble.png differ diff --git a/data/skins/forest/textbubble2.png b/data/skins/forest/textbubble2.png index eebf03a92..57574278f 100644 Binary files a/data/skins/forest/textbubble2.png and b/data/skins/forest/textbubble2.png differ diff --git a/data/skins/ocean/achievement.png b/data/skins/ocean/achievement.png index f5044fb7a..adb1fb707 100644 Binary files a/data/skins/ocean/achievement.png and b/data/skins/ocean/achievement.png differ diff --git a/data/skins/ocean/background.jpg b/data/skins/ocean/background.jpg deleted file mode 100644 index 06b04709b..000000000 Binary files a/data/skins/ocean/background.jpg and /dev/null differ diff --git a/data/skins/ocean/bubble.png b/data/skins/ocean/bubble.png index d84d92563..2054ffa6f 100644 Binary files a/data/skins/ocean/bubble.png and b/data/skins/ocean/bubble.png differ diff --git a/data/skins/ocean/dialog.png b/data/skins/ocean/dialog.png deleted file mode 100644 index 02dff0ba7..000000000 Binary files a/data/skins/ocean/dialog.png and /dev/null differ diff --git a/data/skins/ocean/error.png b/data/skins/ocean/error.png index 689c0224c..b22093949 100755 Binary files a/data/skins/ocean/error.png and b/data/skins/ocean/error.png differ diff --git a/data/skins/ocean/friend.png b/data/skins/ocean/friend.png index 415360321..0337377f6 100644 Binary files a/data/skins/ocean/friend.png and b/data/skins/ocean/friend.png differ diff --git a/data/skins/ocean/generic.png b/data/skins/ocean/generic.png index 34c791161..b41bc6c92 100644 Binary files a/data/skins/ocean/generic.png and b/data/skins/ocean/generic.png differ diff --git a/data/skins/ocean/glass_iconhighlight_focus.png b/data/skins/ocean/glass_iconhighlight_focus.png index 5e5f4195b..62918fe35 100644 Binary files a/data/skins/ocean/glass_iconhighlight_focus.png and b/data/skins/ocean/glass_iconhighlight_focus.png differ diff --git a/data/skins/ocean/glass_rsection.png b/data/skins/ocean/glass_rsection.png deleted file mode 100644 index 897e629b5..000000000 Binary files a/data/skins/ocean/glass_rsection.png and /dev/null differ diff --git a/data/skins/ocean/glass_section.png b/data/skins/ocean/glass_section.png deleted file mode 100644 index af8f40645..000000000 Binary files a/data/skins/ocean/glass_section.png and /dev/null differ diff --git a/data/skins/ocean/glass_square1.png b/data/skins/ocean/glass_square1.png deleted file mode 100644 index a6e5906a3..000000000 Binary files a/data/skins/ocean/glass_square1.png and /dev/null differ diff --git a/data/skins/ocean/glass_square2.png b/data/skins/ocean/glass_square2.png deleted file mode 100644 index 795b10cf6..000000000 Binary files a/data/skins/ocean/glass_square2.png and /dev/null differ diff --git a/data/skins/ocean/glass_square3.png b/data/skins/ocean/glass_square3.png deleted file mode 100644 index bd4f33145..000000000 Binary files a/data/skins/ocean/glass_square3.png and /dev/null differ diff --git a/data/skins/ocean/glass_square4.png b/data/skins/ocean/glass_square4.png deleted file mode 100644 index b123039e9..000000000 Binary files a/data/skins/ocean/glass_square4.png and /dev/null differ diff --git a/data/skins/ocean/glass_square_focused.png b/data/skins/ocean/glass_square_focused.png deleted file mode 100644 index d823f2b12..000000000 Binary files a/data/skins/ocean/glass_square_focused.png and /dev/null differ diff --git a/data/skins/ocean/glass_square_focused2.png b/data/skins/ocean/glass_square_focused2.png deleted file mode 100644 index c5985989e..000000000 Binary files a/data/skins/ocean/glass_square_focused2.png and /dev/null differ diff --git a/data/skins/ocean/glass_square_focused3.png b/data/skins/ocean/glass_square_focused3.png deleted file mode 100644 index 531eaa6cf..000000000 Binary files a/data/skins/ocean/glass_square_focused3.png and /dev/null differ diff --git a/data/skins/ocean/glass_square_focused4.png b/data/skins/ocean/glass_square_focused4.png deleted file mode 100644 index cde4b3794..000000000 Binary files a/data/skins/ocean/glass_square_focused4.png and /dev/null differ diff --git a/data/skins/ocean/glass_square_focused_bw.png b/data/skins/ocean/glass_square_focused_bw.png deleted file mode 100644 index 8319920d5..000000000 Binary files a/data/skins/ocean/glass_square_focused_bw.png and /dev/null differ diff --git a/data/skins/ocean/glassbutton.png b/data/skins/ocean/glassbutton.png index ae8985d4a..c34136643 100644 Binary files a/data/skins/ocean/glassbutton.png and b/data/skins/ocean/glassbutton.png differ diff --git a/data/skins/ocean/glassbutton_deactivated.png b/data/skins/ocean/glassbutton_deactivated.png deleted file mode 100644 index 9f292cc04..000000000 Binary files a/data/skins/ocean/glassbutton_deactivated.png and /dev/null differ diff --git a/data/skins/ocean/glassbutton_focused.png b/data/skins/ocean/glassbutton_focused.png index a13f7f6bd..90b427c7a 100644 Binary files a/data/skins/ocean/glassbutton_focused.png and b/data/skins/ocean/glassbutton_focused.png differ diff --git a/data/skins/ocean/glasscheckbox.png b/data/skins/ocean/glasscheckbox.png index be2e1da8b..bac444886 100644 Binary files a/data/skins/ocean/glasscheckbox.png and b/data/skins/ocean/glasscheckbox.png differ diff --git a/data/skins/ocean/glasscheckbox_checked.png b/data/skins/ocean/glasscheckbox_checked.png index 4da054d19..a3231090c 100644 Binary files a/data/skins/ocean/glasscheckbox_checked.png and b/data/skins/ocean/glasscheckbox_checked.png differ diff --git a/data/skins/ocean/glasscheckbox_checked_deactivated.png b/data/skins/ocean/glasscheckbox_checked_deactivated.png deleted file mode 100644 index a7af601ec..000000000 Binary files a/data/skins/ocean/glasscheckbox_checked_deactivated.png and /dev/null differ diff --git a/data/skins/ocean/glasscheckbox_checked_focus.png b/data/skins/ocean/glasscheckbox_checked_focus.png index 85643a316..c77cc8282 100644 Binary files a/data/skins/ocean/glasscheckbox_checked_focus.png and b/data/skins/ocean/glasscheckbox_checked_focus.png differ diff --git a/data/skins/ocean/glasscheckbox_deactivated.png b/data/skins/ocean/glasscheckbox_deactivated.png deleted file mode 100644 index 4c6d85c59..000000000 Binary files a/data/skins/ocean/glasscheckbox_deactivated.png and /dev/null differ diff --git a/data/skins/ocean/glasscheckbox_focus.png b/data/skins/ocean/glasscheckbox_focus.png index 7664b1905..6fd284602 100644 Binary files a/data/skins/ocean/glasscheckbox_focus.png and b/data/skins/ocean/glasscheckbox_focus.png differ diff --git a/data/skins/ocean/glassspinner.png b/data/skins/ocean/glassspinner.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/ocean/glassspinner.png and /dev/null differ diff --git a/data/skins/ocean/glassspinner_deactivated.png b/data/skins/ocean/glassspinner_deactivated.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/ocean/glassspinner_deactivated.png and /dev/null differ diff --git a/data/skins/ocean/glassspinner_down.png b/data/skins/ocean/glassspinner_down.png index c8ce88ea4..f000e5ea8 100644 Binary files a/data/skins/ocean/glassspinner_down.png and b/data/skins/ocean/glassspinner_down.png differ diff --git a/data/skins/ocean/glassspinner_focus.png b/data/skins/ocean/glassspinner_focus.png index 38a6fbcd2..7429c8b3b 100644 Binary files a/data/skins/ocean/glassspinner_focus.png and b/data/skins/ocean/glassspinner_focus.png differ diff --git a/data/skins/ocean/glassspinner_halo.png b/data/skins/ocean/glassspinner_halo.png index 4f50036b0..b07a50184 100644 Binary files a/data/skins/ocean/glassspinner_halo.png and b/data/skins/ocean/glassspinner_halo.png differ diff --git a/data/skins/ocean/glasstab.png b/data/skins/ocean/glasstab.png index 3894a975d..7878f5d54 100644 Binary files a/data/skins/ocean/glasstab.png and b/data/skins/ocean/glasstab.png differ diff --git a/data/skins/ocean/glasstab_down.png b/data/skins/ocean/glasstab_down.png index d6f25eb6a..60778b5a7 100644 Binary files a/data/skins/ocean/glasstab_down.png and b/data/skins/ocean/glasstab_down.png differ diff --git a/data/skins/ocean/glasstab_focus.png b/data/skins/ocean/glasstab_focus.png index 1e6593489..c25912874 100644 Binary files a/data/skins/ocean/glasstab_focus.png and b/data/skins/ocean/glasstab_focus.png differ diff --git a/data/skins/ocean/glasstab_vert.png b/data/skins/ocean/glasstab_vert.png new file mode 100644 index 000000000..db7dfe8dd Binary files /dev/null and b/data/skins/ocean/glasstab_vert.png differ diff --git a/data/skins/ocean/glasstab_vert_down.png b/data/skins/ocean/glasstab_vert_down.png new file mode 100644 index 000000000..f18f1151b Binary files /dev/null and b/data/skins/ocean/glasstab_vert_down.png differ diff --git a/data/skins/ocean/glasstab_vert_focus.png b/data/skins/ocean/glasstab_vert_focus.png new file mode 100644 index 000000000..75c6b8c93 Binary files /dev/null and b/data/skins/ocean/glasstab_vert_focus.png differ diff --git a/data/skins/ocean/left_arrow.png b/data/skins/ocean/left_arrow.png deleted file mode 100644 index b80b35828..000000000 Binary files a/data/skins/ocean/left_arrow.png and /dev/null differ diff --git a/data/skins/ocean/left_arrow_focus.png b/data/skins/ocean/left_arrow_focus.png index 450d12a5f..e378b9a51 100644 Binary files a/data/skins/ocean/left_arrow_focus.png and b/data/skins/ocean/left_arrow_focus.png differ diff --git a/data/skins/ocean/list_sort_down.png b/data/skins/ocean/list_sort_down.png deleted file mode 100644 index aa6029ee0..000000000 Binary files a/data/skins/ocean/list_sort_down.png and /dev/null differ diff --git a/data/skins/ocean/list_sort_up.png b/data/skins/ocean/list_sort_up.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/ocean/list_sort_up.png and /dev/null differ diff --git a/data/skins/ocean/rating_star.png b/data/skins/ocean/rating_star.png deleted file mode 100644 index 63e8bc882..000000000 Binary files a/data/skins/ocean/rating_star.png and /dev/null differ diff --git a/data/skins/ocean/right_arrow.png b/data/skins/ocean/right_arrow.png deleted file mode 100644 index 3e176494b..000000000 Binary files a/data/skins/ocean/right_arrow.png and /dev/null differ diff --git a/data/skins/ocean/right_arrow_focus.png b/data/skins/ocean/right_arrow_focus.png index ae46ff811..0351116ec 100644 Binary files a/data/skins/ocean/right_arrow_focus.png and b/data/skins/ocean/right_arrow_focus.png differ diff --git a/data/skins/ocean/scrollbar_bg.png b/data/skins/ocean/scrollbar_bg.png deleted file mode 100644 index c224da819..000000000 Binary files a/data/skins/ocean/scrollbar_bg.png and /dev/null differ diff --git a/data/skins/ocean/scrollbar_btn.png b/data/skins/ocean/scrollbar_btn.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/ocean/scrollbar_btn.png and /dev/null differ diff --git a/data/skins/ocean/table_header.png b/data/skins/ocean/table_header.png deleted file mode 100644 index 19b3ac0ce..000000000 Binary files a/data/skins/ocean/table_header.png and /dev/null differ diff --git a/data/skins/ocean/textbubble.png b/data/skins/ocean/textbubble.png index e39cf5e9a..0f451f9fb 100644 Binary files a/data/skins/ocean/textbubble.png and b/data/skins/ocean/textbubble.png differ diff --git a/data/skins/ocean/textbubble2.png b/data/skins/ocean/textbubble2.png index 7664b1905..6fd284602 100644 Binary files a/data/skins/ocean/textbubble2.png and b/data/skins/ocean/textbubble2.png differ diff --git a/data/skins/ocean/tooltip.png b/data/skins/ocean/tooltip.png deleted file mode 100644 index d08dda6d7..000000000 Binary files a/data/skins/ocean/tooltip.png and /dev/null differ diff --git a/data/skins/peach/achievement.png b/data/skins/peach/achievement.png index b2d4585a8..620760ccd 100644 Binary files a/data/skins/peach/achievement.png and b/data/skins/peach/achievement.png differ diff --git a/data/skins/peach/background.jpg b/data/skins/peach/background.jpg deleted file mode 100644 index 06b04709b..000000000 Binary files a/data/skins/peach/background.jpg and /dev/null differ diff --git a/data/skins/peach/bubble.png b/data/skins/peach/bubble.png index 05a5ed4f3..f1d7b61f3 100644 Binary files a/data/skins/peach/bubble.png and b/data/skins/peach/bubble.png differ diff --git a/data/skins/peach/dialog.png b/data/skins/peach/dialog.png deleted file mode 100644 index d1213b481..000000000 Binary files a/data/skins/peach/dialog.png and /dev/null differ diff --git a/data/skins/peach/error.png b/data/skins/peach/error.png index 2597e9c75..c785f0085 100755 Binary files a/data/skins/peach/error.png and b/data/skins/peach/error.png differ diff --git a/data/skins/peach/friend.png b/data/skins/peach/friend.png index 9238c8add..b67af40af 100644 Binary files a/data/skins/peach/friend.png and b/data/skins/peach/friend.png differ diff --git a/data/skins/peach/generic.png b/data/skins/peach/generic.png index 57c34ec29..5ecefea4f 100644 Binary files a/data/skins/peach/generic.png and b/data/skins/peach/generic.png differ diff --git a/data/skins/peach/glass_iconhighlight_focus.png b/data/skins/peach/glass_iconhighlight_focus.png index ec5c71e6e..825869b61 100644 Binary files a/data/skins/peach/glass_iconhighlight_focus.png and b/data/skins/peach/glass_iconhighlight_focus.png differ diff --git a/data/skins/peach/glass_rsection.png b/data/skins/peach/glass_rsection.png deleted file mode 100644 index 897e629b5..000000000 Binary files a/data/skins/peach/glass_rsection.png and /dev/null differ diff --git a/data/skins/peach/glass_section.png b/data/skins/peach/glass_section.png deleted file mode 100644 index af8f40645..000000000 Binary files a/data/skins/peach/glass_section.png and /dev/null differ diff --git a/data/skins/peach/glass_square1.png b/data/skins/peach/glass_square1.png deleted file mode 100644 index bd4f33145..000000000 Binary files a/data/skins/peach/glass_square1.png and /dev/null differ diff --git a/data/skins/peach/glass_square2.png b/data/skins/peach/glass_square2.png deleted file mode 100644 index a6e5906a3..000000000 Binary files a/data/skins/peach/glass_square2.png and /dev/null differ diff --git a/data/skins/peach/glass_square3.png b/data/skins/peach/glass_square3.png deleted file mode 100644 index b123039e9..000000000 Binary files a/data/skins/peach/glass_square3.png and /dev/null differ diff --git a/data/skins/peach/glass_square4.png b/data/skins/peach/glass_square4.png deleted file mode 100644 index 795b10cf6..000000000 Binary files a/data/skins/peach/glass_square4.png and /dev/null differ diff --git a/data/skins/peach/glass_square_focused.png b/data/skins/peach/glass_square_focused.png deleted file mode 100644 index 531eaa6cf..000000000 Binary files a/data/skins/peach/glass_square_focused.png and /dev/null differ diff --git a/data/skins/peach/glass_square_focused2.png b/data/skins/peach/glass_square_focused2.png deleted file mode 100644 index d823f2b12..000000000 Binary files a/data/skins/peach/glass_square_focused2.png and /dev/null differ diff --git a/data/skins/peach/glass_square_focused3.png b/data/skins/peach/glass_square_focused3.png deleted file mode 100644 index cde4b3794..000000000 Binary files a/data/skins/peach/glass_square_focused3.png and /dev/null differ diff --git a/data/skins/peach/glass_square_focused4.png b/data/skins/peach/glass_square_focused4.png deleted file mode 100644 index c5985989e..000000000 Binary files a/data/skins/peach/glass_square_focused4.png and /dev/null differ diff --git a/data/skins/peach/glassbutton.png b/data/skins/peach/glassbutton.png index 593e4be84..d2a29a981 100644 Binary files a/data/skins/peach/glassbutton.png and b/data/skins/peach/glassbutton.png differ diff --git a/data/skins/peach/glassbutton_deactivated.png b/data/skins/peach/glassbutton_deactivated.png deleted file mode 100644 index 9f292cc04..000000000 Binary files a/data/skins/peach/glassbutton_deactivated.png and /dev/null differ diff --git a/data/skins/peach/glassbutton_focused.png b/data/skins/peach/glassbutton_focused.png index 547b06cb3..7ee5d6bd9 100644 Binary files a/data/skins/peach/glassbutton_focused.png and b/data/skins/peach/glassbutton_focused.png differ diff --git a/data/skins/peach/glasscheckbox.png b/data/skins/peach/glasscheckbox.png index 68c5466e6..905a98859 100644 Binary files a/data/skins/peach/glasscheckbox.png and b/data/skins/peach/glasscheckbox.png differ diff --git a/data/skins/peach/glasscheckbox_checked.png b/data/skins/peach/glasscheckbox_checked.png index 09cc593e6..537692d94 100644 Binary files a/data/skins/peach/glasscheckbox_checked.png and b/data/skins/peach/glasscheckbox_checked.png differ diff --git a/data/skins/peach/glasscheckbox_checked_deactivated.png b/data/skins/peach/glasscheckbox_checked_deactivated.png deleted file mode 100644 index a7af601ec..000000000 Binary files a/data/skins/peach/glasscheckbox_checked_deactivated.png and /dev/null differ diff --git a/data/skins/peach/glasscheckbox_checked_focus.png b/data/skins/peach/glasscheckbox_checked_focus.png index 482a55b42..fc77eebdc 100644 Binary files a/data/skins/peach/glasscheckbox_checked_focus.png and b/data/skins/peach/glasscheckbox_checked_focus.png differ diff --git a/data/skins/peach/glasscheckbox_deactivated.png b/data/skins/peach/glasscheckbox_deactivated.png deleted file mode 100644 index 4c6d85c59..000000000 Binary files a/data/skins/peach/glasscheckbox_deactivated.png and /dev/null differ diff --git a/data/skins/peach/glasscheckbox_focus.png b/data/skins/peach/glasscheckbox_focus.png index c936daeca..8046d6853 100644 Binary files a/data/skins/peach/glasscheckbox_focus.png and b/data/skins/peach/glasscheckbox_focus.png differ diff --git a/data/skins/peach/glassspinner.png b/data/skins/peach/glassspinner.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/peach/glassspinner.png and /dev/null differ diff --git a/data/skins/peach/glassspinner_deactivated.png b/data/skins/peach/glassspinner_deactivated.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/peach/glassspinner_deactivated.png and /dev/null differ diff --git a/data/skins/peach/glassspinner_down.png b/data/skins/peach/glassspinner_down.png index a57fac4a7..5cf9ce404 100644 Binary files a/data/skins/peach/glassspinner_down.png and b/data/skins/peach/glassspinner_down.png differ diff --git a/data/skins/peach/glassspinner_focus.png b/data/skins/peach/glassspinner_focus.png index c109799c9..6abce09f4 100644 Binary files a/data/skins/peach/glassspinner_focus.png and b/data/skins/peach/glassspinner_focus.png differ diff --git a/data/skins/peach/glassspinner_halo.png b/data/skins/peach/glassspinner_halo.png index 2dacb2df0..c8a97f605 100644 Binary files a/data/skins/peach/glassspinner_halo.png and b/data/skins/peach/glassspinner_halo.png differ diff --git a/data/skins/peach/glasstab.png b/data/skins/peach/glasstab.png index 13e9520d2..7a39a9ef4 100644 Binary files a/data/skins/peach/glasstab.png and b/data/skins/peach/glasstab.png differ diff --git a/data/skins/peach/glasstab_down.png b/data/skins/peach/glasstab_down.png index 40c554282..6849a0df7 100644 Binary files a/data/skins/peach/glasstab_down.png and b/data/skins/peach/glasstab_down.png differ diff --git a/data/skins/peach/glasstab_focus.png b/data/skins/peach/glasstab_focus.png index aeade5fb5..32468500d 100644 Binary files a/data/skins/peach/glasstab_focus.png and b/data/skins/peach/glasstab_focus.png differ diff --git a/data/skins/peach/glasstab_vert.png b/data/skins/peach/glasstab_vert.png new file mode 100644 index 000000000..01bcc2e0b Binary files /dev/null and b/data/skins/peach/glasstab_vert.png differ diff --git a/data/skins/peach/glasstab_vert_down.png b/data/skins/peach/glasstab_vert_down.png new file mode 100644 index 000000000..c0b04b536 Binary files /dev/null and b/data/skins/peach/glasstab_vert_down.png differ diff --git a/data/skins/peach/glasstab_vert_focus.png b/data/skins/peach/glasstab_vert_focus.png new file mode 100644 index 000000000..1ccd4f25e Binary files /dev/null and b/data/skins/peach/glasstab_vert_focus.png differ diff --git a/data/skins/peach/left_arrow.png b/data/skins/peach/left_arrow.png deleted file mode 100644 index b80b35828..000000000 Binary files a/data/skins/peach/left_arrow.png and /dev/null differ diff --git a/data/skins/peach/left_arrow_focus.png b/data/skins/peach/left_arrow_focus.png index 7aa854221..623876c5e 100644 Binary files a/data/skins/peach/left_arrow_focus.png and b/data/skins/peach/left_arrow_focus.png differ diff --git a/data/skins/peach/list_sort_down.png b/data/skins/peach/list_sort_down.png deleted file mode 100644 index aa6029ee0..000000000 Binary files a/data/skins/peach/list_sort_down.png and /dev/null differ diff --git a/data/skins/peach/list_sort_up.png b/data/skins/peach/list_sort_up.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/peach/list_sort_up.png and /dev/null differ diff --git a/data/skins/peach/rating_star.png b/data/skins/peach/rating_star.png deleted file mode 100644 index 63e8bc882..000000000 Binary files a/data/skins/peach/rating_star.png and /dev/null differ diff --git a/data/skins/peach/right_arrow.png b/data/skins/peach/right_arrow.png deleted file mode 100644 index 3e176494b..000000000 Binary files a/data/skins/peach/right_arrow.png and /dev/null differ diff --git a/data/skins/peach/right_arrow_focus.png b/data/skins/peach/right_arrow_focus.png index 2998c35fe..5c4a3f435 100644 Binary files a/data/skins/peach/right_arrow_focus.png and b/data/skins/peach/right_arrow_focus.png differ diff --git a/data/skins/peach/scrollbar_bg.png b/data/skins/peach/scrollbar_bg.png deleted file mode 100644 index c224da819..000000000 Binary files a/data/skins/peach/scrollbar_bg.png and /dev/null differ diff --git a/data/skins/peach/scrollbar_btn.png b/data/skins/peach/scrollbar_btn.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/peach/scrollbar_btn.png and /dev/null differ diff --git a/data/skins/peach/scrollbar_thumb.png b/data/skins/peach/scrollbar_thumb.png index c78d391c6..087a0ad84 100644 Binary files a/data/skins/peach/scrollbar_thumb.png and b/data/skins/peach/scrollbar_thumb.png differ diff --git a/data/skins/peach/table_header.png b/data/skins/peach/table_header.png deleted file mode 100644 index 19b3ac0ce..000000000 Binary files a/data/skins/peach/table_header.png and /dev/null differ diff --git a/data/skins/peach/textbubble.png b/data/skins/peach/textbubble.png index e7ec9a84b..fa6e84ab1 100644 Binary files a/data/skins/peach/textbubble.png and b/data/skins/peach/textbubble.png differ diff --git a/data/skins/peach/textbubble2.png b/data/skins/peach/textbubble2.png index c936daeca..8046d6853 100644 Binary files a/data/skins/peach/textbubble2.png and b/data/skins/peach/textbubble2.png differ diff --git a/data/skins/peach/tooltip.png b/data/skins/peach/tooltip.png deleted file mode 100644 index d08dda6d7..000000000 Binary files a/data/skins/peach/tooltip.png and /dev/null differ diff --git a/data/skins/ruby/achievement.png b/data/skins/ruby/achievement.png index 2ed160708..0186a467a 100644 Binary files a/data/skins/ruby/achievement.png and b/data/skins/ruby/achievement.png differ diff --git a/data/skins/ruby/background.jpg b/data/skins/ruby/background.jpg deleted file mode 100644 index 06b04709b..000000000 Binary files a/data/skins/ruby/background.jpg and /dev/null differ diff --git a/data/skins/ruby/bubble.png b/data/skins/ruby/bubble.png index e61c1bba1..fc13eba73 100644 Binary files a/data/skins/ruby/bubble.png and b/data/skins/ruby/bubble.png differ diff --git a/data/skins/ruby/dialog.png b/data/skins/ruby/dialog.png deleted file mode 100644 index d1213b481..000000000 Binary files a/data/skins/ruby/dialog.png and /dev/null differ diff --git a/data/skins/ruby/error.png b/data/skins/ruby/error.png index 6aea328a7..f2060d31a 100755 Binary files a/data/skins/ruby/error.png and b/data/skins/ruby/error.png differ diff --git a/data/skins/ruby/friend.png b/data/skins/ruby/friend.png index 56ef4a8cc..6fe2a55cf 100644 Binary files a/data/skins/ruby/friend.png and b/data/skins/ruby/friend.png differ diff --git a/data/skins/ruby/generic.png b/data/skins/ruby/generic.png index a4bcee9c6..521bf12f8 100644 Binary files a/data/skins/ruby/generic.png and b/data/skins/ruby/generic.png differ diff --git a/data/skins/ruby/glass_iconhighlight_focus.png b/data/skins/ruby/glass_iconhighlight_focus.png index cb6696c2f..15e7e2e4b 100644 Binary files a/data/skins/ruby/glass_iconhighlight_focus.png and b/data/skins/ruby/glass_iconhighlight_focus.png differ diff --git a/data/skins/ruby/glass_rsection.png b/data/skins/ruby/glass_rsection.png deleted file mode 100644 index 897e629b5..000000000 Binary files a/data/skins/ruby/glass_rsection.png and /dev/null differ diff --git a/data/skins/ruby/glass_section.png b/data/skins/ruby/glass_section.png deleted file mode 100644 index af8f40645..000000000 Binary files a/data/skins/ruby/glass_section.png and /dev/null differ diff --git a/data/skins/ruby/glass_square1.png b/data/skins/ruby/glass_square1.png deleted file mode 100644 index bd4f33145..000000000 Binary files a/data/skins/ruby/glass_square1.png and /dev/null differ diff --git a/data/skins/ruby/glass_square2.png b/data/skins/ruby/glass_square2.png deleted file mode 100644 index a6e5906a3..000000000 Binary files a/data/skins/ruby/glass_square2.png and /dev/null differ diff --git a/data/skins/ruby/glass_square3.png b/data/skins/ruby/glass_square3.png deleted file mode 100644 index b123039e9..000000000 Binary files a/data/skins/ruby/glass_square3.png and /dev/null differ diff --git a/data/skins/ruby/glass_square4.png b/data/skins/ruby/glass_square4.png deleted file mode 100644 index 795b10cf6..000000000 Binary files a/data/skins/ruby/glass_square4.png and /dev/null differ diff --git a/data/skins/ruby/glass_square_focused2.png b/data/skins/ruby/glass_square_focused2.png deleted file mode 100644 index d823f2b12..000000000 Binary files a/data/skins/ruby/glass_square_focused2.png and /dev/null differ diff --git a/data/skins/ruby/glass_square_focused3.png b/data/skins/ruby/glass_square_focused3.png deleted file mode 100644 index cde4b3794..000000000 Binary files a/data/skins/ruby/glass_square_focused3.png and /dev/null differ diff --git a/data/skins/ruby/glass_square_focused4.png b/data/skins/ruby/glass_square_focused4.png deleted file mode 100644 index c5985989e..000000000 Binary files a/data/skins/ruby/glass_square_focused4.png and /dev/null differ diff --git a/data/skins/ruby/glass_square_focused_bw.png b/data/skins/ruby/glass_square_focused_bw.png deleted file mode 100644 index 5ca9e5454..000000000 Binary files a/data/skins/ruby/glass_square_focused_bw.png and /dev/null differ diff --git a/data/skins/ruby/glassbutton.png b/data/skins/ruby/glassbutton.png index 4bedac093..f8c9e6937 100644 Binary files a/data/skins/ruby/glassbutton.png and b/data/skins/ruby/glassbutton.png differ diff --git a/data/skins/ruby/glassbutton_deactivated.png b/data/skins/ruby/glassbutton_deactivated.png deleted file mode 100644 index 9f292cc04..000000000 Binary files a/data/skins/ruby/glassbutton_deactivated.png and /dev/null differ diff --git a/data/skins/ruby/glassbutton_focused.png b/data/skins/ruby/glassbutton_focused.png index 17417e925..6affed5e2 100644 Binary files a/data/skins/ruby/glassbutton_focused.png and b/data/skins/ruby/glassbutton_focused.png differ diff --git a/data/skins/ruby/glasscheckbox.png b/data/skins/ruby/glasscheckbox.png index e6e2fbff8..266d6e410 100644 Binary files a/data/skins/ruby/glasscheckbox.png and b/data/skins/ruby/glasscheckbox.png differ diff --git a/data/skins/ruby/glasscheckbox_checked.png b/data/skins/ruby/glasscheckbox_checked.png index 5ad4ff025..dccac59a4 100644 Binary files a/data/skins/ruby/glasscheckbox_checked.png and b/data/skins/ruby/glasscheckbox_checked.png differ diff --git a/data/skins/ruby/glasscheckbox_checked_deactivated.png b/data/skins/ruby/glasscheckbox_checked_deactivated.png deleted file mode 100644 index a7af601ec..000000000 Binary files a/data/skins/ruby/glasscheckbox_checked_deactivated.png and /dev/null differ diff --git a/data/skins/ruby/glasscheckbox_checked_focus.png b/data/skins/ruby/glasscheckbox_checked_focus.png index 4cfdd05ce..030d67686 100644 Binary files a/data/skins/ruby/glasscheckbox_checked_focus.png and b/data/skins/ruby/glasscheckbox_checked_focus.png differ diff --git a/data/skins/ruby/glasscheckbox_deactivated.png b/data/skins/ruby/glasscheckbox_deactivated.png deleted file mode 100644 index 4c6d85c59..000000000 Binary files a/data/skins/ruby/glasscheckbox_deactivated.png and /dev/null differ diff --git a/data/skins/ruby/glasscheckbox_focus.png b/data/skins/ruby/glasscheckbox_focus.png index 626f8322f..62d96af74 100644 Binary files a/data/skins/ruby/glasscheckbox_focus.png and b/data/skins/ruby/glasscheckbox_focus.png differ diff --git a/data/skins/ruby/glassspinner.png b/data/skins/ruby/glassspinner.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/ruby/glassspinner.png and /dev/null differ diff --git a/data/skins/ruby/glassspinner_deactivated.png b/data/skins/ruby/glassspinner_deactivated.png deleted file mode 100644 index a55cbd1e5..000000000 Binary files a/data/skins/ruby/glassspinner_deactivated.png and /dev/null differ diff --git a/data/skins/ruby/glassspinner_down.png b/data/skins/ruby/glassspinner_down.png index 9aede871d..ba8c9cb22 100644 Binary files a/data/skins/ruby/glassspinner_down.png and b/data/skins/ruby/glassspinner_down.png differ diff --git a/data/skins/ruby/glassspinner_focus.png b/data/skins/ruby/glassspinner_focus.png index 28789cc51..6c60bac5b 100644 Binary files a/data/skins/ruby/glassspinner_focus.png and b/data/skins/ruby/glassspinner_focus.png differ diff --git a/data/skins/ruby/glassspinner_halo.png b/data/skins/ruby/glassspinner_halo.png index a4b461e63..a587835a1 100644 Binary files a/data/skins/ruby/glassspinner_halo.png and b/data/skins/ruby/glassspinner_halo.png differ diff --git a/data/skins/ruby/glasstab.png b/data/skins/ruby/glasstab.png index 6fc40bdb2..2b92cc4fb 100644 Binary files a/data/skins/ruby/glasstab.png and b/data/skins/ruby/glasstab.png differ diff --git a/data/skins/ruby/glasstab_down.png b/data/skins/ruby/glasstab_down.png index 4ac51066a..91cf44458 100644 Binary files a/data/skins/ruby/glasstab_down.png and b/data/skins/ruby/glasstab_down.png differ diff --git a/data/skins/ruby/glasstab_focus.png b/data/skins/ruby/glasstab_focus.png index 3015545f0..38a86f49a 100644 Binary files a/data/skins/ruby/glasstab_focus.png and b/data/skins/ruby/glasstab_focus.png differ diff --git a/data/skins/ruby/glasstab_vert.png b/data/skins/ruby/glasstab_vert.png new file mode 100644 index 000000000..385bf211a Binary files /dev/null and b/data/skins/ruby/glasstab_vert.png differ diff --git a/data/skins/ruby/glasstab_vert_down.png b/data/skins/ruby/glasstab_vert_down.png new file mode 100644 index 000000000..275fa8518 Binary files /dev/null and b/data/skins/ruby/glasstab_vert_down.png differ diff --git a/data/skins/ruby/glasstab_vert_focus.png b/data/skins/ruby/glasstab_vert_focus.png new file mode 100644 index 000000000..a9b0425df Binary files /dev/null and b/data/skins/ruby/glasstab_vert_focus.png differ diff --git a/data/skins/ruby/left_arrow.png b/data/skins/ruby/left_arrow.png deleted file mode 100644 index b80b35828..000000000 Binary files a/data/skins/ruby/left_arrow.png and /dev/null differ diff --git a/data/skins/ruby/left_arrow_focus.png b/data/skins/ruby/left_arrow_focus.png index 011cdbd67..22ec1bbdb 100644 Binary files a/data/skins/ruby/left_arrow_focus.png and b/data/skins/ruby/left_arrow_focus.png differ diff --git a/data/skins/ruby/list_sort_down.png b/data/skins/ruby/list_sort_down.png deleted file mode 100644 index aa6029ee0..000000000 Binary files a/data/skins/ruby/list_sort_down.png and /dev/null differ diff --git a/data/skins/ruby/list_sort_up.png b/data/skins/ruby/list_sort_up.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/ruby/list_sort_up.png and /dev/null differ diff --git a/data/skins/ruby/rating_star.png b/data/skins/ruby/rating_star.png deleted file mode 100644 index 63e8bc882..000000000 Binary files a/data/skins/ruby/rating_star.png and /dev/null differ diff --git a/data/skins/ruby/right_arrow.png b/data/skins/ruby/right_arrow.png deleted file mode 100644 index 3e176494b..000000000 Binary files a/data/skins/ruby/right_arrow.png and /dev/null differ diff --git a/data/skins/ruby/right_arrow_focus.png b/data/skins/ruby/right_arrow_focus.png index d5c6dc594..3c13f86aa 100644 Binary files a/data/skins/ruby/right_arrow_focus.png and b/data/skins/ruby/right_arrow_focus.png differ diff --git a/data/skins/ruby/scrollbar_bg.png b/data/skins/ruby/scrollbar_bg.png deleted file mode 100644 index c224da819..000000000 Binary files a/data/skins/ruby/scrollbar_bg.png and /dev/null differ diff --git a/data/skins/ruby/scrollbar_btn.png b/data/skins/ruby/scrollbar_btn.png deleted file mode 100644 index 705bc0109..000000000 Binary files a/data/skins/ruby/scrollbar_btn.png and /dev/null differ diff --git a/data/skins/ruby/table_header.png b/data/skins/ruby/table_header.png deleted file mode 100644 index 19b3ac0ce..000000000 Binary files a/data/skins/ruby/table_header.png and /dev/null differ diff --git a/data/skins/ruby/textbubble.png b/data/skins/ruby/textbubble.png index 64be7f369..13dd202ce 100644 Binary files a/data/skins/ruby/textbubble.png and b/data/skins/ruby/textbubble.png differ diff --git a/data/skins/ruby/textbubble2.png b/data/skins/ruby/textbubble2.png index f2d9fef07..62d96af74 100644 Binary files a/data/skins/ruby/textbubble2.png and b/data/skins/ruby/textbubble2.png differ diff --git a/data/skins/ruby/tooltip.png b/data/skins/ruby/tooltip.png deleted file mode 100644 index d08dda6d7..000000000 Binary files a/data/skins/ruby/tooltip.png and /dev/null differ diff --git a/src/graphics/graphics_restrictions.cpp b/src/graphics/graphics_restrictions.cpp index f7c1d50d8..e7cdb5e53 100644 --- a/src/graphics/graphics_restrictions.cpp +++ b/src/graphics/graphics_restrictions.cpp @@ -266,7 +266,7 @@ public: { return !this->operator==(other); } // operator!= - // ------------------------------------------------------------------------ + // ------------------------------------------------------------------------ /** If *this < other. */ bool operator< (const Version &other) const { @@ -296,6 +296,36 @@ public: else return true; } // operator<= + // ------------------------------------------------------------------------ + /** If *this > other. */ + bool operator> (const Version &other) const + { + unsigned int min_n = (unsigned int)std::min(m_version.size(), other.m_version.size()); + for (unsigned int i = 0; i other.m_version[i]) return true; + if (m_version[i] < other.m_version[i]) return false; + } + if (m_version.size() > other.m_version.size()) + return true; + else + return false; + } // operator> + // ------------------------------------------------------------------------ + /** If *this >= other. */ + bool operator>= (const Version &other) const + { + unsigned int min_n = (unsigned int)std::min(m_version.size(), other.m_version.size()); + for (unsigned int i = 0; i other.m_version[i]) return true; + if (m_version[i] < other.m_version[i]) return false; + } + if (m_version.size() >= other.m_version.size()) + return true; + else + return false; + } // operator>= }; // class Version // ============================================================================ @@ -309,12 +339,21 @@ private: std::string m_card_name; /** Operators to test version numbers with. */ - enum {VERSION_IGNORE, VERSION_EQUAL, VERSION_LESS, - VERSION_LESS_EQUAL} m_version_test; - + enum VersionTest + { + VERSION_IGNORE, + VERSION_EQUAL, + VERSION_LESS, + VERSION_LESS_EQUAL, + VERSION_MORE, + VERSION_MORE_EQUAL + }; + + std::vector m_version_tests; + /** Driver version for which this rule applies. */ - Version m_driver_version; - + std::vector m_driver_versions; + /** For which OS this rule applies. */ std::string m_os; @@ -323,17 +362,17 @@ private: /** Which options to disable. */ std::vector m_disable_options; + public: Rule(const XMLNode *rule) { - m_version_test = VERSION_IGNORE; m_card_test = CARD_IGNORE; - if(rule->get("is", &m_card_name)) + if (rule->get("is", &m_card_name)) { m_card_test = CARD_IS; } - else if(rule->get("contains", &m_card_name)) + else if (rule->get("contains", &m_card_name)) { m_card_test = CARD_CONTAINS; } @@ -342,34 +381,64 @@ public: rule->get("vendor", &m_vendor); std::string s; - if(rule->get("version", &s) && s.size()>1) + + if (rule->get("version", &s) && s.size() > 1) { - if(s.substr(0, 2)=="<=") - { - m_version_test = VERSION_LESS_EQUAL; - s = s.substr(2, s.size()); - } - else if(s[0]=='<') - { - m_version_test = VERSION_LESS; - s.erase(s.begin()); - } - else if(s[0]=='=') - { - m_version_test = VERSION_EQUAL; - s.erase(s.begin()); - } - else - { - Log::warn("Graphics", "Invalid verison '%s' found - ignored.", - s.c_str()); - } - m_driver_version = Version(s); - } // has version + addVersion(s); + } + + if (rule->get("version2", &s) && s.size() > 1) + { + addVersion(s); + } - if(rule->get("disable", &s)) + if (rule->get("disable", &s)) + { m_disable_options = StringUtils::split(s, ' '); + } } // Rule + + // ------------------------------------------------------------------------ + void addVersion(std::string version) + { + if (version.substr(0, 2) == "<=") + { + m_version_tests.push_back(VERSION_LESS_EQUAL); + version = version.substr(2, version.size()); + } + else if (version[0] == '<') + { + m_version_tests.push_back(VERSION_LESS); + version.erase(version.begin()); + } + else if (version.substr(0, 2) == ">=") + { + m_version_tests.push_back(VERSION_MORE_EQUAL); + version = version.substr(2, version.size()); + } + else if (version[0] == '>') + { + m_version_tests.push_back(VERSION_MORE); + version.erase(version.begin()); + } + else if (version[0] == '=') + { + m_version_tests.push_back(VERSION_EQUAL); + version.erase(version.begin()); + } + else + { + m_version_tests.push_back(VERSION_IGNORE); + Log::warn("Graphics", "Invalid verison '%s' found - ignored.", + version.c_str()); + } + + if (m_version_tests.back() != VERSION_IGNORE) + { + m_driver_versions.push_back(Version(version)); + } + } + // ------------------------------------------------------------------------ bool applies(const std::string &card, const Version &version, const std::string &vendor) const @@ -417,20 +486,38 @@ public: // Test for driver version // ----------------------- - switch(m_version_test) + assert(m_version_tests.size() == m_driver_versions.size()); + + for (unsigned int i = 0; i < m_version_tests.size(); i++) { - case VERSION_IGNORE: break; // always true - case VERSION_EQUAL: if(!(version==m_driver_version)) return false; - break; - case VERSION_LESS_EQUAL: - if (!(version <= m_driver_version)) return false; - break; - case VERSION_LESS: - if (!(version < m_driver_version )) return false; - break; - } // switch m_version_test + switch (m_version_tests[i]) + { + case VERSION_IGNORE: + // always true + break; + case VERSION_EQUAL: + if (version != m_driver_versions[i]) + return false; + break; + case VERSION_LESS_EQUAL: + if (version > m_driver_versions[i]) + return false; + break; + case VERSION_LESS: + if (version >= m_driver_versions[i]) + return false; + break; + case VERSION_MORE_EQUAL: + if (version < m_driver_versions[i]) + return false; + break; + case VERSION_MORE: + if (version <= m_driver_versions[i]) + return false; + } // switch m_version_tests + } + return true; - // ----------------------------------------------- } // applies // ------------------------------------------------------------------------ @@ -465,6 +552,11 @@ void unitTesting() assert(Version("10.3") <= Version("10.3.2")); assert(!(Version("10.3.2") < Version("10.3"))); assert(!(Version("10.3.2") <= Version("10.3"))); + assert(Version("1.2.4") > Version("1.2.3")); + assert(Version("1.2.3.4") > Version("1.2.3")); + assert(Version("1.2.3") >= Version("1.2.3")); + assert(Version("1.2.4") >= Version("1.2.3")); + assert(Version("1.2.3.4") >= Version("1.2.3")); assert(Version("3.3 NVIDIA-10.0.19 310.90.10.05b1", "NVIDIA GeForce GTX 680MX OpenGL Engine") == Version("310.90.10.5") ); diff --git a/src/guiengine/event_handler.cpp b/src/guiengine/event_handler.cpp index 07f8671ba..83bcde802 100644 --- a/src/guiengine/event_handler.cpp +++ b/src/guiengine/event_handler.cpp @@ -49,6 +49,7 @@ using GUIEngine::EventHandler; using GUIEngine::EventPropagation; +using GUIEngine::NavigationDirection; using namespace irr::gui; @@ -310,68 +311,34 @@ void EventHandler::processGUIAction(const PlayerAction action, case PA_STEER_LEFT: case PA_MENU_LEFT: { - Widget* w = GUIEngine::getFocusForPlayer(playerID); - if (w == NULL) break; - - Widget* widget_to_call = w; - - /* Find topmost parent. Stop looping if a widget event handler's is itself, to not fall - in an infinite loop (this can happen e.g. in checkboxes, where they need to be - notified of clicks onto themselves so they can toggle their state. ) - On the way, also notify everyone in the chain of the left press. */ - while (widget_to_call->m_event_handler != NULL && widget_to_call->m_event_handler != widget_to_call) - { - if (widget_to_call->leftPressed(playerID) == EVENT_LET) - { - sendEventToUser(w, w->m_properties[PROP_ID], playerID); - } - widget_to_call = widget_to_call->m_event_handler; - } - - - if (widget_to_call->leftPressed(playerID) == EVENT_LET) - { - sendEventToUser(widget_to_call, widget_to_call->m_properties[PROP_ID], playerID); - } + sendNavigationEvent(NAV_LEFT, playerID); + break; } - break; case PA_STEER_RIGHT: case PA_MENU_RIGHT: { - Widget* w = GUIEngine::getFocusForPlayer(playerID); - if (w == NULL) break; - - Widget* widget_to_call = w; - /* Find topmost parent. Stop looping if a widget event handler's is itself, to not fall - in an infinite loop (this can happen e.g. in checkboxes, where they need to be - notified of clicks onto themselves so they can toggle their state. ) - On the way, also notify everyone in the chain of the right press */ - while (widget_to_call->m_event_handler != NULL && widget_to_call->m_event_handler != widget_to_call) - { - if (widget_to_call->rightPressed(playerID) == EVENT_LET) - { - sendEventToUser(widget_to_call, w->m_properties[PROP_ID], playerID); - } - widget_to_call = widget_to_call->m_event_handler; - } - - if (widget_to_call->rightPressed(playerID) == EVENT_LET) - { - sendEventToUser(widget_to_call, widget_to_call->m_properties[PROP_ID], playerID); - } + sendNavigationEvent(NAV_RIGHT, playerID); + break; } - break; case PA_ACCEL: case PA_MENU_UP: - navigate(playerID, type, pressedDown, true); + { + if (type == Input::IT_STICKBUTTON && !pressedDown) + break; + sendNavigationEvent(NAV_UP, playerID); break; + } case PA_BRAKE: case PA_MENU_DOWN: - navigate(playerID, type, pressedDown, false); + { + if (type == Input::IT_STICKBUTTON && !pressedDown) + break; + sendNavigationEvent(NAV_DOWN, playerID); break; + } case PA_RESCUE: case PA_MENU_CANCEL: @@ -427,156 +394,250 @@ const bool NAVIGATION_DEBUG = false; #pragma mark Private methods #endif -/** - * Focus the next widget either downwards or upwards. - * - * \param reverse True means navigating up, false means down. - */ -void EventHandler::navigate(const int playerID, Input::InputType type, const bool pressedDown, const bool reverse) +void EventHandler::sendNavigationEvent(const NavigationDirection nav, const int playerID) { - IGUIElement *el = NULL; - - if (type == Input::IT_STICKBUTTON && !pressedDown) - return; - Widget* w = GUIEngine::getFocusForPlayer(playerID); - if (w != NULL) + if (w == NULL) { - el = w->getIrrlichtElement(); + Widget* defaultWidget = NULL; + Screen* screen = GUIEngine::getCurrentScreen(); + if (screen == NULL) return; + defaultWidget = screen->getFirstWidget(); + + if (defaultWidget != NULL) + { + if (playerID != PLAYER_ID_GAME_MASTER && !defaultWidget->m_supports_multiplayer) + return; + defaultWidget->setFocusForPlayer(playerID); + } + return; } - // list widgets are a bit special, because up/down keys are also used - // to navigate between various list items, not only to navigate between - // components - if (w != NULL && w->m_type == WTYPE_LIST) + Widget* widget_to_call = w; + + bool handled_by_widget = false; + EventPropagation propagation_state = EVENT_BLOCK; + + /* Find topmost parent. Stop looping if a widget event handler's is itself, to not fall + in an infinite loop (this can happen e.g. in checkboxes, where they need to be + notified of clicks onto themselves so they can toggle their state. ) + On the way, also notify everyone in the chain of the press. */ + do { - ListWidget* list = (ListWidget*) w; + if (nav == NAV_LEFT) + propagation_state = widget_to_call->leftPressed(playerID); + else if (nav == NAV_RIGHT) + propagation_state = widget_to_call->rightPressed(playerID); + else if (nav == NAV_UP) + propagation_state = widget_to_call->upPressed(playerID); + else if (nav == NAV_DOWN) + propagation_state = widget_to_call->downPressed(playerID); - const bool stay_within_list = reverse ? list->getSelectionID() > 0 : - list->getSelectionID() < list->getItemCount() - 1; + if (propagation_state == EVENT_LET) + sendEventToUser(widget_to_call, widget_to_call->m_properties[PROP_ID], playerID); - if (stay_within_list) + if (propagation_state == EVENT_LET || propagation_state == EVENT_BLOCK_BUT_HANDLED) + handled_by_widget = true; + + if (widget_to_call->m_event_handler == NULL) + break; + + widget_to_call = widget_to_call->m_event_handler; + } while (widget_to_call->m_event_handler != widget_to_call); + + if (!handled_by_widget) + { + navigate(nav, playerID); + } +} // sendNavigationEvent + + +/** + * Focus the next widget downards, upwards, leftwards or rightwards. + * + * \param nav Determine in which direction to navigate + */ +void EventHandler::navigate(const NavigationDirection nav, const int playerID) +{ + Widget* w = GUIEngine::getFocusForPlayer(playerID); + + int next_id = findIDClosestWidget(nav, playerID, w, false); + + if (next_id != -1) + { + Widget* closest_widget = GUIEngine::getWidget(next_id); + closest_widget->setFocusForPlayer(playerID); + + // A list exception : when entering a list by going down/left/right, select the first item + // when focusing a list by going up, select the last item of the list + if (closest_widget->m_type == WTYPE_LIST) { - if (reverse) - list->setSelectionID(list->getSelectionID() - 1); - else - list->setSelectionID(list->getSelectionID() + 1); - return; - } - else - { - list->setSelectionID(-1); + ListWidget* list = (ListWidget*) closest_widget; + assert(list != NULL); + list->setSelectionID(nav == NAV_UP ? list->getItemCount() - 1 : 0); } } - if (w != NULL && ((reverse && w->m_tab_up_root != -1) || (!reverse && w->m_tab_down_root != -1))) + return; + +} // navigate + +/* This function use simple heuristic to find the closest widget + * in the requested direction, + * It prioritize widgets close vertically to widget close horizontally, + * as it is expected behavior in any direction. + * Several hardcoded values are used, having been found to work well + * experimentally while keeping simple heuristics. + */ +int EventHandler::findIDClosestWidget(const NavigationDirection nav, const int playerID, + GUIEngine::Widget* w, bool ignore_disabled, int recursion_counter) +{ + int closest_widget_id = -1; + int distance = 0; + // So that the UI behavior don't change when it is upscaled + const int BIG_DISTANCE = irr_driver->getActualScreenSize().Width*100; + int smallest_distance = BIG_DISTANCE; + // Used when there is no suitable widget in the requested direction + int closest_wrapping_widget_id = -1; + int wrapping_distance = 0; + int smallest_wrapping_distance = BIG_DISTANCE; + + // In theory, it's better to look recursively in m_widgets + // In practice, this is much much simpler and work equally well + // Usual widget IDs begin at 100 and there is rarely more + // than a few dozen of them - but it's very cheap to have some margin, + for (int i=0;i<1000;i++) { - Widget* next = GUIEngine::getWidget(reverse ? w->m_tab_up_root : w->m_tab_down_root); - assert(next != NULL); - el = next->getIrrlichtElement(); + Widget* w_test = GUIEngine::getWidget(i); - if (el == NULL) - { - Log::warn("EventHandler::navigate", "m_tab_down/up_root is set to an ID for which I can't find the widget"); - return; - } - } - - // don't allow navigating to any widget when a dialog is shown; only navigate to widgets in the dialog - if (ScreenKeyboard::isActive()) - { - if (!ScreenKeyboard::getCurrent()->isMyIrrChild(el)) - el = NULL; - } - else if (ModalDialog::isADialogActive()) - { - if (!ModalDialog::getCurrent()->isMyIrrChild(el)) - el = NULL; - } - - bool found = false; - - // find closest widget - if (el != NULL && el->getTabGroup() != NULL) - { - // Up: if the current widget is e.g. 15, search for widget 14, 13, 12, ... (up to 10 IDs may be missing) - // Down: if the current widget is e.g. 5, search for widget 6, 7, 8, 9, ..., 15 (up to 10 IDs may be missing) - for (int n = 1; n < 10 && !found; n++) - { - IGUIElement *closest = GUIEngine::getGUIEnv()->getRootGUIElement()->getElementFromId(el->getTabOrder() + (reverse ? -n : n), true); - - if (closest != NULL && Widget::isFocusableId(closest->getID())) - { - Widget* closestWidget = GUIEngine::getWidget( closest->getID() ); - - if (playerID != PLAYER_ID_GAME_MASTER && !closestWidget->m_supports_multiplayer) return; - - // if a dialog is shown, restrict to items in the dialog - if (ScreenKeyboard::isActive()) - { - if (!ScreenKeyboard::getCurrent()->isMyChild(closestWidget)) - continue; - } - else if (ModalDialog::isADialogActive()) - { - if (!ModalDialog::getCurrent()->isMyChild(closestWidget)) - continue; - } - - if (NAVIGATION_DEBUG) - { - Log::info("EventHandler", "Navigating %s to %d", (reverse ? "up" : "down"), closest->getID()); - } - - assert(closestWidget != NULL); - - if (!closestWidget->isVisible() || !closestWidget->isActivated()) - continue; - - closestWidget->setFocusForPlayer(playerID); - - // another list exception : when entering a list by going down, select the first item - // when focusing a list by going up, select the last item of the list - if (closestWidget->m_type == WTYPE_LIST) - { - ListWidget* list = (ListWidget*) closestWidget; - assert(list != NULL); - list->setSelectionID(reverse ? list->getItemCount() - 1 : 0); - } - found = true; - } - } // end for - } - - if (!found) - { - if (NAVIGATION_DEBUG) - Log::info( "EventHandler::navigate", "Wrap around"); - - // select the last/first widget - Widget* wrapWidget = NULL; + // The widget id is invalid if : + // - it doesn't match a widget + // - it doesn't match a focusable widget + // - it corresponds to the current widget + // - it corresponds to an invisible or disabled widget + // - the player is not allowed to select it + if (w_test == NULL || !Widget::isFocusableId(i) || w == w_test || + (!w_test->isVisible() && ignore_disabled) || + (!w_test->isActivated() && ignore_disabled) || + (playerID != PLAYER_ID_GAME_MASTER && !w_test->m_supports_multiplayer)) + continue; + // if a dialog is shown, restrict to items in the dialog if (ScreenKeyboard::isActive()) { - wrapWidget = reverse ? ScreenKeyboard::getCurrent()->getLastWidget(): - ScreenKeyboard::getCurrent()->getFirstWidget(); + if (!ScreenKeyboard::getCurrent()->isMyChild(w_test)) + continue; } else if (ModalDialog::isADialogActive()) { - wrapWidget = reverse ? ModalDialog::getCurrent()->getLastWidget() : - ModalDialog::getCurrent()->getFirstWidget(); - } - else - { - Screen* screen = GUIEngine::getCurrentScreen(); - if (screen == NULL) return; - wrapWidget = reverse ? screen->getLastWidget() : - screen->getFirstWidget(); + if (!ModalDialog::getCurrent()->isMyChild(w_test)) + continue; } - if (wrapWidget != NULL) wrapWidget->setFocusForPlayer(playerID); + int offset = 0; + + if (nav == NAV_UP || nav == NAV_DOWN) + { + if (nav == NAV_UP) + { + // Compare current top point with other widget lowest point + distance = w->m_y - (w_test->m_y + w_test->m_h); + } + else + { + // compare current lowest point with other widget top point + distance = w_test->m_y - (w->m_y + w->m_h); + } + + // Better select an item on the side that one much higher, + // so make the vertical distance matter much more + // than the horizontal offset. + // The multiplicator of 100 is meant so that the offset will matter + // only if there are two or more widget with a (nearly) equal vertical height. + distance *= 100; + + wrapping_distance = distance; + // if the two widgets are not well aligned, consider them farther + // If w's left/right-mosts points are between w_test's, + // right_offset and left_offset will be 0. + // If w_test's are between w's, + // we substract the smaller from the bigger + // else, the smaller is 0 and we keep the bigger + int right_offset = std::max(0, w_test->m_x - w->m_x); + int left_offset = std::max(0, (w->m_x + w->m_w) - (w_test->m_x + w_test->m_w)); + offset = std::max (right_offset - left_offset, left_offset - right_offset); + } + else if (nav == NAV_LEFT || nav == NAV_RIGHT) + { + if (nav == NAV_LEFT) + { + // compare current leftmost point with other widget rightmost + distance = w->m_x - (w_test->m_x + w_test->m_w); + } + else + { + // compare current rightmost point with other widget leftmost + distance = w_test->m_x - (w->m_x + w->m_w); + } + wrapping_distance = distance; + + int down_offset = std::max(0, w_test->m_y - w->m_y); + int up_offset = std::max(0, (w->m_y + w->m_h) - (w_test->m_y + w_test->m_h)); + offset = std::max (down_offset - up_offset, up_offset - down_offset); + + // No lateral selection if there is not at least partial alignement + // >= because we don't want it to trigger if two widgets touch each other + if (offset >= w->m_h) + { + distance = BIG_DISTANCE; + wrapping_distance = BIG_DISTANCE; + } + } + + // This happens if the tested widget is in the opposite direction + if (distance < 0) + distance = BIG_DISTANCE; + distance += offset; + wrapping_distance += offset; + + if (distance < smallest_distance) + { + smallest_distance = distance; + closest_widget_id = i; + } + if (wrapping_distance < smallest_wrapping_distance) + { + smallest_wrapping_distance = wrapping_distance; + closest_wrapping_widget_id = i; + } + } // for i < 1000 + + int closest_id = (smallest_distance < BIG_DISTANCE) ? closest_widget_id : + closest_wrapping_widget_id; + Widget* w_test = GUIEngine::getWidget(closest_id); + + // If the newly found focus target is invisible, or not activated, + // it is not a good target, search again + // This allows to skip over disabled/invisible widgets in a grid + if (!w_test->isVisible() || !w_test->isActivated()) + { + // Can skip over at most 3 consecutive disabled/invisible widget + if (recursion_counter <=2) + { + recursion_counter++; + return findIDClosestWidget(nav, playerID, w_test, /*ignore disabled*/ false, recursion_counter); + } + // If nothing has been found, do a search ignoring disabled/invisible widgets, + // restarting from the initial focused widget (otherwise, it could lead to weird results) + else if (recursion_counter == 3) + { + Widget* w_focus = GUIEngine::getFocusForPlayer(playerID); + return findIDClosestWidget(nav, playerID, w_focus, /*ignore disabled*/ true, recursion_counter); + } } -} + + return closest_id; +} // findIDClosestWidget // ----------------------------------------------------------------------------- @@ -584,7 +645,7 @@ void EventHandler::sendEventToUser(GUIEngine::Widget* widget, std::string& name, { if (ScreenKeyboard::isActive()) { - if (ScreenKeyboard::getCurrent()->processEvent(widget->m_properties[PROP_ID]) == EVENT_BLOCK) + if (ScreenKeyboard::getCurrent()->processEvent(widget->m_properties[PROP_ID]) != EVENT_LET) { return; } @@ -592,7 +653,7 @@ void EventHandler::sendEventToUser(GUIEngine::Widget* widget, std::string& name, if (ModalDialog::isADialogActive()) { - if (ModalDialog::getCurrent()->processEvent(widget->m_properties[PROP_ID]) == EVENT_BLOCK) + if (ModalDialog::getCurrent()->processEvent(widget->m_properties[PROP_ID]) != EVENT_LET) { return; } diff --git a/src/guiengine/event_handler.hpp b/src/guiengine/event_handler.hpp index 221701897..269fa5974 100644 --- a/src/guiengine/event_handler.hpp +++ b/src/guiengine/event_handler.hpp @@ -35,9 +35,18 @@ namespace GUIEngine enum EventPropagation { EVENT_BLOCK, + EVENT_BLOCK_BUT_HANDLED, EVENT_LET }; + enum NavigationDirection + { + NAV_LEFT, + NAV_RIGHT, + NAV_UP, + NAV_DOWN + }; + class Widget; /** @@ -62,7 +71,10 @@ namespace GUIEngine EventPropagation onGUIEvent(const irr::SEvent& event); EventPropagation onWidgetActivated(Widget* w, const int playerID); - void navigate(const int playerID, Input::InputType type, const bool pressedDown, const bool reverse); + void sendNavigationEvent(const NavigationDirection nav, const int playerID); + void navigate(const NavigationDirection nav, const int playerID); + int findIDClosestWidget(const NavigationDirection nav, const int playerID, + Widget* w, bool ignore_disabled, int recursion_counter=1); /** \brief send an event to the GUI module user's event callback * \param widget the widget that triggerred this event diff --git a/src/guiengine/skin.cpp b/src/guiengine/skin.cpp index c1ebe765c..b95bd819f 100644 --- a/src/guiengine/skin.cpp +++ b/src/guiengine/skin.cpp @@ -308,7 +308,7 @@ Skin::Skin(IGUISkin* fallback_skin) SkinConfig::loadFromFile( skin_name ); } - bg_image = NULL; + m_bg_image = NULL; m_fallback_skin = fallback_skin; m_fallback_skin->grab(); @@ -336,14 +336,14 @@ void Skin::drawBgImage() static core::recti dest; static core::recti source_area; - if(bg_image == NULL) + if(m_bg_image == NULL) { int texture_w, texture_h; - bg_image = + m_bg_image = SkinConfig::m_render_params["background::neutral"].getImage(); - assert(bg_image != NULL); - texture_w = bg_image->getSize().Width; - texture_h = bg_image->getSize().Height; + assert(m_bg_image != NULL); + texture_w = m_bg_image->getSize().Width; + texture_h = m_bg_image->getSize().Height; source_area = core::recti(0, 0, texture_w, texture_h); @@ -367,7 +367,7 @@ void Skin::drawBgImage() } irr_driver->getVideoDriver()->enableMaterial2D(); - draw2DImage(bg_image, dest, source_area, + draw2DImage(m_bg_image, dest, source_area, /* no clipping */0, /*color*/ 0, /*alpha*/false); irr_driver->getVideoDriver()->enableMaterial2D(false); @@ -1705,7 +1705,7 @@ void Skin::renderSections(PtrVector* within_vector) // there's about 40 empty pixels at the top of bar.png ITexture* tex = - irr_driver->getTexture(FileManager::GUI,"bar.png"); + SkinConfig::m_render_params["bottom-bar::neutral"].getImage(); if(!tex) { tex = irr_driver->getTexture(FileManager::GUI, "main_help.png"); diff --git a/src/guiengine/skin.hpp b/src/guiengine/skin.hpp index a10a0ac8e..6a617d897 100644 --- a/src/guiengine/skin.hpp +++ b/src/guiengine/skin.hpp @@ -267,7 +267,7 @@ namespace GUIEngine gui::IGUISkin* m_fallback_skin; - video::ITexture* bg_image; + video::ITexture* m_bg_image; std::vector m_tooltips; std::vector m_tooltip_at_mouse; diff --git a/src/guiengine/widget.hpp b/src/guiengine/widget.hpp index 4aae5f2f4..badb8a2ac 100644 --- a/src/guiengine/widget.hpp +++ b/src/guiengine/widget.hpp @@ -189,6 +189,22 @@ namespace GUIEngine */ virtual EventPropagation leftPressed (const int playerID) { return EVENT_BLOCK; } + /** + * called when up key is pressed and focus is on widget. + * Returns 'EVENT_LET' if user's event handler should be notified of a change. + * Override in children to be notified of up/down events and/or make + * the event propagate to the user's event handler. + */ + virtual EventPropagation upPressed(const int playerID) { return EVENT_BLOCK; } + + /** + * called when down key is pressed and focus is on widget. + * Returns 'EVENT_LET' if user's event handler should be notified of a change. + * Override in children to be notified of up/down events and/or make + * the event propagate to the user's event handler. + */ + virtual EventPropagation downPressed(const int playerID) { return EVENT_BLOCK; } + /** used when you set eventSupervisors - see m_event_handler explainations below called when one of a widget's children is hovered. \return 'EVENT_LET' if main event handler should be notified of a change, 'EVENT_BLOCK' otherwise */ diff --git a/src/guiengine/widgets/list_widget.cpp b/src/guiengine/widgets/list_widget.cpp index ad9cbeefa..819ad7d5e 100644 --- a/src/guiengine/widgets/list_widget.cpp +++ b/src/guiengine/widgets/list_widget.cpp @@ -487,6 +487,43 @@ EventPropagation ListWidget::transmitEvent(Widget* w, return EVENT_LET; } +// ----------------------------------------------------------------------------- + +EventPropagation ListWidget::upPressed(const int playerID) +{ + return moveToNextItem(/*reverse*/ true); +} // upPressed + +// ----------------------------------------------------------------------------- + +EventPropagation ListWidget::downPressed(const int playerID) +{ + return moveToNextItem(/*reverse*/ false); +} // downPressed + +EventPropagation ListWidget::moveToNextItem(const bool reverse) +{ + // if widget is deactivated, do nothing + if (m_deactivated) return EVENT_BLOCK; + + const bool stay_within_list = reverse ? getSelectionID() > 0 : + getSelectionID() < getItemCount() - 1; + + if (stay_within_list) + { + if (reverse) + setSelectionID(getSelectionID() - 1); + else + setSelectionID(getSelectionID() + 1); + return EVENT_BLOCK_BUT_HANDLED; + } + else + { + setSelectionID(-1); // select nothing + } + return EVENT_BLOCK; +} // moveToNextItem + // ----------------------------------------------------------------------------- int ListWidget::getItemID(const std::string &internalName) const { diff --git a/src/guiengine/widgets/list_widget.hpp b/src/guiengine/widgets/list_widget.hpp index 8c9bdeed6..44df80f89 100644 --- a/src/guiengine/widgets/list_widget.hpp +++ b/src/guiengine/widgets/list_widget.hpp @@ -246,6 +246,15 @@ namespace GUIEngine virtual EventPropagation transmitEvent(Widget* w, const std::string& originator, const int playerID); + + /** \brief implementing method from base class Widget */ + virtual EventPropagation upPressed(const int playerID); + + /** \brief implementing method from base class Widget */ + virtual EventPropagation downPressed(const int playerID); + + /** \brief implement common core parts of upPressed and downPressed */ + EventPropagation moveToNextItem(const bool down); void setColumnListener(IListWidgetHeaderListener* listener) { diff --git a/src/guiengine/widgets/ribbon_widget.cpp b/src/guiengine/widgets/ribbon_widget.cpp index 45e85e603..3a6e4ec91 100644 --- a/src/guiengine/widgets/ribbon_widget.cpp +++ b/src/guiengine/widgets/ribbon_widget.cpp @@ -460,7 +460,7 @@ void RibbonWidget::select(std::string item, const int mousePlayerID) // ---------------------------------------------------------------------------- EventPropagation RibbonWidget::rightPressed(const int playerID) { - EventPropagation result = m_ribbon_type != RIBBON_TOOLBAR ? EVENT_LET : EVENT_BLOCK; + EventPropagation result = m_ribbon_type != RIBBON_TOOLBAR ? EVENT_LET : EVENT_BLOCK_BUT_HANDLED; if (m_deactivated) return result; // empty ribbon, or only one item (can't move right) @@ -500,7 +500,7 @@ EventPropagation RibbonWidget::rightPressed(const int playerID) // ---------------------------------------------------------------------------- EventPropagation RibbonWidget::leftPressed(const int playerID) { - EventPropagation result = m_ribbon_type != RIBBON_TOOLBAR ? EVENT_LET : EVENT_BLOCK; + EventPropagation result = m_ribbon_type != RIBBON_TOOLBAR ? EVENT_LET : EVENT_BLOCK_BUT_HANDLED; if (m_deactivated) return result; // empty ribbon, or only one item (can't move left)