Exemple #1
0
 protected override void Awake()
 {
     Text               = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     MainMenuButton     = CreateGameObject.CreateChildGameObject <MainMenuButton>(transform).GetComponent <MainMenuButton>();
     RestartLevelButton = CreateGameObject.CreateChildGameObject <RestartLevelButton>(transform).GetComponent <RestartLevelButton>();
     base.Awake();
 }
Exemple #2
0
        //--construction--//
        /// <summary>
        /// public form constructor.
        /// </summary>
        /// <param name="name"></param>
        public Form(string name, string verboseName) : base(name)
        {
            this.verboseName = verboseName;

            this.stackPanel  = new StackPanel();
            this.elementList = new List <FormElement>();

            this.facilityNameField = new ControlText("facilityName", "ASSISTED LIVING FACILITY NAME");
            this.facilityNameField.SetReadOnly(true);

            this.facilityNoField = new ControlInteger("licensNumber", "LICENSE NUMBER");
            this.facilityNoField.SetReadOnly(true);

            this.licensorNameField = new ControlText("licensorName", "LICENSOR NAME");
            this.licensorNameField.SetReadOnly(true);

            this.inspectionDateControl = new ControlDate("inspectionDate", "INSPECTION DATE");
            //this.inspectionDateControl.SetValue(new DateTime(1999, 1, 1));
            LayoutGrid headerGrid = new LayoutGrid("header");

            headerGrid.AddElement(this.facilityNameField, 0, 0, 9);
            headerGrid.AddElement(this.facilityNoField, 9, 0, 3);
            headerGrid.AddElement(this.inspectionDateControl, 0, 1, 3);
            headerGrid.AddElement(this.licensorNameField, 3, 1, 9);

            this.stackPanel.Children.Add(headerGrid.UIelement);
            this.SetHeaderValues();

            //be aware of new data if it's entered
            this.isSaved = true;
            //this.onDataEntered += this.OnDataEnteredHandler();
        }
 public void SetAndEnable(string text)
 {
     if (!StopWatch.enabled)
     {
         ControlText.SetAnchors(new Vector2(ControlText.rectTransform.anchorMin.x, 0.1f), new Vector2(ControlText.rectTransform.anchorMax.x, 0.1f));
         StopWatch.StartTimer();
         ControlText.text = text;
         Canvas.enabled   = true;
     }
 }
 public void Update()
 {
     if (StopWatch.TimeSinceStarted > 3)
     {
         StopWatch.StopTimer();
         Canvas.enabled = false;
     }
     else
     {
         ControlText.SetAnchors(new Vector2(ControlText.rectTransform.anchorMin.x, ControlText.rectTransform.anchorMin.y + StopWatch.TimeSinceStarted / 1000),
                                new Vector2(ControlText.rectTransform.anchorMax.x, ControlText.rectTransform.anchorMax.y + StopWatch.TimeSinceStarted / 1000));
     }
 }
        /// <summary>
        /// In HTML konvertieren+
        /// </summary>
        /// <returns>Die Seite als HTML-Baum</returns>
        public override IHtmlNode Render()
        {
            var statusCode = new ControlText()
            {
                Text    = StatusCode.ToString(),
                Format  = TypeFormatText.H2,
                Margin  = new PropertySpacingMargin(PropertySpacing.Space.One),
                Padding = new PropertySpacingPadding(PropertySpacing.Space.Four)
            };

            var title = new ControlText()
            {
                Text   = StatusTitle,
                Format = TypeFormatText.H3,
                Margin = new PropertySpacingMargin(PropertySpacing.Space.Two, PropertySpacing.Space.Three)
            };

            var message = new ControlPanelCard(new ControlText()
            {
                Text   = StatusMessage,
                Margin = new PropertySpacingMargin(PropertySpacing.Space.Two, PropertySpacing.Space.Three)
            })
            {
                BackgroundColor = new PropertyColorBackground(TypeColorBackground.Light)
            };

            var panel = new ControlPanel(title, message)
            {
                Margin = new PropertySpacingMargin(PropertySpacing.Space.Three)
            };
            var flex = new ControlPanelFlexbox(statusCode, panel)
            {
                Layout  = TypeLayoutFlexbox.Inline,
                Justify = TypeJustifiedFlexbox.Start,
                Align   = TypeAlignFlexbox.Stretch
            };

            Content.Add(Header);
            Content.Add(flex);

            return(base.Render());
        }
 protected override void Start()
 {
     RectTransform      = gameObject.AddComponent <RectTransform>();
     TextComponent      = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     TextComponent.text = DisplayText;
 }
Exemple #7
0
 void Start()
 {
     _groundHitbox = GroundHitbox.GetComponent <GroundHitbox>();
     _controlText  = ControlText.GetComponent <ControlText>();
 }
 protected override void Awake()
 {
     _text = CreateGameObject.CreateChildGameObject <ControlText>(transform).GetComponent <ControlText>();
     base.Awake();
 }