/***************************************************/ public static Panel Panel(PanelProperties properties) { return(new Panel { PanelProperties = properties, }); }
/***************************************************/ public static Panel Panel(ICurve panelCurve, PanelProperties properties) { return(new Panel { PanelCurve = panelCurve, PanelProperties = properties, }); }
/***************************************************/ public static Panel Panel(ICurve panelCurve, PanelProperties properties, IEnumerable <Opening> openings) { return(new Panel { PanelCurve = panelCurve, PanelProperties = properties, Openings = openings as List <Opening>, }); }
/// <summary> /// Repaints the strategy slots /// </summary> /// <param name="strategy">The strategy</param> public void RepaintStrategyControls(Strategy strategy) { _strategy = strategy; _slots = strategy.Slots; FlowLayoutStrategy.SuspendLayout(); foreach (ContextPanel pnl in SlotPanelsList) { pnl.Invalidate(); } PanelProperties.Invalidate(); FlowLayoutStrategy.ResumeLayout(); }
private Panel CreateInitialPanel(PanelProperties properties, Panel anchor, Direction anchorDirection, HashSet <Transform> createdTabs) { Panel panel = null; for (int i = 0; i < properties.tabs.Count; i++) { PanelTabProperties panelProps = properties.tabs[i]; if (panelProps.content) { if (createdTabs.Contains(panelProps.content)) { continue; } if (panelProps.content.parent != RectTransform) { panelProps.content.SetParent(RectTransform, false); } PanelTab tab; if (panel == null) { panel = PanelUtils.CreatePanelFor(panelProps.content, this); tab = panel[0]; } else { tab = panel.AddTab(panelProps.content); } tab.Icon = panelProps.tabIcon; tab.Label = panelProps.tabLabel; tab.MinSize = panelProps.minimumSize; tab.ID = panelProps.id; createdTabs.Add(panelProps.content); } } if (panel != null) { panel.ActiveTab = 0; if (anchor != null && anchorDirection != Direction.None) { panel.DockToPanel(anchor, anchorDirection); } } return(panel); }
//Ferme la fenêtre des propriétés et les enregistres dans la tilemap private void ValidateTileMapProp_Click(object sender, EventArgs e) { PanelProperties.Visible = false; PanelProperties.SendToBack(); //Coupe l'image chargee en tilemap tileMap.Cut((int)TileWidth.Value, (int)TileHeight.Value, (int)MarginWidth.Value, (int)MarginHeight.Value); columnCount = tileMap.tileCountX; rowCount = tileMap.tileCountY; TileCanvas.Width = columnCount * (tileMap.tileWidth + 1) + 1; TileCanvas.Height = rowCount * (tileMap.tileHeight + 1) + 1; //initialise la map, en lui donnant une taille maximum map = new Map(MapCanvas.Width / tileMap.tileWidth, MapCanvas.Height / tileMap.tileHeight); DisplayTilemap(); DisplayMap(); }
private Panel CreateInitialPanel(PanelProperties properties, Panel anchor, Direction anchorDirection, HashSet <Transform> createdTabs) { Panel panel = null; for (int i = 0; i < properties.tabs.Count; i++) { PanelTabProperties panelProps = properties.tabs[i]; if (panelProps.content != null && !panelProps.content.Equals(null)) { if (createdTabs.Contains(panelProps.content)) { continue; } if (panelProps.content.parent != RectTransform) { panelProps.content.SetParent(RectTransform, false); } int tabIndex = 0; if (panel == null) { panel = PanelUtils.CreatePanelFor(panelProps.content, this); } else { tabIndex = panel.AddTab(panelProps.content); } panel.SetTabTitle(tabIndex, panelProps.tabIcon, panelProps.tabLabel); panel.SetTabMinSize(tabIndex, panelProps.minimumSize); createdTabs.Add(panelProps.content); } } if (panel != null) { panel.ActiveTab = 0; if (anchor != null && anchorDirection != Direction.None) { panel.DockToPanel(anchor, anchorDirection); } } return(panel); }
//Met en premier plan la fenêtre pour entrer les propriétés de l'image (Tilemap) private void DisplayTileMapProperties() { PanelProperties.Visible = true; PanelProperties.BringToFront(); }
/***************************************************/ public static Panel Panel(ICurve panelCurve, PanelProperties properties, Opening opening) { return(Panel(panelCurve, properties, new List <Opening> { opening })); }