Example #1
0
 public ServerEquipory(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("ava", args => widget.SetGob((int)args[0]));
     SetHandler("set", Set);
     SetHandler("setres", SetResource);
 }
Example #2
0
 public ServerMapView(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("move", SetWorldPosition);
     SetHandler("place", Place);
     SetHandler("unplace", Unplace);
     SetHandler("polowner", ShowOverlayOwner);
 }
Example #3
0
 public ServerItemWidget(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("tt", SetTooltip);
     SetHandler("chres", SetResource);
     SetHandler("meter", SetMeter);
     SetHandler("num", SetAmount);
     // TODO: SetHandler("color")
     // widget.OverlayColor = (Color)args[0];
 }
Example #4
0
 public ServerCharWindow(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("btime", args => widget.BeliefTimer.Time = (int)args[0]);
     SetHandler("exp", args => widget.SetExp((int)args[0]));
     SetHandler("food", args => widget.FoodMeter.Update(args));
     SetHandler("studynum", args => widget.SetAttention((int)args[0]));
     SetHandler("nsk", SetAvailableSkills);
     SetHandler("psk", SetCurrentSkills);
     SetHandler("numen", SetNumen);
     SetHandler("wish", SetWish);
 }
Example #5
0
 public ServerCombatView(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("new", New);
     SetHandler("upd", Update);
     SetHandler("del", Delete);
     SetHandler("updod", UpdateOffenseDefense);
     SetHandler("cur", SetCurrent);
     SetHandler("atkc", SetCooldown);
     SetHandler("blk", SetManeuver);
     SetHandler("atk", SetAttack);
     SetHandler("offdef", SetOffenseDefense);
 }
Example #6
0
 public ServerBuddyList(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("add", Add);
     SetHandler("rm", Remove);
     SetHandler("sel", Select);
     SetHandler("chst", SetStatus);
     SetHandler("chnm", SetName);
     SetHandler("chgrp", SetGroup);
     SetHandler("i-set", SetInfo);
     SetHandler("i-act", args => widget.BuddyInfo.SetActions((BuddyActions)args[0]));
     SetHandler("i-ava", SetAvatar);
     SetHandler("i-atime", args => widget.BuddyInfo.SetLastSeenTime((int)args[0]));
     SetHandler("i-clear", args => widget.BuddyInfo.Clear());
     SetHandler("pwd", args => widget.Secret = (string)args[0]);
 }
Example #7
0
        public ServerWidget Create(
            string widgetType,
            ushort id,
            ServerWidget parent)
        {
            // if widget is supposed to be in a resource
            if (widgetType.Contains("/"))
            {
                // remove version, e.g. ui/land2:6 => ui/land2
                widgetType = widgetType.Split(':')[0];
            }

            FactoryMethod method;

            if (methods.TryGetValue(widgetType, out method))
            {
                return(method(id, parent));
            }

            throw new ArgumentException("Unknown widget type " + widgetType);
        }
Example #8
0
 public ServerBufflist(ushort id, ServerWidget parent) : base(id, parent)
 {
 }
Example #9
0
 public ServerCalendar(ushort id, ServerWidget parent) : base(id, parent)
 {
 }
Example #10
0
 public ServerAimWidget(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("aim", UpdateValue);
 }
Example #11
0
 public ServerLabel(ushort id, ServerWidget parent) : base(id, parent)
 {
 }
Example #12
0
 public ServerPartyWidget(ushort id, ServerWidget parent) : base(id, parent)
 {
 }
Example #13
0
 public ServerWindow(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("pack", Pack);
 }
Example #14
0
 public static ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerChat(id, parent));
 }
Example #15
0
 public ServerButton(ushort id, ServerWidget parent) : base(id, parent)
 {
 }
Example #16
0
 public ServerCharlist(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("add", AddCharacter);
 }
Example #17
0
 public ServerVMeter(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("set", Set);
 }
Example #18
0
 public static ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerFlowerMenu(id, parent));
 }
Example #19
0
 public ServerFlowerMenu(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("act", _ => widget.Remove());
     SetHandler("cancel", _ => widget.Remove());
 }
Example #20
0
 public static ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerImageButton(id, parent));
 }
Example #21
0
 public ServerClaimWindow(ushort id, ServerWidget parent)
     : base(id, parent)
 {
     SetHandler("upd", UpdateArea);
     SetHandler("shared", UpdateRights);
 }
Example #22
0
 public ServerImage(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("ch", SetImage);
 }
Example #23
0
 public static new ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerClaimWindow(id, parent));
 }
Example #24
0
 public void Add(ServerWidget widget)
 {
     widgets[widget.Id] = widget;
 }
Example #25
0
 public ServerISBox(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("chnum", SetAmounts);
 }
Example #26
0
 public static new ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerBuddyList(id, parent));
 }
Example #27
0
 public static new ServerWidget Create(ushort id, ServerWidget parent)
 {
     return(new ServerEquipory(id, parent));
 }
Example #28
0
 public ServerMeter(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("set", Set);
     SetHandler("tt", SetTooltip);
 }
Example #29
0
 public ServerChat(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("log", Log);
     // TODO: SetHandler("focusme", ...)
 }
Example #30
0
 public ServerInventoryWidget(ushort id, ServerWidget parent) : base(id, parent)
 {
     SetHandler("sz", SetSize);
 }