Exemple #1
0
    public Crosshair()
    {
        StyleSheet = StyleSheet.FromFile("/ui/Crosshair.scss");

        for (int i = 0; i < 5; i++)
        {
            var p = Add.Panel("element");
            p.AddClass($"el{i}");
        }
    }
Exemple #2
0
        public ChatBox()
        {
            Current = this;

            StyleSheet = StyleSheet.FromFile("/ui/chat/ChatBox.scss");

            Canvas = Add.Panel("chat_canvas");

            Input = Add.TextEntry("");
            Input.AddEvent("onsubmit", () => Submit());
            Input.AddEvent("onblur", () => Close());
            Input.AcceptsFocus      = true;
            Input.AllowEmojiReplace = true;

            Sandbox.Hooks.Chat.OnOpenChat += Open;
        }
Exemple #3
0
        public Hud()
        {
            if (!IsClient)
            {
                return;
            }

            RootPanel.StyleSheet = StyleSheet.FromFile("/ui/Hud.scss");

            RootPanel.AddChild <RoundInfo>();
            RootPanel.AddChild <Vitals>();
            RootPanel.AddChild <Ammo>();

            RootPanel.AddChild <NameTags>();
            RootPanel.AddChild <DamageIndicator>();
            RootPanel.AddChild <HitIndicator>();

            RootPanel.AddChild <InventoryBar>();

            RootPanel.AddChild <ChatBox>();
            RootPanel.AddChild <Scoreboard>();
        }
    public DeathmatchHud()
    {
        if (!IsClient)
        {
            return;
        }

        RootPanel.StyleSheet = StyleSheet.FromFile("/ui/DeathmatchHud.scss");

        RootPanel.AddChild <Vitals>();
        RootPanel.AddChild <Ammo>();

        RootPanel.AddChild <NameTags>();
        RootPanel.AddChild <DamageIndicator>();
        RootPanel.AddChild <HitIndicator>();

        RootPanel.AddChild <InventoryBar>();
        RootPanel.AddChild <PickupFeed>();

        RootPanel.AddChild <ChatBox>();
        RootPanel.AddChild <KillFeed>();
        RootPanel.AddChild <Scoreboard>();
    }
Exemple #5
0
    public DeathmatchHud()
    {
        if (!IsClient)
        {
            return;
        }

        RootPanel.StyleSheet = StyleSheet.FromFile("/ui/DeathmatchHud.scss");

        //	RootPanel.AddChild<ChatUI>();

        RootPanel.AddChild <Vitals>();
        RootPanel.AddChild <Ammo>();

        //	health.BindToMethod( "text", () => Player.Local?.Health );

        RootPanel.AddChild <NameTags>();
        RootPanel.AddChild <CrosshairCanvas>();
        RootPanel.AddChild <InventoryBar>();

        RootPanel.AddChild <ChatBox>();
        RootPanel.AddChild <KillFeed>();
        //GameFeed = RootPanel.Add.PanelWithClass( "gamefeed" );
    }
Exemple #6
0
 public HitIndicator()
 {
     Current    = this;
     StyleSheet = StyleSheet.FromFile("/ui/HitIndicator.scss");
 }
 public DamageIndicator()
 {
     Current    = this;
     StyleSheet = StyleSheet.FromFile("/ui/DamageIndicator.scss");
 }
Exemple #8
0
    public VoiceList()
    {
        StyleSheet = StyleSheet.FromFile("/UI/VoiceChat/VoiceList.scss");

        Refresh();
    }
Exemple #9
0
 public Scoreboard()
 {
     StyleSheet = StyleSheet.FromFile("/ui/Scoreboard.scss");
 }
Exemple #10
0
        public KillFeed()
        {
            Current = this;

            StyleSheet = StyleSheet.FromFile("/ui/killfeed/KillFeed.scss");
        }
Exemple #11
0
 public NameTags()
 {
     StyleSheet = StyleSheet.FromFile("/ui/nametags/NameTags.scss");
 }
Exemple #12
0
 private IStyleSheet LoadStyleSheet()
 {
     return(StyleSheet.FromFile("DarkUI.css"));
 }
Exemple #13
0
        public void Test53()
        {
            var ss = StyleSheet.FromFile(TestHelper.GetTestFile("test53.css"));

            // throw new Exception(ss.ToString());


            Assert.Equal(
                @".block ::-webkit-input-placeholder {
  color: #cfcece;
  font-weight: 400;
}
.block :-ms-input-placeholder {
  color: #cfcece;
  font-weight: 400;
}
.block ::-moz-placeholder {
  color: #cfcece;
  font-weight: 400;
}
.block :-moz-placeholder {
  color: #cfcece;
  font-weight: 400;
}
.block.empty ::-webkit-input-placeholder {
  color: #b5ada9;
  font-weight: 400;
}
.block.empty :-ms-input-placeholder {
  color: #b5ada9;
  font-weight: 400;
}
.block.empty ::-moz-placeholder {
  color: #b5ada9;
  font-weight: 400;
}
.block.empty :-moz-placeholder {
  color: #b5ada9;
  font-weight: 400;
}
@keyframes domainProcessing {
  0% { box-shadow: inset 0 0 0 3px rgba(248, 202, 92, 1), 0 0 0 3px rgba(248, 202, 92, 0.6); }
  50% { box-shadow: inset 0 0 0 3px rgba(248, 202, 92, 0.4), 0 0 0 3px rgba(248, 202, 92, 0.2); }
  100% { box-shadow: inset 0 0 0 3px rgba(248, 202, 92, 1), 0 0 0 3px rgba(248, 202, 92, 0.2); }
}
@keyframes domainProcessing2 {
  0% { border-color: rgba(248, 202, 92, 0.4); }
  20% { border-color: rgba(248, 202, 92, 0.2); }
  100% { border-color: rgba(248, 202, 92, 0.2); }
}
.block {
  position: relative;
  min-height: 60px;
  border-bottom: solid 1px #f4f4f4;
  background: #fff;
  z-index: 1;
}
.block label {
  position: absolute;
  top: 10px;
  left: 0;
  width: 200px;
  line-height: 60px;
  font-size: 16px;
  font-weight: 500;
  text-align: right;
  color: #4c4c4c;
  user-select: none;
  z-index: 3;
}
.block .text,
.block .placeholderText {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0 50px 0 225px;
  line-height: 60px;
  font-size: 18px;
  font-weight: 400;
  color: #333;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-font-smoothing: antialiased;
  z-index: 2;
}
.block .description p {
  font-size: 15px;
  line-height: 20px;
  color: #a3a3a3;
}
.block .description { padding: 5px 250px 20px 225px; }", ss.ToString());
        }
Exemple #14
0
 public PickupFeed()
 {
     Current    = this;
     StyleSheet = StyleSheet.FromFile("/ui/PickupFeed.scss");
 }
        public CrosshairCanvas()
        {
            Singleton = this;

            StyleSheet = StyleSheet.FromFile("/ui/crosshair/CrosshairCanvas.scss");
        }
Exemple #16
0
 public StandardCrosshair()
 {
     StyleSheet = StyleSheet.FromFile("/ui/crosshair/StandardCrosshair.scss");
 }