diff --git a/art/textures/alpha-bar-10px.png b/art/textures/alpha-bar-10px.png deleted file mode 100644 index 118e92d6..00000000 Binary files a/art/textures/alpha-bar-10px.png and /dev/null differ diff --git a/art/textures/alpha-bar-25px-shifted.png b/art/textures/alpha-bar-25px-shifted.png deleted file mode 100644 index 9229a9a2..00000000 Binary files a/art/textures/alpha-bar-25px-shifted.png and /dev/null differ diff --git a/art/textures/alpha-bar-25px.png b/art/textures/alpha-bar-25px.png deleted file mode 100644 index b852d001..00000000 Binary files a/art/textures/alpha-bar-25px.png and /dev/null differ diff --git a/art/textures/box.9.png b/art/textures/box.9.png deleted file mode 100644 index 4b5fdef5..00000000 Binary files a/art/textures/box.9.png and /dev/null differ diff --git a/art/textures/check-down-on.png b/art/textures/check-down-on.png deleted file mode 100644 index 5478800f..00000000 Binary files a/art/textures/check-down-on.png and /dev/null differ diff --git a/art/textures/check-down.png b/art/textures/check-down.png deleted file mode 100644 index 954592f6..00000000 Binary files a/art/textures/check-down.png and /dev/null differ diff --git a/art/textures/check-off.png b/art/textures/check-off.png deleted file mode 100644 index 572b98db..00000000 Binary files a/art/textures/check-off.png and /dev/null differ diff --git a/art/textures/check-on-disabled.png b/art/textures/check-on-disabled.png deleted file mode 100644 index 20964dc7..00000000 Binary files a/art/textures/check-on-disabled.png and /dev/null differ diff --git a/art/textures/check-on.png b/art/textures/check-on.png deleted file mode 100644 index 42b425b8..00000000 Binary files a/art/textures/check-on.png and /dev/null differ diff --git a/art/textures/check-over-off.png b/art/textures/check-over-off.png deleted file mode 100644 index 49b16428..00000000 Binary files a/art/textures/check-over-off.png and /dev/null differ diff --git a/art/textures/check-over-on.png b/art/textures/check-over-on.png deleted file mode 100644 index a833bc83..00000000 Binary files a/art/textures/check-over-on.png and /dev/null differ diff --git a/art/textures/default-select-white-over.9.png b/art/textures/default-select-white-over.9.png deleted file mode 100644 index 971638ef..00000000 Binary files a/art/textures/default-select-white-over.9.png and /dev/null differ diff --git a/art/textures/default-select-white.9.png b/art/textures/default-select-white.9.png deleted file mode 100644 index aef4befa..00000000 Binary files a/art/textures/default-select-white.9.png and /dev/null differ diff --git a/art/textures/radio-down-on.png b/art/textures/radio-down-on.png deleted file mode 100644 index e7333c7a..00000000 Binary files a/art/textures/radio-down-on.png and /dev/null differ diff --git a/art/textures/radio-down.png b/art/textures/radio-down.png deleted file mode 100644 index a54f9194..00000000 Binary files a/art/textures/radio-down.png and /dev/null differ diff --git a/art/textures/radio-off.png b/art/textures/radio-off.png deleted file mode 100644 index 7064c709..00000000 Binary files a/art/textures/radio-off.png and /dev/null differ diff --git a/art/textures/radio-on-disabled.png b/art/textures/radio-on-disabled.png deleted file mode 100644 index 3a42b8f5..00000000 Binary files a/art/textures/radio-on-disabled.png and /dev/null differ diff --git a/art/textures/radio-on.png b/art/textures/radio-on.png deleted file mode 100644 index f7121d67..00000000 Binary files a/art/textures/radio-on.png and /dev/null differ diff --git a/art/textures/radio-over-off.png b/art/textures/radio-over-off.png deleted file mode 100644 index bdbd9006..00000000 Binary files a/art/textures/radio-over-off.png and /dev/null differ diff --git a/art/textures/radio-over-on.png b/art/textures/radio-over-on.png deleted file mode 100644 index f3f850c6..00000000 Binary files a/art/textures/radio-over-on.png and /dev/null differ diff --git a/art/textures/textfield-light-down.9.png b/art/textures/textfield-light-down.9.png deleted file mode 100644 index 29a9bcf0..00000000 Binary files a/art/textures/textfield-light-down.9.png and /dev/null differ diff --git a/art/textures/window-action-close-hover.png b/art/textures/window-action-close-hover.png new file mode 100755 index 00000000..ec4e0b41 Binary files /dev/null and b/art/textures/window-action-close-hover.png differ diff --git a/art/textures/window-action-close-normal.png b/art/textures/window-action-close-normal.png new file mode 100755 index 00000000..11b6c1f6 Binary files /dev/null and b/art/textures/window-action-close-normal.png differ diff --git a/art/textures/window-action-close-pressed.png b/art/textures/window-action-close-pressed.png new file mode 100755 index 00000000..d6ff9995 Binary files /dev/null and b/art/textures/window-action-close-pressed.png differ diff --git a/art/textures/window-action-iconify-hover.png b/art/textures/window-action-iconify-hover.png new file mode 100755 index 00000000..a6b7a82f Binary files /dev/null and b/art/textures/window-action-iconify-hover.png differ diff --git a/art/textures/window-action-iconify-normal.png b/art/textures/window-action-iconify-normal.png new file mode 100755 index 00000000..901baf59 Binary files /dev/null and b/art/textures/window-action-iconify-normal.png differ diff --git a/art/textures/window-action-iconify-pressed.png b/art/textures/window-action-iconify-pressed.png new file mode 100755 index 00000000..8f1f72fb Binary files /dev/null and b/art/textures/window-action-iconify-pressed.png differ diff --git a/art/textures/window-action-maximize-hover.png b/art/textures/window-action-maximize-hover.png new file mode 100755 index 00000000..0a3ec428 Binary files /dev/null and b/art/textures/window-action-maximize-hover.png differ diff --git a/art/textures/window-action-maximize-normal.png b/art/textures/window-action-maximize-normal.png new file mode 100755 index 00000000..132a8a6e Binary files /dev/null and b/art/textures/window-action-maximize-normal.png differ diff --git a/art/textures/window-action-maximize-pressed.png b/art/textures/window-action-maximize-pressed.png new file mode 100755 index 00000000..8b1c2903 Binary files /dev/null and b/art/textures/window-action-maximize-pressed.png differ diff --git a/art/textures/window-action-restore-hover.png b/art/textures/window-action-restore-hover.png new file mode 100755 index 00000000..207e8732 Binary files /dev/null and b/art/textures/window-action-restore-hover.png differ diff --git a/art/textures/window-action-restore-normal.png b/art/textures/window-action-restore-normal.png new file mode 100755 index 00000000..9cd5f40e Binary files /dev/null and b/art/textures/window-action-restore-normal.png differ diff --git a/art/textures/window-action-restore-pressed.png b/art/textures/window-action-restore-pressed.png new file mode 100755 index 00000000..e3ca6668 Binary files /dev/null and b/art/textures/window-action-restore-pressed.png differ diff --git a/assets/style/uiskin.atlas b/assets/style/uiskin.atlas index c49d4917..9560b1f7 100644 --- a/assets/style/uiskin.atlas +++ b/assets/style/uiskin.atlas @@ -6,98 +6,77 @@ filter: Nearest,Nearest repeat: none align-center-horisontal rotate: false - xy: 216, 5 + xy: 26, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-center-vertical rotate: false - xy: 486, 23 + xy: 46, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-edge-down rotate: false - xy: 486, 3 + xy: 66, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-edge-left rotate: false - xy: 590, 83 + xy: 86, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-edge-right rotate: false - xy: 610, 83 + xy: 106, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-edge-up rotate: false - xy: 630, 84 + xy: 126, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-simple-down rotate: false - xy: 650, 84 + xy: 146, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-simple-left rotate: false - xy: 670, 84 + xy: 166, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-simple-right rotate: false - xy: 690, 84 + xy: 186, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 align-simple-up rotate: false - xy: 710, 84 + xy: 206, 5 size: 18, 18 orig: 18, 18 offset: 0, 0 index: -1 -alpha-bar-10px - rotate: false - xy: 2, 13 - size: 130, 10 - orig: 130, 10 - offset: 0, 0 - index: -1 -alpha-bar-25px - rotate: false - xy: 253, 98 - size: 130, 28 - orig: 130, 28 - offset: 0, 0 - index: -1 -alpha-bar-25px-shifted - rotate: false - xy: 253, 68 - size: 130, 28 - orig: 130, 28 - offset: 0, 0 - index: -1 border rotate: false - xy: 960, 81 + xy: 627, 43 size: 5, 5 split: 2, 2, 2, 2 pad: 1, 1, 1, 1 @@ -106,21 +85,21 @@ border index: -1 border-circle rotate: false - xy: 280, 2 + xy: 684, 64 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 border-circle-error rotate: false - xy: 296, 2 + xy: 700, 64 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 border-error rotate: false - xy: 522, 2 + xy: 439, 17 size: 11, 11 split: 5, 5, 5, 5 pad: 1, 1, 1, 1 @@ -129,38 +108,30 @@ border-error index: -1 border-textfield rotate: false - xy: 524, 95 + xy: 473, 13 size: 11, 5 split: 5, 5, 2, 2 pad: 5, 5, 1, 1 orig: 11, 5 offset: 0, 0 index: -1 -box - rotate: false - xy: 487, 43 - size: 17, 30 - split: 8, 8, 23, 6 - orig: 17, 30 - offset: 0, 0 - index: -1 box-colapse-off rotate: false - xy: 535, 2 + xy: 756, 65 size: 11, 11 orig: 11, 11 offset: 0, 0 index: -1 box-colapse-on rotate: false - xy: 548, 2 + xy: 769, 65 size: 11, 11 orig: 11, 11 offset: 0, 0 index: -1 button rotate: false - xy: 643, 62 + xy: 410, 10 size: 12, 20 split: 5, 5, 5, 4 pad: 5, 5, 2, 2 @@ -169,7 +140,7 @@ button index: -1 button-dark rotate: false - xy: 560, 17 + xy: 245, 3 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 3, 3 @@ -178,7 +149,7 @@ button-dark index: -1 button-dark-down rotate: false - xy: 994, 82 + xy: 425, 37 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 3, 3 @@ -187,7 +158,7 @@ button-dark-down index: -1 button-dark-over rotate: false - xy: 546, 17 + xy: 452, 31 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 4, 3 @@ -196,7 +167,7 @@ button-dark-over index: -1 button-down rotate: false - xy: 574, 17 + xy: 298, 8 size: 12, 20 split: 5, 5, 5, 4 pad: 5, 5, 2, 2 @@ -205,7 +176,7 @@ button-down index: -1 button-flat-red rotate: false - xy: 615, 61 + xy: 340, 5 size: 12, 20 split: 3, 3, 3, 4 orig: 12, 20 @@ -213,7 +184,7 @@ button-flat-red index: -1 button-flat-red-down rotate: false - xy: 587, 57 + xy: 312, 8 size: 12, 20 split: 3, 3, 3, 4 orig: 12, 20 @@ -221,7 +192,7 @@ button-flat-red-down index: -1 button-flat-red-over rotate: false - xy: 601, 61 + xy: 326, 5 size: 12, 20 split: 3, 3, 3, 4 orig: 12, 20 @@ -229,7 +200,7 @@ button-flat-red-over index: -1 button-over rotate: false - xy: 590, 35 + xy: 354, 5 size: 12, 20 split: 5, 5, 5, 4 pad: 5, 5, 2, 2 @@ -238,7 +209,7 @@ button-over index: -1 button-panel-bg rotate: false - xy: 604, 39 + xy: 368, 5 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 1, 1 @@ -247,7 +218,7 @@ button-panel-bg index: -1 button-red rotate: false - xy: 588, 15 + xy: 425, 17 size: 12, 18 split: 5, 5, 4, 3 pad: 4, 4, 1, 1 @@ -256,7 +227,7 @@ button-red index: -1 button-resource rotate: false - xy: 629, 61 + xy: 396, 10 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 1, 1 @@ -265,7 +236,7 @@ button-resource index: -1 button-resource-over rotate: false - xy: 618, 39 + xy: 382, 10 size: 12, 20 split: 5, 5, 5, 4 pad: 4, 4, 1, 1 @@ -274,108 +245,51 @@ button-resource-over index: -1 button-window-bg rotate: false - xy: 657, 64 + xy: 452, 11 size: 12, 18 split: 5, 5, 4, 3 pad: 4, 4, 1, 1 orig: 12, 18 offset: 0, 0 index: -1 -check-down - rotate: false - xy: 312, 2 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-down-on - rotate: false - xy: 506, 2 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-off - rotate: false - xy: 946, 88 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -textfield - rotate: false - xy: 946, 88 - size: 14, 14 - split: 2, 2, 3, 2 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-on - rotate: false - xy: 962, 88 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-on-disabled - rotate: false - xy: 978, 88 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-over-off - rotate: false - xy: 1008, 79 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 -check-over-on - rotate: false - xy: 549, 39 - size: 14, 14 - orig: 14, 14 - offset: 0, 0 - index: -1 color-picker-bar-selector rotate: false - xy: 581, 39 + xy: 1012, 78 size: 7, 14 orig: 7, 14 offset: 0, 0 index: -1 color-picker-cross rotate: false - xy: 967, 81 + xy: 494, 13 size: 5, 5 orig: 5, 5 offset: 0, 0 index: -1 color-picker-selector-horizontal rotate: false - xy: 537, 95 + xy: 410, 2 size: 3, 1 orig: 3, 1 offset: 0, 0 index: -1 color-picker-selector-vertical rotate: false - xy: 644, 39 + xy: 448, 99 size: 1, 3 orig: 1, 3 offset: 0, 0 index: -1 cursor rotate: false - xy: 228, 2 + xy: 326, 27 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 default-pane rotate: false - xy: 105, 2 + xy: 367, 75 size: 5, 3 split: 1, 1, 1, 1 orig: 5, 3 @@ -383,7 +297,7 @@ default-pane index: -1 default-pane-noborder rotate: false - xy: 231, 2 + xy: 339, 2 size: 1, 1 split: 0, 0, 0, 0 orig: 1, 1 @@ -391,7 +305,7 @@ default-pane-noborder index: -1 default-select rotate: false - xy: 282, 42 + xy: 792, 102 size: 27, 24 split: 4, 16, 0, 24 orig: 27, 24 @@ -399,7 +313,7 @@ default-select index: -1 default-select-over rotate: false - xy: 499, 102 + xy: 763, 102 size: 27, 24 split: 4, 16, 0, 24 orig: 27, 24 @@ -407,28 +321,12 @@ default-select-over index: -1 default-select-selection rotate: false - xy: 275, 3 + xy: 377, 27 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 offset: 0, 0 index: -1 -default-select-white - rotate: false - xy: 163, 2 - size: 27, 21 - split: 2, 17, 0, 21 - orig: 27, 21 - offset: 0, 0 - index: -1 -default-select-white-over - rotate: false - xy: 134, 2 - size: 27, 21 - split: 2, 17, 0, 21 - orig: 27, 21 - offset: 0, 0 - index: -1 dropHere rotate: false xy: 2, 25 @@ -438,14 +336,14 @@ dropHere index: -1 expand-icon rotate: false - xy: 524, 77 + xy: 452, 53 size: 16, 16 orig: 16, 16 offset: 0, 0 index: -1 expandable-properties-active-bg rotate: false - xy: 667, 45 + xy: 615, 42 size: 4, 17 split: 1, 2, 0, 17 orig: 4, 17 @@ -453,21 +351,21 @@ expandable-properties-active-bg index: -1 expandable-properties-collapse-off rotate: false - xy: 63, 4 + xy: 523, 20 size: 7, 7 orig: 7, 7 offset: 0, 0 index: -1 expandable-properties-collapse-on rotate: false - xy: 72, 4 + xy: 532, 20 size: 7, 7 orig: 7, 7 offset: 0, 0 index: -1 expandable-properties-inactive-bg rotate: false - xy: 661, 44 + xy: 621, 43 size: 4, 18 split: 1, 2, 0, 18 orig: 4, 18 @@ -475,357 +373,357 @@ expandable-properties-inactive-bg index: -1 icon-animation rotate: false - xy: 624, 104 + xy: 305, 30 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-arrow-left rotate: false - xy: 561, 2 + xy: 748, 67 size: 6, 11 orig: 6, 11 offset: 0, 0 index: -1 icon-arrow-right rotate: false - xy: 569, 2 + xy: 627, 50 size: 6, 11 orig: 6, 11 offset: 0, 0 index: -1 icon-close rotate: false - xy: 648, 104 + xy: 331, 51 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-close-panel rotate: false - xy: 306, 18 + xy: 355, 51 size: 18, 22 orig: 18, 22 offset: 0, 0 index: -1 icon-close-small rotate: false - xy: 535, 39 + xy: 599, 31 size: 12, 12 orig: 12, 12 offset: 0, 0 index: -1 icon-close-white rotate: false - xy: 192, 5 + xy: 2, 5 size: 22, 18 orig: 22, 18 offset: 0, 0 index: -1 icon-composite rotate: false - xy: 672, 104 + xy: 329, 27 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-composite2 rotate: false - xy: 565, 39 + xy: 716, 64 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-drive rotate: false - xy: 696, 104 + xy: 353, 27 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-file-audio rotate: false - xy: 720, 104 + xy: 375, 56 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-file-image rotate: false - xy: 744, 104 + xy: 399, 56 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-file-pdf rotate: false - xy: 768, 104 + xy: 377, 32 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-file-text rotate: false - xy: 792, 104 + xy: 401, 32 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-folder rotate: false - xy: 816, 104 + xy: 468, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-folder-new rotate: false - xy: 840, 104 + xy: 492, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-folder-parent rotate: false - xy: 864, 104 + xy: 516, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-folder-star rotate: false - xy: 888, 104 + xy: 540, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-group rotate: false - xy: 912, 104 + xy: 564, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-image rotate: false - xy: 936, 104 + xy: 588, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-label rotate: false - xy: 960, 104 + xy: 612, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-library rotate: false - xy: 984, 104 + xy: 636, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-library-over rotate: false - xy: 463, 51 + xy: 660, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-link-active rotate: false - xy: 328, 2 + xy: 616, 63 size: 15, 15 orig: 15, 15 offset: 0, 0 index: -1 icon-link-inactive rotate: false - xy: 345, 2 + xy: 633, 63 size: 15, 15 orig: 15, 15 offset: 0, 0 index: -1 icon-list-settings rotate: false - xy: 256, 8 + xy: 684, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-lock-active rotate: false - xy: 282, 18 + xy: 708, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-lock-inactive rotate: false - xy: 326, 19 + xy: 732, 80 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-new-layer rotate: false - xy: 671, 67 + xy: 473, 37 size: 13, 15 orig: 13, 15 offset: 0, 0 index: -1 icon-particle rotate: false - xy: 350, 19 + xy: 756, 78 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-particle-over rotate: false - xy: 374, 19 + xy: 780, 78 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-particle-white rotate: false - xy: 398, 30 + xy: 804, 78 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-refresh rotate: false - xy: 422, 30 + xy: 828, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-root rotate: false - xy: 686, 68 + xy: 732, 64 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 icon-spine rotate: false - xy: 462, 27 + xy: 852, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-star rotate: false - xy: 413, 6 + xy: 876, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-star-outline rotate: false - xy: 453, 3 + xy: 900, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-trash rotate: false - xy: 632, 44 + xy: 488, 37 size: 13, 15 orig: 13, 15 offset: 0, 0 index: -1 icon-trash-disabled rotate: false - xy: 718, 67 + xy: 473, 20 size: 13, 15 orig: 13, 15 offset: 0, 0 index: -1 icon-trash-over rotate: false - xy: 733, 68 + xy: 488, 20 size: 13, 15 orig: 13, 15 offset: 0, 0 index: -1 icon-unlink-active rotate: false - xy: 362, 2 + xy: 650, 63 size: 15, 15 orig: 15, 15 offset: 0, 0 index: -1 icon-unlink-inactive rotate: false - xy: 379, 2 + xy: 667, 63 size: 15, 15 orig: 15, 15 offset: 0, 0 index: -1 icon-visible-off rotate: false - xy: 522, 15 + xy: 924, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-visible-on rotate: false - xy: 542, 79 + xy: 948, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 icon-zoomin rotate: false - xy: 730, 85 + xy: 502, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 icon-zoomin-disabled rotate: false - xy: 749, 85 + xy: 521, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 icon-zoomin-over rotate: false - xy: 768, 85 + xy: 540, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 icon-zoomout rotate: false - xy: 787, 85 + xy: 559, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 icon-zoomout-disabled rotate: false - xy: 806, 85 + xy: 578, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 icon-zoomout-over rotate: false - xy: 825, 85 + xy: 597, 61 size: 17, 17 orig: 17, 17 offset: 0, 0 index: -1 layer-bg rotate: false - xy: 654, 41 + xy: 466, 11 size: 5, 19 split: 2, 2, 0, 19 orig: 5, 19 @@ -833,7 +731,7 @@ layer-bg index: -1 layer-bg-over rotate: false - xy: 647, 41 + xy: 466, 32 size: 5, 19 split: 2, 2, 0, 19 orig: 5, 19 @@ -841,28 +739,28 @@ layer-bg-over index: -1 list-selection rotate: false - xy: 671, 64 + xy: 415, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 list-selection-white rotate: false - xy: 81, 2 + xy: 19, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 logo rotate: false - xy: 499, 77 + xy: 821, 103 size: 23, 23 orig: 23, 23 offset: 0, 0 index: -1 menu-bg rotate: false - xy: 1008, 95 + xy: 423, 59 size: 14, 31 split: 2, 2, 0, 31 orig: 14, 31 @@ -870,7 +768,7 @@ menu-bg index: -1 menu-bg-down rotate: false - xy: 446, 28 + xy: 996, 77 size: 14, 24 split: 2, 2, 0, 24 orig: 14, 24 @@ -878,7 +776,7 @@ menu-bg-down index: -1 menu-bg-over rotate: false - xy: 437, 2 + xy: 470, 54 size: 14, 24 split: 2, 2, 0, 24 orig: 14, 24 @@ -886,7 +784,7 @@ menu-bg-over index: -1 menu-bg-up rotate: false - xy: 506, 18 + xy: 486, 54 size: 14, 24 split: 2, 2, 0, 24 orig: 14, 24 @@ -894,14 +792,14 @@ menu-bg-up index: -1 origin-anchor rotate: false - xy: 2, 2 + xy: 782, 67 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 padded-list-selection rotate: false - xy: 632, 39 + xy: 404, 5 size: 10, 3 split: 4, 4, 1, 1 pad: 4, 4, 0, 0 @@ -910,7 +808,7 @@ padded-list-selection index: -1 panel rotate: false - xy: 522, 39 + xy: 439, 54 size: 11, 36 split: 3, 3, 33, 2 orig: 11, 36 @@ -918,7 +816,7 @@ panel index: -1 popup-menu rotate: false - xy: 122, 2 + xy: 562, 24 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 @@ -926,7 +824,7 @@ popup-menu index: -1 popup-menu-disabled rotate: false - xy: 537, 98 + xy: 253, 25 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 @@ -934,7 +832,7 @@ popup-menu-disabled index: -1 popup-menu-down rotate: false - xy: 112, 2 + xy: 416, 5 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 @@ -942,7 +840,7 @@ popup-menu-down index: -1 popup-menu-over rotate: false - xy: 117, 2 + xy: 647, 58 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 @@ -950,84 +848,35 @@ popup-menu-over index: -1 progressbar rotate: false - xy: 253, 25 + xy: 1021, 87 size: 1, 5 orig: 1, 5 offset: 0, 0 index: -1 progressbar-filled rotate: false - xy: 409, 23 + xy: 1021, 80 size: 1, 5 orig: 1, 5 offset: 0, 0 index: -1 progressbar-filled-vertical rotate: false - xy: 192, 2 + xy: 2, 2 size: 5, 1 orig: 5, 1 offset: 0, 0 index: -1 progressbar-vertical rotate: false - xy: 199, 2 + xy: 326, 2 size: 5, 1 orig: 5, 1 offset: 0, 0 index: -1 -radio-down - rotate: false - xy: 396, 2 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-down-on - rotate: false - xy: 844, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-off - rotate: false - xy: 861, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-on - rotate: false - xy: 878, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-on-disabled - rotate: false - xy: 895, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-over-off - rotate: false - xy: 912, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 -radio-over-on - rotate: false - xy: 929, 87 - size: 15, 15 - orig: 15, 15 - offset: 0, 0 - index: -1 scroll rotate: false - xy: 953, 80 + xy: 397, 2 size: 5, 6 split: 2, 2, 2, 2 orig: 5, 6 @@ -1035,7 +884,7 @@ scroll index: -1 scroll-horizontal rotate: false - xy: 89, 6 + xy: 486, 13 size: 6, 5 split: 2, 2, 0, 5 pad: -1, -1, 2, 2 @@ -1044,7 +893,7 @@ scroll-horizontal index: -1 scroll-knob-horizontal rotate: false - xy: 97, 6 + xy: 541, 22 size: 6, 5 split: 2, 2, 0, 5 pad: -1, -1, 2, 2 @@ -1053,7 +902,7 @@ scroll-knob-horizontal index: -1 scroll-knob-vertical rotate: false - xy: 946, 80 + xy: 390, 2 size: 5, 6 split: 2, 2, 2, 2 orig: 5, 6 @@ -1061,147 +910,147 @@ scroll-knob-vertical index: -1 select-box-list-bg rotate: false - xy: 84, 2 + xy: 342, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 select-box-list-bg-white rotate: false - xy: 87, 2 + xy: 418, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 select-down rotate: false - xy: 266, 2 + xy: 308, 2 size: 7, 4 orig: 7, 4 offset: 0, 0 index: -1 select-up rotate: false - xy: 105, 7 + xy: 317, 2 size: 7, 4 orig: 7, 4 offset: 0, 0 index: -1 selection rotate: false - xy: 413, 3 + xy: 22, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 selection-anchor rotate: false - xy: 398, 19 + xy: 793, 67 size: 9, 9 orig: 9, 9 offset: 0, 0 index: -1 separator rotate: false - xy: 601, 57 + xy: 259, 2 size: 1, 2 orig: 1, 2 offset: 0, 0 index: -1 separator-menu rotate: false - xy: 601, 57 + xy: 259, 2 size: 1, 2 orig: 1, 2 offset: 0, 0 index: -1 separator-vertical rotate: false - xy: 224, 2 + xy: 15, 2 size: 2, 1 orig: 2, 1 offset: 0, 0 index: -1 slider rotate: false - xy: 126, 7 + xy: 1021, 74 size: 1, 4 orig: 1, 4 offset: 0, 0 index: -1 slider-knob rotate: false - xy: 535, 53 + xy: 439, 30 size: 11, 22 orig: 11, 22 offset: 0, 0 index: -1 slider-knob-disabled rotate: false - xy: 548, 55 + xy: 259, 6 size: 11, 22 orig: 11, 22 offset: 0, 0 index: -1 slider-knob-down rotate: false - xy: 561, 55 + xy: 272, 6 size: 11, 22 orig: 11, 22 offset: 0, 0 index: -1 slider-knob-over rotate: false - xy: 574, 55 + xy: 285, 6 size: 11, 22 orig: 11, 22 offset: 0, 0 index: -1 slider-vertical rotate: false - xy: 206, 2 + xy: 404, 2 size: 4, 1 orig: 4, 1 offset: 0, 0 index: -1 splash_logo rotate: false - xy: 385, 54 + xy: 253, 54 size: 76, 72 orig: 76, 72 offset: 0, 0 index: -1 splitpane rotate: false - xy: 212, 2 + xy: 9, 2 size: 4, 1 orig: 4, 1 offset: 0, 0 index: -1 splitpane-over rotate: false - xy: 218, 2 + xy: 333, 2 size: 4, 1 orig: 4, 1 offset: 0, 0 index: -1 splitpane-vertical rotate: false - xy: 940, 72 + xy: 419, 86 size: 1, 4 orig: 1, 4 offset: 0, 0 index: -1 splitpane-vertical-over rotate: false - xy: 981, 82 + xy: 419, 80 size: 1, 4 orig: 1, 4 offset: 0, 0 index: -1 static-text rotate: false - xy: 477, 4 + xy: 236, 2 size: 7, 21 split: 3, 3, 0, 21 orig: 7, 21 @@ -1209,14 +1058,14 @@ static-text index: -1 sub-menu rotate: false - xy: 940, 78 + xy: 635, 54 size: 4, 7 orig: 4, 7 offset: 0, 0 index: -1 sub-menu-bg rotate: false - xy: 506, 44 + xy: 452, 71 size: 14, 31 split: 2, 2, 0, 31 orig: 14, 31 @@ -1224,7 +1073,7 @@ sub-menu-bg index: -1 tab-active rotate: false - xy: 236, 2 + xy: 1014, 105 size: 8, 21 split: 3, 3, 2, 1 orig: 8, 21 @@ -1232,23 +1081,23 @@ tab-active index: -1 tab-inactive rotate: false - xy: 246, 2 + xy: 226, 2 size: 8, 21 split: 3, 3, 2, 1 orig: 8, 21 offset: 0, 0 index: -1 -textfield-light +textfield rotate: false - xy: 764, 69 + xy: 519, 45 size: 14, 14 - split: 3, 3, 4, 3 + split: 2, 2, 3, 2 orig: 14, 14 offset: 0, 0 index: -1 -textfield-light-down +textfield-light rotate: false - xy: 702, 68 + xy: 503, 29 size: 14, 14 split: 3, 3, 4, 3 orig: 14, 14 @@ -1256,7 +1105,7 @@ textfield-light-down index: -1 textfield-light-over rotate: false - xy: 748, 69 + xy: 503, 45 size: 14, 14 split: 3, 3, 4, 3 orig: 14, 14 @@ -1264,7 +1113,7 @@ textfield-light-over index: -1 textfield-over rotate: false - xy: 748, 69 + xy: 503, 45 size: 14, 14 split: 2, 2, 3, 2 orig: 14, 14 @@ -1272,7 +1121,7 @@ textfield-over index: -1 thumbnail rotate: false - xy: 120, 7 + xy: 556, 23 size: 4, 4 split: 1, 2, 1, 2 orig: 4, 4 @@ -1280,7 +1129,7 @@ thumbnail index: -1 thumbnail-over rotate: false - xy: 114, 7 + xy: 641, 57 size: 4, 4 split: 1, 2, 1, 2 orig: 4, 4 @@ -1288,7 +1137,7 @@ thumbnail-over index: -1 tint-border rotate: false - xy: 81, 5 + xy: 382, 2 size: 6, 6 split: 2, 2, 2, 2 orig: 6, 6 @@ -1296,56 +1145,56 @@ tint-border index: -1 tool-align rotate: false - xy: 528, 103 + xy: 846, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-conuslight rotate: false - xy: 311, 43 + xy: 870, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-label rotate: false - xy: 552, 103 + xy: 894, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-mesh rotate: false - xy: 335, 43 + xy: 918, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-move rotate: false - xy: 576, 103 + xy: 942, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-sphericlight rotate: false - xy: 359, 43 + xy: 966, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 tool-transform rotate: false - xy: 600, 103 + xy: 990, 103 size: 22, 23 orig: 22, 23 offset: 0, 0 index: -1 toolbar-bg rotate: false - xy: 256, 2 + xy: 298, 2 size: 8, 4 split: 1, 2, 1, 1 orig: 8, 4 @@ -1353,7 +1202,7 @@ toolbar-bg index: -1 toolbar-down rotate: false - xy: 13, 2 + xy: 1014, 94 size: 8, 9 split: 2, 2, 3, 3 orig: 8, 9 @@ -1361,7 +1210,7 @@ toolbar-down index: -1 toolbar-normal rotate: false - xy: 23, 2 + xy: 804, 67 size: 8, 9 split: 2, 2, 3, 3 orig: 8, 9 @@ -1369,7 +1218,7 @@ toolbar-normal index: -1 toolbar-over rotate: false - xy: 33, 2 + xy: 814, 67 size: 8, 9 split: 2, 2, 3, 3 orig: 8, 9 @@ -1377,7 +1226,7 @@ toolbar-over index: -1 tooltip-bg rotate: false - xy: 129, 8 + xy: 652, 58 size: 3, 3 split: 1, 1, 1, 1 orig: 3, 3 @@ -1385,35 +1234,35 @@ tooltip-bg index: -1 touchpad-knob rotate: false - xy: 566, 79 + xy: 972, 79 size: 22, 22 orig: 22, 22 offset: 0, 0 index: -1 tree-minus rotate: false - xy: 43, 3 + xy: 503, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tree-over rotate: false - xy: 590, 80 + xy: 345, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 tree-plus rotate: false - xy: 53, 3 + xy: 513, 19 size: 8, 8 orig: 8, 8 offset: 0, 0 index: -1 tree-selection rotate: false - xy: 974, 81 + xy: 549, 22 size: 5, 5 split: 2, 2, 2, 2 pad: 1, 1, 1, 1 @@ -1422,113 +1271,197 @@ tree-selection index: -1 vis-blue rotate: false - xy: 604, 36 + xy: 25, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 vis-check rotate: false - xy: 780, 69 + xy: 519, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-check-down rotate: false - xy: 796, 69 + xy: 535, 45 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-check-over rotate: false - xy: 812, 69 + xy: 535, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-check-tick rotate: false - xy: 828, 69 + xy: 551, 45 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-check-tick-disabled rotate: false - xy: 844, 71 + xy: 551, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-radio rotate: false - xy: 860, 71 + xy: 567, 45 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-radio-down rotate: false - xy: 876, 71 + xy: 567, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-radio-over rotate: false - xy: 892, 71 + xy: 583, 45 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-radio-tick rotate: false - xy: 908, 71 + xy: 583, 29 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-radio-tick-disabled rotate: false - xy: 924, 71 + xy: 599, 45 size: 14, 14 orig: 14, 14 offset: 0, 0 index: -1 vis-red rotate: false - xy: 661, 41 + xy: 348, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 white rotate: false - xy: 127, 2 + xy: 567, 24 size: 3, 3 orig: 3, 3 offset: 0, 0 index: -1 window rotate: false - xy: 463, 75 + xy: 331, 75 size: 34, 51 split: 16, 16, 29, 20 orig: 34, 51 offset: 0, 0 index: -1 +window-action-close-hover + rotate: false + xy: 253, 30 + size: 50, 22 + orig: 50, 22 + offset: 0, 0 + index: -1 +window-action-close-normal + rotate: false + xy: 367, 104 + size: 50, 22 + orig: 50, 22 + offset: 0, 0 + index: -1 +window-action-close-pressed + rotate: false + xy: 367, 80 + size: 50, 22 + orig: 50, 22 + offset: 0, 0 + index: -1 +window-action-iconify-hover + rotate: false + xy: 448, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-iconify-normal + rotate: false + xy: 483, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-iconify-pressed + rotate: false + xy: 518, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-maximize-hover + rotate: false + xy: 553, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-maximize-normal + rotate: false + xy: 588, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-maximize-pressed + rotate: false + xy: 623, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-restore-hover + rotate: false + xy: 658, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-restore-normal + rotate: false + xy: 693, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 +window-action-restore-pressed + rotate: false + xy: 728, 104 + size: 33, 22 + orig: 33, 22 + offset: 0, 0 + index: -1 window-bg rotate: false - xy: 409, 20 + xy: 28, 2 size: 1, 1 orig: 1, 1 offset: 0, 0 index: -1 window-noborder rotate: false - xy: 253, 32 + xy: 419, 92 size: 27, 34 split: 5, 4, 26, 3 orig: 27, 34 diff --git a/assets/style/uiskin.json b/assets/style/uiskin.json index 0c220cbb..5a008ecd 100644 --- a/assets/style/uiskin.json +++ b/assets/style/uiskin.json @@ -147,20 +147,6 @@ selection: padded-list-selection, background: select-box-list-bg } - }, - white: { - font: default-font, - fontColor: black, - background: default-select-white, - backgroundOver: default-select-over, - scrollStyle: default, - listStyle: { - font: default-font, - fontColorSelected: black, - fontColorUnselected: black, - selection: list-selection-white, - background: select-box-list-bg-white - } } }, com.badlogic.gdx.scenes.scene2d.ui.SplitPane$SplitPaneStyle: { @@ -241,22 +227,6 @@ cursor: cursor } }, - com.badlogic.gdx.scenes.scene2d.ui.CheckBox$CheckBoxStyle: { - default: { - checkboxOn: check-on, - checkboxOff: check-off, - font: default-font, - fontColor: white, - disabledFontColor: grey - }, - radio: { - checkboxOn: radio-on, - checkboxOff: radio-off, - font: default-font, - fontColor: white, - disabledFontColor: grey - } - }, com.badlogic.gdx.scenes.scene2d.ui.List$ListStyle: { default: { fontColorUnselected: white, @@ -602,6 +572,26 @@ imageOver: icon-link-inactive, imageChecked: icon-link-active, imageCheckedOver: icon-unlink-active + }, + window-action-close: { + imageDown: window-action-close-pressed, + imageOver: window-action-close-hover, + imageUp: window-action-close-normal + }, + window-action-iconify: { + imageDown: window-action-iconify-pressed, + imageOver: window-action-iconify-hover, + imageUp: window-action-iconify-normal + }, + window-action-maximize: { + imageDown: window-action-maximize-pressed, + imageOver: window-action-maximize-hover, + imageUp: window-action-maximize-normal + }, + window-action-restore: { + imageDown: window-action-restore-pressed, + imageOver: window-action-restore-hover, + imageUp: window-action-restore-normal } }, com.badlogic.gdx.scenes.scene2d.ui.Slider$SliderStyle: { diff --git a/assets/style/uiskin.png b/assets/style/uiskin.png index 4d09f513..e5447d8a 100644 Binary files a/assets/style/uiskin.png and b/assets/style/uiskin.png differ diff --git a/hyperlap2d-common-api/src/main/java/games/rednblack/h2d/common/MsgAPI.java b/hyperlap2d-common-api/src/main/java/games/rednblack/h2d/common/MsgAPI.java index 7cf87ab9..2efba28f 100644 --- a/hyperlap2d-common-api/src/main/java/games/rednblack/h2d/common/MsgAPI.java +++ b/hyperlap2d-common-api/src/main/java/games/rednblack/h2d/common/MsgAPI.java @@ -34,6 +34,8 @@ public class MsgAPI { public static final String DISPOSE = GLOBAL_PREFIX + ".DISPOSE"; public static final String CREATE = GLOBAL_PREFIX + ".CREATE_BTN_CLICKED"; + public static final String WINDOW_MAXIMIZED = GLOBAL_PREFIX + ".WINDOW_MAXIMIZED"; + public static final String SAVE_EDITOR_CONFIG = GLOBAL_PREFIX + ".SAVE_EDITOR_CONFIG"; public static final String OPEN_CODE_EDITOR = GLOBAL_PREFIX + ".OPEN_CODE_EDITOR"; diff --git a/src/main/java/games/rednblack/editor/HyperLap2D.java b/src/main/java/games/rednblack/editor/HyperLap2D.java index 603789e7..2613ae63 100644 --- a/src/main/java/games/rednblack/editor/HyperLap2D.java +++ b/src/main/java/games/rednblack/editor/HyperLap2D.java @@ -147,11 +147,7 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList @Override public void dispose() { - facade.sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) () -> { - sendNotification(MsgAPI.DISPOSE); - VisUI.dispose(); - Gdx.app.exit(); - }); + closeRequested(); } @Override @@ -212,7 +208,7 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList @Override public void maximized(boolean isMaximized) { - + facade.sendNotification(MsgAPI.WINDOW_MAXIMIZED, isMaximized); } @Override @@ -227,7 +223,11 @@ public class HyperLap2D implements IProxy, ApplicationListener, Lwjgl3WindowList @Override public boolean closeRequested() { - sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) () -> Gdx.app.exit()); + facade.sendNotification(MsgAPI.CHECK_EDITS_ACTION, (Runnable) () -> { + sendNotification(MsgAPI.DISPOSE); + VisUI.dispose(); + Gdx.app.exit(); + }); return false; } diff --git a/src/main/java/games/rednblack/editor/controller/BootstrapViewCommand.java b/src/main/java/games/rednblack/editor/controller/BootstrapViewCommand.java index ac966bcb..7d86fe10 100644 --- a/src/main/java/games/rednblack/editor/controller/BootstrapViewCommand.java +++ b/src/main/java/games/rednblack/editor/controller/BootstrapViewCommand.java @@ -20,13 +20,11 @@ package games.rednblack.editor.controller; import games.rednblack.editor.HyperLap2DFacade; import games.rednblack.editor.splash.SplashScreenAdapter; -import games.rednblack.editor.view.ui.FollowersUIMediator; +import games.rednblack.editor.view.ui.*; import games.rednblack.editor.view.menu.HyperLap2DMenuBarMediator; import games.rednblack.editor.view.HyperLap2DScreenMediator; import games.rednblack.editor.view.stage.SandboxMediator; import games.rednblack.editor.view.stage.UIStageMediator; -import games.rednblack.editor.view.ui.RulersUIMediator; -import games.rednblack.editor.view.ui.UIDropDownMenuMediator; import games.rednblack.editor.view.ui.box.*; import games.rednblack.editor.view.ui.dialog.*; import games.rednblack.editor.view.ui.panel.CustomVariablesPanelMediator; @@ -48,6 +46,7 @@ public class BootstrapViewCommand extends SimpleCommand { facade.registerMediator(new HyperLap2DScreenMediator()); facade.registerMediator(new HyperLap2DMenuBarMediator()); + facade.registerMediator(new UIWindowActionMediator()); facade.registerMediator(new UICompositeHierarchyMediator()); facade.registerMediator(new UISceneBoxMediator()); diff --git a/src/main/java/games/rednblack/editor/view/menu/HyperLap2DMenuBarMediator.java b/src/main/java/games/rednblack/editor/view/menu/HyperLap2DMenuBarMediator.java index 0e837903..df0c94a7 100644 --- a/src/main/java/games/rednblack/editor/view/menu/HyperLap2DMenuBarMediator.java +++ b/src/main/java/games/rednblack/editor/view/menu/HyperLap2DMenuBarMediator.java @@ -42,6 +42,7 @@ import org.puremvc.java.patterns.mediator.Mediator; public class HyperLap2DMenuBarMediator extends Mediator { private static final String TAG = HyperLap2DMenuBarMediator.class.getCanonicalName(); public static final String NAME = TAG; + private ProjectManager projectManager; private SettingsManager settingsManager; diff --git a/src/main/java/games/rednblack/editor/view/ui/UIMainTable.java b/src/main/java/games/rednblack/editor/view/ui/UIMainTable.java index 1892399c..b04175a3 100644 --- a/src/main/java/games/rednblack/editor/view/ui/UIMainTable.java +++ b/src/main/java/games/rednblack/editor/view/ui/UIMainTable.java @@ -18,6 +18,9 @@ package games.rednblack.editor.view.ui; +import com.badlogic.gdx.utils.Align; +import com.kotcrab.vis.ui.VisUI; +import com.kotcrab.vis.ui.widget.VisImageButton; import com.kotcrab.vis.ui.widget.VisTable; import games.rednblack.editor.HyperLap2DFacade; import games.rednblack.editor.view.menu.HyperLap2DMenuBar; @@ -35,6 +38,7 @@ import games.rednblack.editor.view.ui.box.UIResourcesBoxMediator; import games.rednblack.editor.view.ui.box.UIToolBox; import games.rednblack.editor.view.ui.box.UIToolBoxMediator; import games.rednblack.editor.view.ui.widget.H2DLogo; +import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory; public class UIMainTable extends VisTable { private final VisTable topTable, middleTable; @@ -60,15 +64,26 @@ public class UIMainTable extends VisTable { } private void initMenuBar() { - HyperLap2DMenuBarMediator hyperlap2DMenuBarMediator = facade.retrieveMediator(HyperLap2DMenuBarMediator.NAME); - HyperLap2DMenuBar menuBar = hyperlap2DMenuBarMediator.getViewComponent(); topTable.add(new H2DLogo()).left().fillY(); - topTable.add(menuBar.getTable().padLeft(0)).fillX().height(32).expandX(); + + HyperLap2DMenuBarMediator hyperlap2DMenuBarMediator = facade.retrieveMediator(HyperLap2DMenuBarMediator.NAME); + HyperLap2DMenuBar menuBar = hyperlap2DMenuBarMediator.getViewComponent(); + topTable.add(menuBar.getTable()).height(32).growX(); + + //TODO Undecorated window is cool but should enable window dragging + /*VisTable titleTable = new VisTable(); + titleTable.setBackground(VisUI.getSkin().getDrawable("menu-bg")); + titleTable.add("Title"); + topTable.add(titleTable).growX().fillY(); + + UIWindowActionMediator uiWindowActionMediator = facade.retrieveMediator(UIWindowActionMediator.NAME); + UIWindowAction uiWindowAction = uiWindowActionMediator.getViewComponent(); + topTable.add(uiWindowAction).padTop(-1).fillY();*/ } private void initSupportMenus() { UISubmenuBar compositePanel = new UISubmenuBar(); - topTable.add(compositePanel).fillX().expandX().colspan(2).height(32); + topTable.add(compositePanel).fillX().colspan(2).expandX().height(32); } private void initLeftBoxesPanel() { diff --git a/src/main/java/games/rednblack/editor/view/ui/UIWindowAction.java b/src/main/java/games/rednblack/editor/view/ui/UIWindowAction.java new file mode 100644 index 00000000..b93778eb --- /dev/null +++ b/src/main/java/games/rednblack/editor/view/ui/UIWindowAction.java @@ -0,0 +1,62 @@ +package games.rednblack.editor.view.ui; + +import com.badlogic.gdx.scenes.scene2d.InputEvent; +import com.badlogic.gdx.scenes.scene2d.utils.ClickListener; +import com.badlogic.gdx.utils.Align; +import com.kotcrab.vis.ui.VisUI; +import com.kotcrab.vis.ui.widget.VisImageButton; +import com.kotcrab.vis.ui.widget.VisTable; +import games.rednblack.editor.HyperLap2DApp; +import games.rednblack.h2d.common.view.ui.StandardWidgetsFactory; + +public class UIWindowAction extends VisTable { + + private VisImageButton maximizeButton; + private boolean isMaximized; + + public UIWindowAction() { + setBackground(VisUI.getSkin().getDrawable("menu-bg")); + align(Align.top); + VisImageButton iconifyButton = StandardWidgetsFactory.createImageButton("window-action-iconify"); + add(iconifyButton).padRight(-1); + iconifyButton.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + HyperLap2DApp.getInstance().mainWindow.iconifyWindow(); + } + }); + + maximizeButton = StandardWidgetsFactory.createImageButton("window-action-maximize"); + add(maximizeButton).padRight(-1); + maximizeButton.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + if (isMaximized) { + HyperLap2DApp.getInstance().mainWindow.restoreWindow(); + } else { + HyperLap2DApp.getInstance().mainWindow.maximizeWindow(); + } + + } + }); + setMaximized(true); + + VisImageButton closeButton = StandardWidgetsFactory.createImageButton("window-action-close"); + add(closeButton); + closeButton.addListener(new ClickListener(){ + @Override + public void clicked(InputEvent event, float x, float y) { + HyperLap2DApp.getInstance().hyperlap2D.closeRequested(); + } + }); + } + + public void setMaximized(boolean maximized) { + isMaximized = maximized; + if (maximized) { + maximizeButton.setStyle(VisUI.getSkin().get("window-action-restore", VisImageButton.VisImageButtonStyle.class)); + } else { + maximizeButton.setStyle(VisUI.getSkin().get("window-action-maximize", VisImageButton.VisImageButtonStyle.class)); + } + } +} diff --git a/src/main/java/games/rednblack/editor/view/ui/UIWindowActionMediator.java b/src/main/java/games/rednblack/editor/view/ui/UIWindowActionMediator.java new file mode 100644 index 00000000..4bf14951 --- /dev/null +++ b/src/main/java/games/rednblack/editor/view/ui/UIWindowActionMediator.java @@ -0,0 +1,40 @@ +package games.rednblack.editor.view.ui; + +import games.rednblack.editor.HyperLap2DFacade; +import games.rednblack.h2d.common.MsgAPI; +import org.puremvc.java.interfaces.INotification; +import org.puremvc.java.patterns.mediator.Mediator; + +public class UIWindowActionMediator extends Mediator { + private static final String TAG = UIWindowActionMediator.class.getCanonicalName(); + public static final String NAME = TAG; + + + public UIWindowActionMediator() { + super(NAME, new UIWindowAction()); + } + + @Override + public void onRegister() { + super.onRegister(); + facade = HyperLap2DFacade.getInstance(); + } + + @Override + public String[] listNotificationInterests() { + return new String[]{ + MsgAPI.WINDOW_MAXIMIZED + }; + } + + @Override + public void handleNotification(INotification notification) { + super.handleNotification(notification); + + switch (notification.getName()) { + case MsgAPI.WINDOW_MAXIMIZED: + viewComponent.setMaximized(notification.getBody()); + break; + } + } +} diff --git a/src/main/java/games/rednblack/editor/view/ui/widget/CustomMenuBar.java b/src/main/java/games/rednblack/editor/view/ui/widget/CustomMenuBar.java index 92227c62..e2a3dfc7 100644 --- a/src/main/java/games/rednblack/editor/view/ui/widget/CustomMenuBar.java +++ b/src/main/java/games/rednblack/editor/view/ui/widget/CustomMenuBar.java @@ -20,7 +20,7 @@ public class CustomMenuBar { private CustomMenu currentMenu; - private Array menus = new Array(); + private Array menus = new Array<>(); public CustomMenuBar () { Skin skin = VisUI.getSkin();