Ejemplo n.º 1
0
        public override void DoWindowContents(Rect inRect)
        {
            Rect bitMessage = new Rect(0, 0, inRect.width, 24f);

            GUI.BeginGroup(bitMessage);

            Rect label = new Rect(0, 0, 200f, 24f);

            Widgets.Label(label, "ChatMessage w/ Bits:");

            Rect   bitInput  = new Rect(label.width + WidgetRow.DefaultGap, 0, 200f, 24f);
            string bitBuffer = bits.ToString();

            Widgets.TextFieldNumeric <int>(bitInput, ref bits, ref bitBuffer);

            Rect submitChatMessage = new Rect(bitInput.x + bitInput.width + WidgetRow.DefaultGap, 0, 100f, 24f);

            if (Widgets.ButtonText(submitChatMessage, "Submit"))
            {
                TriggerController.CheckForBitEvents(bits, "hodlhodl");
            }

            GUI.EndGroup();
        }