Exemple #1
0
        public async Task ApplyInterfaceHelpers(params CPlayer[] players)
        {
            CManialink.Build(@"
<script>
    <!--
  main()
  {
    declare MNC_ScoresTableVisible for LocalUser = False;
    while(True)
    {
      yield;
      MNC_ScoresTableVisible = PageIsVisible;
    }
  }
--></script>
")
            .SetName("VisibleScoresTable")
            .SetID("visiblescorestable")
            .SetLayerType(CManialink.EUILayerType.ScoresTable)
            .Send(new[] { Manager }, 0, players);
        }
Exemple #2
0
        public override async Task Init()
        {
            await base.Init();

            mapinfoError = new Dictionary <string, string>()
            {
                { "UId", "error" }
            };

            Manialink_MapList = CManialink.Build(await FileIO.ReadTextAsync("maplist.xml"), this)
                                .SetID("maplist")
                                .SetName("MapList")
                                .SetVersion(3);
            string frameInstance = "";

            for (int i = 0; i < 50; i++)
            {
                frameInstance += $"<frameinstance hidden='1' modelid='view' id='view_{i}' pos='0 {50 - (i * 10)}' z-index='1' />";
            }
            Manialink_MapList.SetParameter("FrameInstances", frameInstance);

            GC.Collect(); //< beaucoup de strings là

            Manialink_MapWidget = CManialink.Build(await FileIO.ReadTextAsync("mapwidget.xml"), this)
                                  .SetID("mapwidget")
                                  .SetName("MapWidget")
                                  .SetVersion(3);
            Manialink_MapSideBarTools = CManialink.Build(await FileIO.ReadTextAsync("mapsidebartools.xml"), this)
                                        .SetID("mapsidebartools")
                                        .SetName("MapSideBar tools")
                                        .SetVersion(3);
            Manialink_MapInfo = CManialink.Build(await FileIO.ReadTextAsync("mapinfo.xml"), this)
                                .SetID("mapinfo")
                                .SetName("MapInfo")
                                .SetVersion(3);
            Manialink_ManiaExchangeList = CManialink.Build(await FileIO.ReadTextAsync("mapmxlist.xml"), this)
                                          .SetID("mxlist")
                                          .SetName("ManiaExchange L")
                                          .SetVersion(3);
        }