diff options
author | chai <chaifix@163.com> | 2021-11-03 09:52:26 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-03 09:52:26 +0800 |
commit | c10e0d92f46e5eaf25a69e1fafe5f4dbd8eaab9d (patch) | |
tree | 2eb1a91339b35fea68f48b2774355f496519db83 /Runtime/GUI/UI9Slicing.h | |
parent | 3898f2c648b1a731dead8337aad8912d2b8b80d7 (diff) |
*misc
Diffstat (limited to 'Runtime/GUI/UI9Slicing.h')
-rw-r--r-- | Runtime/GUI/UI9Slicing.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Runtime/GUI/UI9Slicing.h b/Runtime/GUI/UI9Slicing.h new file mode 100644 index 0000000..c88ba05 --- /dev/null +++ b/Runtime/GUI/UI9Slicing.h @@ -0,0 +1,25 @@ +#pragma once + +#include "UIMesh.h" + +enum ESlicing +{ + Slicing_Simple, + Slicing_Tiled, +}; + +// 九宫格 +class UI9Slicing : public UIMesh +{ +public: + UI9Slicing(ESlicing mode, Vector2 horizontal, Vector2 vertical, Vector2 texPixelSize, Vector2 size)/*throw UIMeshException*/; + + void Draw() override; + +private: + ESlicing m_Slicing; + Vector2 m_Horizontal; // 左右两条切割线到左边和右边的距离 + Vector2 m_Vertical; // 同上 + Vector2 m_TexSize; + Vector2 m_Size; +}; |