|
|
|
|
|
|
public class SimpleBox : CanvasElement |
|
|
|
{ |
|
|
|
protected string m_Title = "simpleBox"; |
|
|
|
public SimpleBox(Vector2 position, float size) |
|
|
|
public SimpleBox(Vector2 position, float width) |
|
|
|
scale = new Vector2(size, size); |
|
|
|
scale = new Vector2(width, width); |
|
|
|
} |
|
|
|
|
|
|
|
public override void Render(Rect parentRect, Canvas2D canvas) |
|
|
|
|
|
|
|
|
|
|
public class MoveableBox : SimpleBox |
|
|
|
{ |
|
|
|
public MoveableBox(Vector2 position, float size) |
|
|
|
: base(position,size) |
|
|
|
public MoveableBox(Vector2 position, float width) |
|
|
|
: base(position,width) |
|
|
|
{ |
|
|
|
m_Title = "Drag me!"; |
|
|
|
AddManipulator(new Draggable()); |
|
|
|
|
|
|
|
|
|
|
class ResizableBox : SimpleBox |
|
|
|
{ |
|
|
|
public ResizableBox(Vector2 position, float size) |
|
|
|
: base(position, size) |
|
|
|
public ResizableBox(Vector2 position, float width) |
|
|
|
: base(position, width) |
|
|
|
{ |
|
|
|
m_Title = "Resize me!"; |
|
|
|
AddManipulator(new Resizable()); |
|
|
|
|
|
|
WWW www = null; |
|
|
|
private float timeToNextPicture = 0.0f; |
|
|
|
|
|
|
|
public WWWImageBox(Vector2 position, float size) |
|
|
|
: base(position, size) |
|
|
|
public WWWImageBox(Vector2 position, float width) |
|
|
|
: base(position, width) |
|
|
|
{ |
|
|
|
m_Title = "I cause repaints every frame!"; |
|
|
|
AddManipulator(new Draggable()); |
|
|
|
|
|
|
private bool m_Toggle = true; |
|
|
|
private Texture2D m_aTexture = null; |
|
|
|
|
|
|
|
public IMGUIControls(Vector2 position, float size) |
|
|
|
: base(position, size) |
|
|
|
public IMGUIControls(Vector2 position, float width) |
|
|
|
: base(position, width) |
|
|
|
{ |
|
|
|
m_Caps = Capabilities.Unselectable; |
|
|
|
|
|
|
|