private void InitializeWindowAsEditTable() { _mType = LocalizationAssetsTableWindowType.Edit; float standardHeight = EditorGUIUtility.singleLineHeight; MyrmidonEditorLayoutElement buttons = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); buttons.SetDrawAction(Buttons); buttons.SetResizables(true, false); MyrmidonEditorLayoutElement empty = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); empty.SetResizables(true, false); MyrmidonEditorLayoutElement tableSelection = new MyrmidonEditorLayoutElement(0, standardHeight * 3, 1, 0); tableSelection.SetDrawAction(TableSelection); tableSelection.SetResizables(true, false); MyrmidonEditorLayoutElement empty2 = new MyrmidonEditorLayoutElement(0, 0, 1, 1); empty.SetResizables(true, true); MyrmidonEditorLayout layout = new MyrmidonEditorVerticalLayout(new List <MyrmidonEditorLayoutElement> { buttons, empty, tableSelection, empty2 }, true, true, false); layout.SetRect(new Rect(0, 0, position.width, position.height)); layout.Spacing = 5f; layout.SetPadding(10, 10, 10, 10); layout.ComputeRects(); _mWindowContainer = layout; }
public override void InitializeWindow() { base.InitializeWindow(); _mScrollviewPosition = new Vector2(0, 0); _mInformations = new LocaleCreatorInformations(); float standardHeight = EditorGUIUtility.singleLineHeight; MyrmidonEditorLayoutElement searchBar = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); searchBar.SetDrawAction(SearchBar); searchBar.SetResizables(true, false); MyrmidonEditorLayoutElement scroll = new MyrmidonEditorLayoutElement(0, 0, 1, 1); scroll.SetDrawAction(Scroll); MyrmidonEditorLayoutElement buttonsBar = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); buttonsBar.SetDrawAction(Buttons); buttonsBar.SetResizables(true, false); MyrmidonEditorLayoutElement empty = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); empty.SetResizables(true, false); MyrmidonEditorLayoutElement createButton = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); createButton.SetDrawAction(ButtonCreate); createButton.SetResizables(true, false); //searchBar.AssignBackgroundColor(Color.red); MyrmidonEditorLayout layout = new MyrmidonEditorVerticalLayout(new List <MyrmidonEditorLayoutElement> { searchBar, scroll, buttonsBar, empty, createButton }, true, true, false); layout.SetRect(new Rect(0, 0, position.width, position.height)); layout.Spacing = 5f; layout.SetPadding(10, 10, 10, 10); layout.ComputeRects(); _mWindowContainer = layout; }
private void InitializeWindowAsCreateTable() { _mType = LocalizationAssetsTableWindowType.Create; float standardHeight = EditorGUIUtility.singleLineHeight; MyrmidonEditorLayoutElement buttons = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); buttons.SetDrawAction(Buttons); buttons.SetResizables(true, false); MyrmidonEditorLayoutElement scroll = new MyrmidonEditorLayoutElement(0, 0, 1, 50); scroll.SetDrawAction(Scroll); scroll.SetResizables(true, true); MyrmidonEditorLayoutElement buttonsSelections = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); buttonsSelections.SetDrawAction(ButtonsSelection); buttonsSelections.SetResizables(true, false); MyrmidonEditorLayoutElement empty = new MyrmidonEditorLayoutElement(0, standardHeight, 1, 0); empty.SetResizables(true, false); MyrmidonEditorLayoutElement footer = new MyrmidonEditorLayoutElement(0, standardHeight * 5, 1, 0); footer.SetDrawAction(Footer); footer.SetResizables(true, false); MyrmidonEditorLayout layout = new MyrmidonEditorVerticalLayout(new List <MyrmidonEditorLayoutElement> { buttons, scroll, buttonsSelections, empty, footer }, true, true, false); layout.SetRect(new Rect(0, 0, position.width, position.height)); layout.Spacing = 5f; layout.SetPadding(10, 10, 10, 10); layout.ComputeRects(); _mWindowContainer = layout; }