Beispiel #1
0
        public static void ExecuteChangeStateLogic(string className)
        {
            var newState = HtmlAttributesLogic.CallFunction <State>($"{className}.Transit");

            Game.ChangeState(newState);
            Window.DrawLocation(Game.CurrentState);
        }
        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";
        }
        public static void DrawTextContent(HTMLElement element)
        {
            string functionName = $"RPIG.{element.GetElementAttributeValue(FUNCTION)}.GetTextContent";

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