コード例 #1
0
        public void DrawSettingsActions(Rect position)
        {
            float fullWindowWidth = position.width + 30;
            float controlHeight   = position.height * 0.16f;
            Rect  newPosition     = position;

            newPosition.width  = fullWindowWidth;
            newPosition.height = controlHeight;
            GUI.Label(newPosition, "Settings", EditorStyles.boldLabel);
            if (GUI.Button(newPosition, "Create new culture"))
            {
                CreateLanguageWindow.ShowWindow(this);
            }
            newPosition.y += controlHeight;

            if (GUI.Button(newPosition, "Export All Languages"))
            {
                BulkUpdateWindow.ShowWindow(BulkUpdateWindow.BulkUpdateMethod.Export, this);
            }
            newPosition.y += controlHeight;

            if (GUI.Button(newPosition, "Import All Languages"))
            {
                BulkUpdateWindow.ShowWindow(BulkUpdateWindow.BulkUpdateMethod.Import, this);
            }
        }
コード例 #2
0
        public static CreateLanguageWindow ShowWindow(SmartLocalizationWindow parentWindow)
        {
            CreateLanguageWindow thisWindow = (CreateLanguageWindow)EditorWindow.GetWindow <CreateLanguageWindow>("New Language");

            thisWindow.parentWindow = parentWindow;
            return(thisWindow);
        }