예제 #1
0
 public void EndTrade()
 {
     TradePanel.Close();
     TradePanel     = null;
     AutoHideBubble = false;
     PositionItems();
 }
예제 #2
0
        public void BeginTrade(TradeEnvoy Envoy, Faction PlayerFaction)
        {
            PlayerFaction.World.Tutorial("trade_screen");
            TradePanel = GuiRoot.ConstructWidget(new Play.Trading.TradePanel
            {
                Rect   = GuiRoot.RenderData.VirtualScreen,
                Envoy  = Envoy.OwnerFaction.ParentFaction.CreateTradeEntity(Envoy),
                Player = new Trade.PlayerTradeEntity(PlayerFaction),
            }) as Play.Trading.TradePanel;

            TradePanel.Layout();

            GuiRoot.ShowDialog(TradePanel);
            GuiRoot.RootItem.SendToBack(TradePanel);

            AutoHideBubble = true;

            SpeakerBorder.Rect = new Rectangle(16, GuiRoot.RenderData.VirtualScreen.Height - (256 - 16), 256 - 32, 256 - 32);
            SpeakerRectangle.EntireMeshAsPart()
            .ResetQuad()
            .Scale(256, 256)
            .Translate(0, GuiRoot.RenderData.VirtualScreen.Height - 256);
            _Output.Rect = new Rectangle(256, GuiRoot.RenderData.VirtualScreen.Height - 260, global::System.Math.Min(GuiRoot.RenderData.VirtualScreen.Width - 256, 550), 260);

            SpeakerBorder.Invalidate();
            _Output.Invalidate();
            GuiRoot.RootItem.Invalidate();
        }