Exemplo n.º 1
0
        private static void CaptureRegion(Rect region, string savePath, string filename)
        {
            string text  = " -save \"" + savePath + "\"";
            string text2 = string.Concat(new object[]
            {
                " -captureregion ",
                region.get_xMin(),
                " ",
                region.get_yMin(),
                " ",
                region.get_xMax(),
                " ",
                region.get_yMax(),
                " "
            });
            string arguments = string.Concat(new string[]
            {
                text2,
                text,
                "\"",
                filename,
                ".png\" -exit"
            });

            DocHelpers.MiniCap(arguments, true);
        }
Exemplo n.º 2
0
        public static void CaptureStateInspectorAction(Rect region, string actionName, int actionIndex)
        {
            if (DocHelpers.sw == null)
            {
                Debug.LogError("Must call StartStateActionListCapture first!");
                return;
            }
            Debug.Log("CaptureStateInspectorAction: " + actionName);
            string text = Labels.StripNamespace(actionName);

            actionName = string.Concat(new object[]
            {
                SkillEditor.SelectedFsmGameObject.get_name(),
                "_",
                SkillEditor.SelectedFsm.get_Name(),
                "_",
                SkillEditor.SelectedState.get_Name(),
                "_",
                actionIndex,
                "_",
                text
            });
            region.set_x(region.get_x() + (SkillEditor.Window.get_position().get_x() + SkillEditor.Inspector.View.get_x()));
            region.set_y(region.get_y() + (SkillEditor.Window.get_position().get_y() + SkillEditor.Inspector.View.get_y() + 43f));
            DocHelpers.CaptureRegion(region, "C:\\ActionScreens\\SampleScreens\\", actionName);
            DocHelpers.sw.WriteLine("<tr>");
            string text2          = "https://hutonggames.fogbugz.com/default.asp?";
            int    wikiPageNumber = EditorCommands.GetWikiPageNumber(text);

            if (wikiPageNumber > 0)
            {
                text2 = text2 + "W" + wikiPageNumber;
            }
            else
            {
                text2 = text2 + "ixWiki=1&pg=pgSearchWiki&qWiki=" + text;
            }
            DocHelpers.sw.WriteLine("<td width=\"301px\"><a href = \"" + text2 + "\">");
            DocHelpers.sw.WriteLine("<div id=\"actionSample\"><img src=\"http://hutonggames.com/docs/img/" + actionName + ".png\" title=\"\" /></div>");
            DocHelpers.sw.WriteLine("</a></td>");
            DocHelpers.sw.WriteLine("<td><p><strong>" + Labels.NicifyVariableName(text) + "</strong></p>");
            DocHelpers.sw.WriteLine("<p>TODO</p></td>");
            DocHelpers.sw.WriteLine("</tr>");
        }
 /// <summary>
 /// Shorter command for convenience (used a lot)
 /// </summary>
 protected string GetUrl(WikiPages page)
 {
     return(DocHelpers.GetWikiPageUrl(page));
 }