Esempio n. 1
0
File: App.cs Progetto: Demond98/RPIG
        public static void ExecuteChangeStateLogic(string className)
        {
            var newState = HtmlAttributesLogic.CallFunction <State>($"{className}.Transit");

            Game.ChangeState(newState);
            Window.DrawLocation(Game.CurrentState);
        }
Esempio n. 2
0
        public static void DrawChangeLocationElement(HTMLElement element)
        {
            var className = $"RPIG.{element.GetAttribute(FUNCTION)}";

            if (!element.TagName.Equals("a", StringComparison.OrdinalIgnoreCase))
            {
                element.Cast <HTMLButtonElement>().Disabled = !HtmlAttributesLogic.CallFunction <bool>($"{className}.IsActive");
            }

            element.OnClick       = _ => App.ExecuteChangeStateLogic(className);
            element.Style.Display = HtmlAttributesLogic.CallFunction <bool>($"{className}.IsHide")
                                ? "none"
                                : "inline";
        }
Esempio n. 3
0
        public static void DrawTextContent(HTMLElement element)
        {
            string functionName = $"RPIG.{element.GetElementAttributeValue(FUNCTION)}.GetTextContent";

            element.TextContent = HtmlAttributesLogic.CallFunction <string>(functionName);
        }