diff options
author | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-12-13 00:07:19 +0800 |
commit | 60cbbdec07ab7a5636eac5b3c024ae44e937f4d4 (patch) | |
tree | b2c7b0a868f18159dbc43d8954e1bd7668549a88 /Client/Source/GUI/UI9Slicing.h |
+init
Diffstat (limited to 'Client/Source/GUI/UI9Slicing.h')
-rw-r--r-- | Client/Source/GUI/UI9Slicing.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Client/Source/GUI/UI9Slicing.h b/Client/Source/GUI/UI9Slicing.h new file mode 100644 index 0000000..6a37447 --- /dev/null +++ b/Client/Source/GUI/UI9Slicing.h @@ -0,0 +1,25 @@ +#pragma once + +#include "UIMesh.h" + +enum ESlicing +{ + Slicing_Simple, + Slicing_Tiled, +}; + +// 九宫格 +class UI9Slicing : public UIMesh +{ +public: + UI9Slicing(int mode, Vector2f horizontal, Vector2f vertical, Vector2f texPixelSize, Vector2f size)/*throw UIMeshException*/; + + void Draw() override; + +private: + int m_Slicing; + Vector2f m_Horizontal; // 左右两条切割线到左边和右边的距离 + Vector2f m_Vertical; // 上下两条切割线到上下的距离 + Vector2f m_TexSize; + Vector2f m_Size; +}; |