public void CreateGui() { // menu niveau GUIItemV2 edition = new GUIItemV2 (0, 0, TextManager.GetText("PoolDesigner.Edit"), "leftOutilOn", "leftOutilOff", this, true); GUIItemV2 snap = new GUIItemV2 (0, 1, TextManager.GetText("PoolDesigner.Snap"), "leftOutilOn", "leftOutilOff", this, true); GUIItemV2 plan = new GUIItemV2 (0, 2, TextManager.GetText("PoolDesigner.Plan"), "leftOutilOn", "leftOutilOff", this, true); GUIItemV2 img = new GUIItemV2 (0, 5, TextManager.GetText("PoolDesigner.Image"), "leftOutilOn", "leftOutilOff", this, true); GUIItemV2 cotation = new GUIItemV2 (0, 6, TextManager.GetText("PoolDesigner.Cotation"), "leftOutilOn", "leftOutilOff", this, true); // snap _alignedSnapping = new GUICheckbox (1, 0, TextManager.GetText("PoolDesigner.AlignedSnap"), "leftOutilOn", "leftOutilOff", this); _alignedSnapping.SetValue (true); _angleSnapping = new GUICheckbox (1, 1, TextManager.GetText("PoolDesigner.AngleSnap"), "leftOutilOn", "leftOutilOff", this); snap.addSubItem (_alignedSnapping); //snap.addSubItem (_angleSnapping); // cotation _squareCotation = new GUICheckbox (1, 2, TextManager.GetText("PoolDesigner.SquareCotation"), "leftOutilOn", "leftOutilOff", this); _edgeCotation = new GUICheckbox (1, 3, TextManager.GetText("PoolDesigner.EdgeCotation"), "leftOutilOn", "leftOutilOff", this); _edgeCotation.SetValue (true); cotation.addSubItem (_squareCotation); cotation.addSubItem (_edgeCotation); // GUIItemV2 zoomToPoly = new GUIItemV2 (1, 2, TextManager.GetText("PoolDesigner.ZoomToPoly"), "leftOutilOn", "leftOutilOff", this); //plan.addSubItem (zoomToPoly); GUIItemMultiBtn validCancelReset = new GUIItemMultiBtn (0, "multi_bg", "", "", this, 20, true); GUIAutoItem clear = new GUIAutoItem (1, "", "clear", "clear", this); clear.doEvent += Clear; validCancelReset.addSubItem (clear); GUIAutoItem reset = new GUIAutoItem (1, "", "reset", "reset", this); reset.doEvent += Reset; validCancelReset.addSubItem (reset); GUIAutoItem valid = new GUIAutoItem (1, "", "valid", "valid", this); valid.doEvent += Validate; validCancelReset.addSubItem (valid); _curveSlider = new GUIHSlider (0, 3, "rightOutilOn", "rightOutilOff", this); GUIItemV2 delete = new GUIItemV2 (0, 4, TextManager.GetText("PoolDesigner.RemovePoint"), "rightOutilOn", "rightOutilOff", this); // menu image niveaux 0 GUIItemV2 load = new GUIItemV2 (0, 7, TextManager.GetText("PoolDesigner.Image.Load"), "rightOutilOn", "rightOutilOff", this); _showHideBackgroundImage = new GUICheckbox (0, 8, TextManager.GetText("PoolDesigner.Image.ShowHide"), "rightOutilOn", "rightOutilOff", this); _showHideBackgroundImage.SetValue (true); GUIItemV2 scale = new GUIItemV2 (0, 9, TextManager.GetText("PoolDesigner.Image.Scale"), "rightOutilOn", "rightOutilOff", this); GUIItemV2 position = new GUIItemV2 (0, 10, TextManager.GetText("PoolDesigner.Image.Move"), "rightOutilOn", "rightOutilOff", this); GUIItemV2 removeImg = new GUIItemV2 (0, 11, TextManager.GetText("PoolDesigner.Image.Remove"), "rightOutilOn", "rightOutilOff", this); LeftRoot = new GUIItemV2 (-1, -1, "Root", "", "", this); LeftRoot.addSubItem (edition); LeftRoot.addSubItem (snap); LeftRoot.addSubItem (plan); LeftRoot.addSubItem (img); LeftRoot.addSubItem (cotation); LeftRoot.addSubItem (validCancelReset); RightRoot = new GUIItemV2 (-1, -1, "Root", "", "", this); RightRoot.addSubItem (_curveSlider); RightRoot.addSubItem (delete); bgImgRoot = new GUIItemV2 (-1, -1, "Root", "", "", this); bgImgRoot.addSubItem (load); bgImgRoot.addSubItem (_showHideBackgroundImage); bgImgRoot.addSubItem (scale); bgImgRoot.addSubItem (position); bgImgRoot.addSubItem (removeImg); LeftTitle = new GUIItemV2 (-1, -1, TextManager.GetText("PoolDesigner.LeftTitle"), "leftTitle", "leftTitle", this); RightTitle = new GUIItemV2 (-1, -1, TextManager.GetText("PoolDesigner.RightTitle"), "rightTitle", "rightTitle", this); bgImgTitle = new GUIItemV2 (-1, -1, TextManager.GetText("PoolDesigner.Image"), "rightTitle", "rightTitle", this); leftMenuGroup = new Rect(leftOff7, 0, 300, UnityEngine.Screen.height); rightMenuGroup = new Rect(rightOff7, 0, 300, UnityEngine.Screen.height); bgImgMenuGroup = new Rect(bgImgOff7, 0, 300, UnityEngine.Screen.height); leftRect = new Rect(leftOff7, UnityEngine.Screen.height / 2 - 200, 260, 420); rightRect = new Rect(rightOff7, UnityEngine.Screen.height / 2 - 100, 260, 200); bgImgRect = new Rect(bgImgOff7, UnityEngine.Screen.height / 2 - 150, 280, 300); LeftRoot.setSelected (0); canDisp = true; }