Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
weeeBox committed Dec 20, 2016
1 parent 53c9ab9 commit 25f17ef
Show file tree
Hide file tree
Showing 14 changed files with 63 additions and 63 deletions.
4 changes: 2 additions & 2 deletions Project/Assets/LunarPlugin/Editor/UI/CAboutWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected override void CreateUI()
{
const float indent = 12;

View contentView = new View(this.Width - 2 * indent, this.Height - 2 * indent);
CView contentView = new CView(this.Width - 2 * indent, this.Height - 2 * indent);
contentView.X = indent;
contentView.Y = indent;
AddSubview(contentView);
Expand All @@ -54,7 +54,7 @@ protected override void CreateUI()
copyrightLabel.Height += 20;
contentView.AddSubview(copyrightLabel);

View buttonsView = new View();
CView buttonsView = new CView();

CButton twitterButton = new CButton("Follow @LunarPlugin", delegate(CButton button) {
Application.OpenURL("https://twitter.com/intent/follow?screen_name=LunarPlugin&user_id=2939274198");
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CAbstractButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace LunarEditor
{
abstract class CAbstractButton : View
abstract class CAbstractButton : CView
{
public CAbstractButton(string title)
{
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CBox.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace LunarEditor
{
class CBox : View
class CBox : CView
{
public CBox(float width, float height)
: this(width, height, GUI.skin.box)
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CColorRect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

namespace LunarEditor
{
class CColorRect : View
class CColorRect : CView
{
private Color m_color;
private GUIStyle m_style;
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CHyperlink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

namespace LunarEditor
{
class CHyperlink : View
class CHyperlink : CView
{
private GUIContent m_content;
private string m_href;
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CLabel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace LunarEditor
{
class CLabel : View
class CLabel : CView
{
private GUIContent m_content;

Expand Down
4 changes: 2 additions & 2 deletions Project/Assets/LunarPlugin/Editor/UI/CModalWindow.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace LunarEditor
{
class CModalWindow
{
private static View m_rootView;
private static CView m_rootView;

public CModalWindow()
{
Expand Down Expand Up @@ -69,7 +69,7 @@ public void OnGUI()
}, "Test");
}

public static void Show(View rootView)
public static void Show(CView rootView)
{
if (rootView == null)
{
Expand Down
12 changes: 6 additions & 6 deletions Project/Assets/LunarPlugin/Editor/UI/CTableView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ enum CTableViewSelectionMode
Multiple
}

class CTableView : View
class CTableView : CView
{
private IDictionary<Type, TableViewCellList> m_reusableCellsLists;
private CCycleArray<TableViewCellEntry> m_cellsEntries;
Expand Down Expand Up @@ -610,7 +610,7 @@ private void OnChangeHeight(float delta)

#region Mouse clicks

private bool MouseDownEventHandler(View view, CEvent evt)
private bool MouseDownEventHandler(CView view, CEvent evt)
{
FocusControl();

Expand All @@ -623,7 +623,7 @@ private bool MouseDownEventHandler(View view, CEvent evt)
return false;
}

private bool MouseDoubleClickHandler(View view, CEvent evt)
private bool MouseDoubleClickHandler(CView view, CEvent evt)
{
FocusControl();

Expand Down Expand Up @@ -682,7 +682,7 @@ protected virtual bool OnMouseDoubleClick(CEvent evt, CTableViewCell cell)
return false;
}

protected virtual bool KeyDownEventHandler(View view, CEvent evt)
protected virtual bool KeyDownEventHandler(CView view, CEvent evt)
{
switch (evt.keyCode)
{
Expand Down Expand Up @@ -743,7 +743,7 @@ protected virtual bool KeyDownEventHandler(View view, CEvent evt)
return false;
}

private bool KeyUpEventHandler(View view, CEvent evt)
private bool KeyUpEventHandler(CView view, CEvent evt)
{
return false;
}
Expand Down Expand Up @@ -926,7 +926,7 @@ public bool IsSelected
}
}

class CTableViewCell : View
class CTableViewCell : CView
{
public CTableViewCell()
: this(0, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ interface ICTerminalCompositeViewDelegate
CTerminal Terminal { get; }
}

class CTerminalCompositeView : View
class CTerminalCompositeView : CView
{
private CConsoleView m_consoleView;
private CTextField m_commandField;
Expand Down Expand Up @@ -102,7 +102,7 @@ private void CreateUI()
m_commandField = new CTextField();
m_commandField.Width = Width;
AddSubview(m_commandField);
m_commandField.AlignX(View.AlignCenter);
m_commandField.AlignX(CView.AlignCenter);
m_commandField.AlignBottom(0);
m_commandField.AutoresizeMask = ViewAutoresizing.FlexibleTopMargin | ViewAutoresizing.FlexibleWidth;

Expand Down
6 changes: 3 additions & 3 deletions Project/Assets/LunarPlugin/Editor/UI/CTextField.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace LunarEditor
delegate void CTextFieldDelegate(CTextField field);
delegate bool CTextFieldKeyDelegate(CTextField field, KeyCode code, bool pressed);

class CTextField : View
class CTextField : CView
{
private string m_text;
private bool m_firstKeyDown;
Expand All @@ -58,7 +58,7 @@ public CTextField(float x, float y, float w, float h, string text = "")
this.KeyDown = KeyDownHandler;
}

private bool KeyDownHandler(View view, CEvent evt)
private bool KeyDownHandler(CView view, CEvent evt)
{
if (TextKeyDelegate == null)
{
Expand Down Expand Up @@ -101,7 +101,7 @@ private bool KeyDownHandler(View view, CEvent evt)
return false;
}

private bool KeyUpHandler(View view, CEvent evt)
private bool KeyUpHandler(CView view, CEvent evt)
{
if (TextKeyDelegate == null)
{
Expand Down
2 changes: 1 addition & 1 deletion Project/Assets/LunarPlugin/Editor/UI/CToggle.cs
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace LunarEditor
{
delegate void CToggleChangeDelegate(CToggle toggle);

class CToggle : View
class CToggle : CView
{
private GUIContent m_content;

Expand Down
10 changes: 5 additions & 5 deletions Project/Assets/LunarPlugin/Editor/UI/CToolBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

namespace LunarEditor
{
class CToolBar : View
class CToolBar : CView
{
public CToolBar(float width)
: base(width, CUISize.ToolbarHeight)
Expand Down Expand Up @@ -113,7 +113,7 @@ public override void OnGUI()
}
}

class CToolBarLabel : View
class CToolBarLabel : CView
{
private string m_text;

Expand Down Expand Up @@ -182,7 +182,7 @@ public override void OnGUI()

delegate void CToolBarDropListDelegate(CToolBarDropList list);

class CToolBarDropList : View
class CToolBarDropList : CView
{
private string m_title;
private int m_selectedValue;
Expand Down Expand Up @@ -302,7 +302,7 @@ public CToolBarDropListDelegate Delegate
}
}

class CToolBarSpace : View
class CToolBarSpace : CView
{
public CToolBarSpace(float pixels)
: base(pixels, 0)
Expand All @@ -315,7 +315,7 @@ public override void OnGUI()
}
}

class CToolBarFlexibleSpace : View
class CToolBarFlexibleSpace : CView
{
public override void OnGUI()
{
Expand Down
Loading

0 comments on commit 25f17ef

Please sign in to comment.