From 99b90496765df21c5f377f42b9ed073ccb34c1fd Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 1 Aug 2019 09:15:04 +0800 Subject: *misc --- Build/Asura.Editor/Asura.Editor.vcxproj | 29 ++--- Build/Asura.Editor/Asura.Editor.vcxproj.filters | 128 ++++++++-------------- bin/win64/01-window.exe | Bin 1462272 -> 1462272 bytes build/Asura.Editor/Asura.Editor.vcxproj | 29 ++--- build/Asura.Editor/Asura.Editor.vcxproj.filters | 128 ++++++++-------------- source/Asura.Editor/controls/binding/_button.cpp | 74 ------------- source/Asura.Editor/controls/button.cpp | 10 +- source/Asura.Editor/controls/button.h | 82 ++------------ source/Asura.Editor/controls/checkbox.cpp | 0 source/Asura.Editor/controls/checkbox.h | 0 source/Asura.Editor/controls/content.cpp | 8 ++ source/Asura.Editor/controls/content.h | 17 +++ source/Asura.Editor/controls/hslider.cpp | 0 source/Asura.Editor/controls/hslider.h | 0 source/Asura.Editor/controls/hvslider.cpp | 0 source/Asura.Editor/controls/hvslider.h | 0 source/Asura.Editor/controls/label.cpp | 8 ++ source/Asura.Editor/controls/label.h | 25 ++--- source/Asura.Editor/controls/menu_item.cpp | 0 source/Asura.Editor/controls/menu_item.h | 0 source/Asura.Editor/controls/panel.cpp | 16 +++ source/Asura.Editor/controls/panel.h | 16 +++ source/Asura.Editor/controls/progress.cpp | 0 source/Asura.Editor/controls/progress.h | 0 source/Asura.Editor/controls/radio_button.cpp | 0 source/Asura.Editor/controls/radio_button.h | 23 ---- source/Asura.Editor/controls/textbox.cpp | 0 source/Asura.Editor/controls/textbox.h | 0 source/Asura.Editor/controls/toggle.cpp | 8 ++ source/Asura.Editor/controls/toggle.h | 14 +++ source/Asura.Editor/controls/vslider.cpp | 0 source/Asura.Editor/controls/vslider.h | 0 source/Asura.Editor/controls/widget.h | 42 ------- source/Asura.Editor/core/gui_state.h | 17 +++ source/Asura.Editor/core/shaders.h | 11 -- source/Asura.Editor/core/signal.h | 52 --------- source/Asura.Editor/core/slot.h | 43 -------- source/Asura.Editor/dui_module.cpp | 8 -- source/Asura.Editor/dui_module.h | 24 ---- source/Asura.Editor/graphics/slider.cpp | 0 source/Asura.Editor/graphics/slider.h | 14 +++ source/Asura.Editor/graphics/style.cpp | 0 source/Asura.Editor/graphics/style.h | 15 +++ source/modules/asura-core/application.h | 6 +- source/modules/asura-core/graphics/gfx_device.cpp | 4 +- source/modules/asura-core/graphics/gfx_device.h | 2 +- source/modules/asura-core/graphics/gpu_buffer.cpp | 10 +- source/modules/asura-core/graphics/shader.cpp | 26 ++--- source/tests/win32/01-window/03_sub_menu.cpp | 40 +++---- 49 files changed, 307 insertions(+), 622 deletions(-) delete mode 100644 source/Asura.Editor/controls/binding/_button.cpp delete mode 100644 source/Asura.Editor/controls/checkbox.cpp delete mode 100644 source/Asura.Editor/controls/checkbox.h create mode 100644 source/Asura.Editor/controls/content.cpp create mode 100644 source/Asura.Editor/controls/content.h delete mode 100644 source/Asura.Editor/controls/hslider.cpp delete mode 100644 source/Asura.Editor/controls/hslider.h delete mode 100644 source/Asura.Editor/controls/hvslider.cpp delete mode 100644 source/Asura.Editor/controls/hvslider.h delete mode 100644 source/Asura.Editor/controls/menu_item.cpp delete mode 100644 source/Asura.Editor/controls/menu_item.h delete mode 100644 source/Asura.Editor/controls/progress.cpp delete mode 100644 source/Asura.Editor/controls/progress.h delete mode 100644 source/Asura.Editor/controls/radio_button.cpp delete mode 100644 source/Asura.Editor/controls/radio_button.h delete mode 100644 source/Asura.Editor/controls/textbox.cpp delete mode 100644 source/Asura.Editor/controls/textbox.h create mode 100644 source/Asura.Editor/controls/toggle.cpp create mode 100644 source/Asura.Editor/controls/toggle.h delete mode 100644 source/Asura.Editor/controls/vslider.cpp delete mode 100644 source/Asura.Editor/controls/vslider.h delete mode 100644 source/Asura.Editor/controls/widget.h create mode 100644 source/Asura.Editor/core/gui_state.h delete mode 100644 source/Asura.Editor/core/shaders.h delete mode 100644 source/Asura.Editor/core/signal.h delete mode 100644 source/Asura.Editor/core/slot.h delete mode 100644 source/Asura.Editor/dui_module.cpp delete mode 100644 source/Asura.Editor/dui_module.h create mode 100644 source/Asura.Editor/graphics/slider.cpp create mode 100644 source/Asura.Editor/graphics/slider.h create mode 100644 source/Asura.Editor/graphics/style.cpp create mode 100644 source/Asura.Editor/graphics/style.h diff --git a/Build/Asura.Editor/Asura.Editor.vcxproj b/Build/Asura.Editor/Asura.Editor.vcxproj index 38c60a7..72dc736 100644 --- a/Build/Asura.Editor/Asura.Editor.vcxproj +++ b/Build/Asura.Editor/Asura.Editor.vcxproj @@ -117,22 +117,17 @@ - - - - + - + - - - - + + @@ -143,23 +138,17 @@ - - - + - + - - - - - - - + + + diff --git a/Build/Asura.Editor/Asura.Editor.vcxproj.filters b/Build/Asura.Editor/Asura.Editor.vcxproj.filters index be12ded..0e979a4 100644 --- a/Build/Asura.Editor/Asura.Editor.vcxproj.filters +++ b/Build/Asura.Editor/Asura.Editor.vcxproj.filters @@ -10,18 +10,15 @@ {48600309-cddd-49cd-b939-7a19a2b1eaa3} - - {a4345092-d09c-424c-8d7c-c076914fb6a2} - - - {1e378398-d7f0-4616-a986-b6a86faeaa8c} - {4be8ce5c-0921-4341-a976-92d31aa84c8c} {b4c26f9c-9f4e-4332-a6e2-33456b4abecb} + + {a236e36b-9b74-48a2-a4c9-f70dbb321f14} + @@ -35,56 +32,41 @@ system - - controls + + graphics - - controls + + graphics - - controls + + graphics - - controls + + graphics - - controls + + system - - controls + + graphics - + controls - + controls - + controls - + controls - - controls\binding - - + controls - - graphics - - - graphics - - - graphics - - - graphics - - - system + + controls @@ -95,51 +77,9 @@ layout - - core - - - core - system - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - @@ -166,5 +106,29 @@ system + + core + + + graphics + + + controls + + + controls + + + controls + + + controls + + + controls + + + controls + \ No newline at end of file diff --git a/bin/win64/01-window.exe b/bin/win64/01-window.exe index 111ed2d..f3f2e54 100644 Binary files a/bin/win64/01-window.exe and b/bin/win64/01-window.exe differ diff --git a/build/Asura.Editor/Asura.Editor.vcxproj b/build/Asura.Editor/Asura.Editor.vcxproj index 38c60a7..72dc736 100644 --- a/build/Asura.Editor/Asura.Editor.vcxproj +++ b/build/Asura.Editor/Asura.Editor.vcxproj @@ -117,22 +117,17 @@ - - - - + - + - - - - + + @@ -143,23 +138,17 @@ - - - + - + - - - - - - - + + + diff --git a/build/Asura.Editor/Asura.Editor.vcxproj.filters b/build/Asura.Editor/Asura.Editor.vcxproj.filters index be12ded..0e979a4 100644 --- a/build/Asura.Editor/Asura.Editor.vcxproj.filters +++ b/build/Asura.Editor/Asura.Editor.vcxproj.filters @@ -10,18 +10,15 @@ {48600309-cddd-49cd-b939-7a19a2b1eaa3} - - {a4345092-d09c-424c-8d7c-c076914fb6a2} - - - {1e378398-d7f0-4616-a986-b6a86faeaa8c} - {4be8ce5c-0921-4341-a976-92d31aa84c8c} {b4c26f9c-9f4e-4332-a6e2-33456b4abecb} + + {a236e36b-9b74-48a2-a4c9-f70dbb321f14} + @@ -35,56 +32,41 @@ system - - controls + + graphics - - controls + + graphics - - controls + + graphics - - controls + + graphics - - controls + + system - - controls + + graphics - + controls - + controls - + controls - + controls - - controls\binding - - + controls - - graphics - - - graphics - - - graphics - - - graphics - - - system + + controls @@ -95,51 +77,9 @@ layout - - core - - - core - system - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - - - controls - @@ -166,5 +106,29 @@ system + + core + + + graphics + + + controls + + + controls + + + controls + + + controls + + + controls + + + controls + \ No newline at end of file diff --git a/source/Asura.Editor/controls/binding/_button.cpp b/source/Asura.Editor/controls/binding/_button.cpp deleted file mode 100644 index 9e6a6bb..0000000 --- a/source/Asura.Editor/controls/binding/_button.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include "../button.h" - -using namespace std; -using namespace Luax; - -namespace AsuraEditor -{ - namespace Controls - { - - LUAX_REGISTRY(Button) - { - LUAX_REGISTER_METHODS(state, - { "Connect", _Connect }, - { "Disconnect", _Disconnect }, - { "SetImage", _SetImage } - ); - } - - LUAX_POSTPROCESS(Button) - { - LUAX_REGISTER_ENUM(state, "EButtonStatus", - { "NORMAL", BUTTON_STATUS_NORMAL }, - { "0", 0 }, - { "PUSHED", BUTTON_STATUS_PUSHED }, - { "1", 1 }, - { "HOVER", BUTTON_STATUS_HOVER }, - { "2", 2 }, - { "DISABLED", BUTTON_STATUS_DISABLED }, - { "3", 3 }, - { "FOCUSED", BUTTON_STATUS_FOCUSED }, - { "4", 4 }, - { "STATUS_COUNT", _BUTTON_STATUS_COUNT }, - { "5", 5 } - ); - LUAX_REGISTER_ENUM(state, "EButtonMessage", - { "CLICK", BUTTON_MSG_CLICK }, - { "0", 0 }, - { "HOVER", BUTTON_MSG_HOVER }, - { "1", 1 }, - { "KILLFOCUS", BUTTON_MSG_KILLFOCUS }, - { "2", 2 }, - { "MSG_COUNT", _BUTTON_MSG_COUNT }, - { "3", 3 } - ); - - } - - // button:Connect() - LUAX_IMPL_METHOD(Button, _Connect) - { - LUAX_PREPARE(L, Button); - - return 0; - } - - // button:Disconnect() - LUAX_IMPL_METHOD(Button, _Disconnect) - { - LUAX_PREPARE(L, Button); - - return 0; - } - - // button:SetImage() - LUAX_IMPL_METHOD(Button, _SetImage) - { - LUAX_PREPARE(L, Button); - - return 0; - } - - } -} diff --git a/source/Asura.Editor/controls/button.cpp b/source/Asura.Editor/controls/button.cpp index 9910df4..c5741c1 100644 --- a/source/Asura.Editor/controls/button.cpp +++ b/source/Asura.Editor/controls/button.cpp @@ -1,6 +1,8 @@ -#include "button.h" +#include "gui_button.h" -namespace AsuraEditor -{ +namespace_begin(AsuraEditor) -} \ No newline at end of file + + + +namespace_end diff --git a/source/Asura.Editor/controls/button.h b/source/Asura.Editor/controls/button.h index 656d7d8..edfa7b7 100644 --- a/source/Asura.Editor/controls/button.h +++ b/source/Asura.Editor/controls/button.h @@ -1,82 +1,14 @@ -#ifndef __ASURA_EDITOR_BUTTON_H__ -#define __ASURA_EDITOR_BUTTON_H__ +#ifndef __ASURA_EDITOR_GUI_BUTTON_H__ +#define __ASURA_EDITOR_GUI_BUTTON_H__ -#include +#include -#include -#include +namespace_begin(AsuraEditor) -#include "../core/signal.h" -#include "widget.h" +bool Button(); -namespace AsuraEditor -{ - namespace Controls - { - enum ButtonStatus - { - BUTTON_STATUS_NORMAL = 0, - BUTTON_STATUS_PUSHED = 1, - BUTTON_STATUS_HOVER = 2, - BUTTON_STATUS_DISABLED = 3, - BUTTON_STATUS_FOCUSED = 4, - _BUTTON_STATUS_COUNT = 5, - }; - enum ButtonMessage - { - BUTTON_MSG_CLICK = 0, - BUTTON_MSG_HOVER = 1, - BUTTON_MSG_KILLFOCUS = 2, - _BUTTON_MSG_COUNT = 3, - }; +namespace_end - class Button - : public Widget - , public AEScripting::Portable