summaryrefslogtreecommitdiff
path: root/Runtime/GUI/UI9Slicing.h
blob: 98d8cf8f6b464b25c02d16448cade3256e3548b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "UIMesh.h"

enum ESlicing 
{
	Slicing_Simple,
	Slicing_Tiled,
};

// 九宫格
class UI9Slicing : public UIMesh
{
public:
	UI9Slicing(int mode, Vector2 horizontal, Vector2 vertical, Vector2 texPixelSize, Vector2 size)/*throw UIMeshException*/;

	void Draw() override;

private:
	int m_Slicing;
	Vector2 m_Horizontal; // 左右两条切割线到左边和右边的距离
	Vector2 m_Vertical;  // 上下两条切割线到上下的距离
	Vector2 m_TexSize;
	Vector2 m_Size;
};