コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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;
 }
コード例 #4
0
    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);
    }
コード例 #5
0
    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;
    }
コード例 #6
0
 void Awake()
 {
     props  = PropertiesSingleton.instance;
     em     = WorkspaceEventManager.instance;
     canvas = GetComponent <CanvasController>();
     createCanvas();
     prebuildCanvasCamConfig();
     ScreenSizeController.onResolutionChange += onResolutionChangeListener;
     em.onSheetChange   += onSheetChangeListener;
     em.onPicIconeClick += onPictureIconClickListener;
 }
コード例 #7
0
 void Awake()
 {
     props = PropertiesSingleton.instance;
     em = WorkspaceEventManager.instance;
     canvas = GetComponent<CanvasController>();
     createCanvas();
     prebuildCanvasCamConfig();
     ScreenSizeController.onResolutionChange += onResolutionChangeListener;
     em.onSheetChange += onSheetChangeListener;
     em.onPicIconeClick += onPictureIconClickListener;
 }
コード例 #8
0
ファイル: ScrollBars.cs プロジェクト: happyjiahan/colorus
    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();
    }
コード例 #9
0
    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>();
            }
        }
    }
コード例 #10
0
    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();
    }
コード例 #11
0
 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);
     }
 }
コード例 #12
0
    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;
    }
コード例 #13
0
 public void setPoint(IntVector2 point)
 {
     drawMesh = true;
     mesh     = lineMeshType.GetPointMesh(point, mat.mainTexture.width, mat.mainTexture.height);
     mat      = PropertiesSingleton.getLineRendererMaterial();
 }
コード例 #14
0
 public void init()
 {
     props = PropertiesSingleton.instance;
     WorkspaceEventManager.instance.onWrongAction += onWrongactionListener;
 }
コード例 #15
0
 public void init()
 {
     props = PropertiesSingleton.instance;
     WorkspaceEventManager.instance.onWrongAction += onWrongactionListener;
 }
コード例 #16
0
 public ToolBucketStrategyImpl()
 {
     canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
     canvasConfig = canvas.config;
     props = PropertiesSingleton.instance;
 }
コード例 #17
0
 public ToolBucketStrategyImpl()
 {
     canvas       = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
     canvasConfig = canvas.config;
     props        = PropertiesSingleton.instance;
 }
コード例 #18
0
ファイル: MainOnGUI.cs プロジェクト: happyjiahan/colorus
 void Awake()
 {
     recalculatePositions();
     props = PropertiesSingleton.instance;
 }
コード例 #19
0
 void Awake()
 {
     recalculatePositions();
     props = PropertiesSingleton.instance;
 }