public void setTopLeftPosition(int left, int top, GUISkin skin) { canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas; props = PropertiesSingleton.instance; setStyle(skin, config.styleName, out config.style); config.left = left; config.top = top; recalculatePositions(); }
public void setScreenSize(MainMenuConfig mainMenuConfig) { props = PropertiesSingleton.instance; int width = mainMenuConfig.actualWidth; int height = mainMenuConfig.actualHeight; left = right = new Rect(0,0, config.borderSize, height); right.x = width - config.borderSize; top = bottom = new Rect (config.borderSize, 0, width - config.borderSize*2, config.borderSize); bottom.y = height - config.borderSize; }
public static LineController createInstance(string name, LineMeshTypeInt lineMeshType, Transform parentTransform) { GameObject go = new GameObject(name); go.transform.parent = parentTransform; LineController lc = go.AddComponent <LineController> (); lc.initialize(lineMeshType, PropertiesSingleton.getLineRendererMaterial()); return(lc); }
public void setScreenSize(MainMenuConfig mainMenuConfig) { props = PropertiesSingleton.instance; int width = mainMenuConfig.actualWidth; int height = mainMenuConfig.actualHeight; left = right = new Rect(0, 0, config.borderSize, height); right.x = width - config.borderSize; top = bottom = new Rect(config.borderSize, 0, width - config.borderSize * 2, config.borderSize); bottom.y = height - config.borderSize; }
void Awake() { props = PropertiesSingleton.instance; em = WorkspaceEventManager.instance; canvas = GetComponent <CanvasController>(); createCanvas(); prebuildCanvasCamConfig(); ScreenSizeController.onResolutionChange += onResolutionChangeListener; em.onSheetChange += onSheetChangeListener; em.onPicIconeClick += onPictureIconClickListener; }
void Awake() { props = PropertiesSingleton.instance; em = WorkspaceEventManager.instance; canvas = GetComponent<CanvasController>(); createCanvas(); prebuildCanvasCamConfig(); ScreenSizeController.onResolutionChange += onResolutionChangeListener; em.onSheetChange += onSheetChangeListener; em.onPicIconeClick += onPictureIconClickListener; }
public void setProperties(int left, int top, int contentWidth, int contentHeight, int margin, GUISkin skin) { propSingleton = PropertiesSingleton.instance; canvas = propSingleton.canvasWorkspaceController.canvas; this.left = left; this.top = top; this.margin = margin; this.contentWidth = contentWidth; this.contentHeight = contentHeight; horizontalScrollHeight =(int) skin.FindStyle("horizontalscrollbar").fixedHeight; verticalScrollWidth =(int) skin.FindStyle("verticalscrollbar").fixedWidth; recalculatePositions(); }
private void updateBufferLayers() { if (transform.childCount != PropertiesSingleton.instance.bufferCount) { destroyLayersGO(); for (int i = 0; i < PropertiesSingleton.instance.bufferCount; i++) { string name = "layer" + i; Vector3 position = PropertiesSingleton.getLayerZPosition(i); GameObject go = LayerUtil.createBufferLayer(BUFER_LAYER_SHADER_NAME, name, position, transform); go.AddComponent <LayerController>(); } } }
public void setProperties(int left, int top, int contentWidth, int contentHeight, int margin, GUISkin skin) { propSingleton = PropertiesSingleton.instance; canvas = propSingleton.canvasWorkspaceController.canvas; this.left = left; this.top = top; this.margin = margin; this.contentWidth = contentWidth; this.contentHeight = contentHeight; horizontalScrollHeight = (int)skin.FindStyle("horizontalscrollbar").fixedHeight; verticalScrollWidth = (int)skin.FindStyle("verticalscrollbar").fixedWidth; recalculatePositions(); }
public override void Init() { props = PropertiesSingleton.instance; if (props.language == null) { props.language = SystemLanguage.English; } allLanguagesCache = new Dictionary <SystemLanguage, Dictionary <string, string> >(); foreach (LanguageFile file in languages) { Dictionary <string, string> langDict = new Dictionary <string, string>(); for (int i = 0; i < file.entries.Count; i++) { langDict.Add(file.entries[i].key, file.entries[i].value); } allLanguagesCache.Add(file.language, langDict); } }
public void onMouseEnter() { Screen.showCursor = false; if (material == null) { material = PropertiesSingleton.getLineRendererMaterial(); } material.mainTexture = tool.pointerTexture; if (mesh == null) { mesh = MeshUtil.createPlaneMesh(material.mainTexture.width, material.mainTexture.height); } if (maskMesh == null) { maskMesh = MeshUtil.createPlaneMesh(tool.pointerMaskTexture.width, tool.pointerMaskTexture.height); } PropertiesSingleton.instance.cursors.cursorMaskMaterial.mainTexture = tool.pointerMaskTexture; drawCursor = true; material.color = PropertiesSingleton.instance.colorProperties.activeColor; WorkspaceEventManager.instance.onMouseEnterScrollbar += onScrollBarEnterListener; WorkspaceEventManager.instance.onMouseExitScrollbar += onScrollBarExitListener; }
public void setPoint(IntVector2 point) { drawMesh = true; mesh = lineMeshType.GetPointMesh(point, mat.mainTexture.width, mat.mainTexture.height); mat = PropertiesSingleton.getLineRendererMaterial(); }
public void init() { props = PropertiesSingleton.instance; WorkspaceEventManager.instance.onWrongAction += onWrongactionListener; }
public ToolBucketStrategyImpl() { canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas; canvasConfig = canvas.config; props = PropertiesSingleton.instance; }
void Awake() { recalculatePositions(); props = PropertiesSingleton.instance; }