コード例 #1
0
 void ReadButtonArrow(Overlay.ButtonName buttonName, ref Overlay.ButtonName?buttonThatNeedsTarget, string button, Overlay currentOverlay)
 {
     if (button.Contains("overlay_next"))
     {
         buttonThatNeedsTarget = buttonName;
     }
     currentOverlay.SetButton(buttonName, FindButtonByTag(button), null);
 }
コード例 #2
0
        void AddArrowButton(List <string> lines, int o, Overlay overlay, Overlay.ButtonName buttonName, ref int i, string x, string y, string w = "05", string h = "0875")
        {
            string command = "";

            if (overlay.GetAssignedKey(buttonName) != null)
            {
                command = KeyName(overlay.GetAssignedKey(buttonName));
            }
            else if (overlay.GetAssignedOverlay(buttonName) != null)
            {
                command = "overlay_next";
            }
            if (command != "")
            {
                lines.Add("overlay" + o + "_desc" + i + " = \"" + command + ",0." + x + ",0." + y + ",radial,0." + w + ",0." + h + "\"");
                if (command == "overlay_next")
                {
                    lines.Add("overlay" + o + "_desc" + i + "_next_target = \"" + overlay.GetAssignedOverlay(buttonName).Text + "\"");
                }
                i++;
            }
        }
コード例 #3
0
        void AddLeftOrRightButton(List <string> lines, int o, Overlay overlay, Overlay.ButtonName buttonName, ref int i, int j, bool right)
        {
            string command = "";

            if (overlay.GetAssignedKey(buttonName) != null)
            {
                command = KeyName(overlay.GetAssignedKey(buttonName));
            }
            else if (overlay.GetAssignedOverlay(buttonName) != null)
            {
                command = "overlay_next";
            }
            if (command != "")
            {
                lines.Add("overlay" + o + "_desc" + i + " = \"" + command + ",0." + (right ? "94" : "05") + ",0." + (2 * j + 1) + ",rect,0.056,0.096\"");
                lines.Add("overlay" + o + "_desc" + i + "_overlay = " + ButtonToIcon(overlay.GetText(buttonName)) + ".png");
                if (command == "overlay_next")
                {
                    lines.Add("overlay" + o + "_desc" + i + "_next_target = \"" + overlay.GetAssignedOverlay(buttonName).Text + "\"");
                }
                i++;
            }
        }