// First run void StartInitialize() { if (settings == null) { return; } size = 256; C2DMap.sizeX = size; C2DMap.sizeY = size; if (settings.currentFile == "") { New(); } else { LoadDirect(settings.currentFile); } MaterialPreviewEditor.Create(LStyle.MaterialName); startInitialize = true; ForceRepaint = true; ResetState(); maintainTextures(); }
private void renderMenuButtons() { float dy = Screen.height / 15f; ///34; float hy = Screen.height / 15 - 4; float y = hy / 2; float i = 0; int bsx = 200; int dbsx = (int)(bsx * 1.15f); GUI.color = LStyle.Colors [4]; GUI.DrawTexture(new Rect(Screen.width - dbsx, 0, Screen.width, Screen.height), background2); GUI.color = LStyle.Colors [4]; GUI.backgroundColor = LStyle.Colors [4]; int db = dbsx - bsx; if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "View material")) { MaterialPreviewEditor.Create(LStyle.MaterialName); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "New")) { New(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Load")) { Load(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Save")) { Save(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Save as")) { SaveAs(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "About")) { About(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Export")) { Export(); } i++; if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Abort")) { KillThread(); } if (GUI.Button(new Rect(Screen.width - bsx, y + dy * i++, bsx - db, hy), "Force calculate")) { output.changed = true; mouseUp = true; maintainTextures(); } /* if (GUI.Button (new Rect (Screen.width - bsx, y + dy * i++, bsx - db, hy), "Refresh nodes")) * RefreshNodesNew (); */ y += hy; }