using UnityEngine; using UnityEngine.UI; using System.Collections.Generic; using TMPro; public class _G : MonoBehaviour { //NEW FOR COUNTERTOP public static Dictionary SHAPE_SELECTIONS= new(); public static string designerEmail = "";//Designer email read from the opening URL public static Sprite Logo2;//Second member logo, for the members that have one public static string CLIENT_NAME = "";//Client name entered at project creation public static string CLIENT_EMAIL = "";//Client email entered at project creation public static string VER = "Alpha 1.0.0";//Version mumber public static int System; public static string Color1 = "373435"; public static string Color2 = "BE9A3C"; //FROM WEBGL public static bool PHOTO=false; public static string MemberNumber = "";//Member number if login active public static string User = "User";//Admin,Member,User,Free,Ciemetric public static bool UIT = false;//If Ukitchenit server or not public static bool saving;//Activate or not autosaving public static bool savingLocal;//Saving local available or not public static bool savingWeb;//Saving webCloud available or not public static string PATH;//Path for client library to download on member //public static string path;//Path adresee on server public static bool HD = false;//If on hight resolution or not public static string INSCRIPTION = "PY";//Subcription for UIT public static string EMAIL = "";//Email of the user public static string PASS = "";//Password for login public static Vector3 CC = new (0, 0, 0);//Center point of the scene public static bool PDFon = false;//If PDF Panel is on scene will be in HD public static byte[] PDF;//byte of PDF document public static float FPS;//Frame per second number public static string PDFname;//PDF name file public static int L = 1;//Language( 1 English, 2 french, 3 Spanish); public static int S = 0;//System Metric 1 or imperial 0 public static string Sys = " ''";//System symbol; public static string Sys2 = "sqr2";//System symbol area; public static Color pickedColor = Color.white;//picker color color for paint wall public static float CounterHeight = 1.25f;//Counter Height public static float CounterFront = 2f;//Projection counter from cabinet box public static string ROOM;//Room Style R1 t0 R12 public static bool NAVIGATE = true;//If scene is at navigate mode or not public static bool LockInState = false; public static bool Drag = false;//If object is Dragging or not public static float WIDE;//WIDE value of the Room public static float DEPTH;//DEPTH value of the Room public static float HEIGHT;//HEIGHT value of the Room //public static string Woods;//Wood style public static string SUN = "s10";//Sun position public static string IslandDepth = "Double";//Type d'îlot AI : "Simple" (1 rangée) ou "Double" (2 rangées) public static float price = 0;//price for calculation public static string PriceTotal = "0";//price for calculation public static string PNLSelect = "";//Panel name that is active public static bool PIN = true;//If panel Is Null or not public static string EDITCAT = "";//Category to be Edited ex BackSplash, Counter //public static CamSettings CAMSET = CamSettings.Front;//Camera set FRONT, TOP etc.. public static float CameraCliping = 2; public static bool SHOWCAP = false;//Shaow caps name oval on cabinet or not public static bool Load = true;//If Loading is On public static bool Redflag = false;//If Redflag On collition is detect public static float IntensityLight = 1500;//Light intensity for spot in scene public static float IntensitySun = 1;//Sun intensity for direction light public static float LS = 0.5f;//Line scale thicknes plan 2D public static string Form = ""; public static bool NT = false;//New texture on load public static float Floor_Rotation; public static List SelectionToAdd=new(); public static List ObjectInsideSelected = new(); public static string FlieCategory = "Design"; public static Dictionary LightColor= new(){{"WallColorLight",Color.white},{"BaseColorLight",Color.white}}; //Lexique public static Dictionary Lexique= new(); //ADMIN public static Texture2D LOGO; public static Texture2D LOGO2; public static Sprite Logo; public static Texture2D BACKGROUND; public static string[] COLS = new string[] { "FFFFFFFF", "150", "FFFFFFFF", "150", "FFFFFFFF", "150", "FFFFFFFF", "150" }; public static string PON;//Panel ON public static string TARGETTEXTURE; public static string CLIPBOARD= ""; public static string LogoSelect; //Row height public static string CODEPATERN = "";//Door cabinet patern door 1 public static string CODEPATERN2 = "";//Door cabinet patern if door 2 //public static string CODE = "";//Door cabinet patern door 1 //public static string CODE2 = "";//Door cabinet patern if door 2 public static float D1W = 12;//Patern wide public static float D2W = 0;//Patern wide public static string VF = "";//Variable Fix recipe public static string VF2 = "";//Variable Fix recipe door 2 ADN26 //Form setup public static Dictionary StoreInfo = new(){{"Name_ID","" },{"Address","" },{"Email","" },{"Phone","" }}; public static string StoreSelect = ""; public static string StoreCode = ""; public static string StoreZone = ""; public static string JobNumber = "";//Job Number public static string FileName = "FN";//File name public static string PDFName = "FN";//File name //Saving public static float SavingTimer;//Second interval to show message to save design public static int BKN=1;//Backup number add when saving on cloud backup public static string[] SOFTCOLOR = new string[10];//HexNumber color and alpha when opening the software(bar,a0, button,a1, icon,a2, Text,a3, BG,a4) public static int NW = 0;//Number of walls in scene public static int NWExterior = 0;//Number of Exterior walls faces in scene public static int NWInterior = 0;//Number of interior walls faces in scene public static bool Down = false;//Draw Pnl Mouse down or not public static bool Open = true;//Draw Pnl if Room Open or not //public static bool PNLOn = true; public static float pixs = 0;//Position X mouse in scene start public static float pixl = 1280;//Position X mouse in scene End public static float piys = 0;//Position Y mouse in scene start public static float piyl = 750;//Position Y mouse in scene End public static Vector3 OffsetPosition=Vector3.zero; public static Color colorBar = Color.white;//Color Bar at start pnl public static Color colorButton = Color.white;//Color Button public static Color colorIcon = Color.white;//Color Icon public static Color colorText = Color.white;//Color Text public static Color colorBG = Color.white;//Color BackGroud on start //Global mesures public static float caWD = 0;//cab wall depth public static float caWH = 0;//cab wall height public static float caTH = 0;//cab tall height public static float caKD = 2;//cab kick depth public static float caKH = 0;//cab kick height public static float caCH = 1.25f;//cab counter height public static float smalldrawer = 7f;//small drawer height public static float caWFF = 54;//Cab Wall from floor height public static float caWFC = 6;//Cab Wall from floor height public static float cat = 0.625f;//Cab side panel tickness public static float caCp = 1.75f;//Cab counter projection public static float caKr = 2f;//Cab kick retraction public static float cadt = 0.625f;//Cab Door Thickness public static float DGap = 0;//Door gap space between door and cabinet public static float pnlt = 0.625f;//Pnl Thickness public static float pnlfw = 25.5f;//Pnl fridge wide public static float pnlfh = 84f;//Pnl fridge height public static float pnldww = 25.5f;//Pnl dishwasher wide public static float pnldwh = 34.75f;//Pnl dishwasher height public static float pnlIw = 72f;//Pnl island W wide public static float pnlIh = 34.75f;//Pnl dishwasher wide public static float AngleStep = 15; public static string FonS;//Filler on Sizes public static string ConS; //Counter on sizes public static bool MeasureFromCenter;//Measure Objects From Center //UNDER BASE CABINET KICKS public static string kicks = "LEGKICK";//LEG, KICK, LEGKICK //RECOVER PANEL public static string RECOVER = "ROVER";//RFLOOR, RNOTCH, public static Texture2D[] Wood; public static Texture2D[] Fabric; public static int Download_qty=0; //Selected for constructing--------------------------------------------------GLOBALS--------------// //FLOOR public static string FLCs = "WOOD.1,#C3BCA3,#9A6045,#D4D4D4,1-1,0,1,0.1,0.2,0.3"; //""Plywood12x14,0.25,1,1.5,0,M,ffffff,1,1,0.35,0.5,0"; public static string[] FLC = FLCs.Split(","[0]); //TEXTURES public static string TCs = "COUN.1?1?0.3?D2C69F?D2C69F?NA?r0?M?ffffff?1??1?0.05?0.5?0"; public static string TCsStart = ""; public static List texturesStart = new(); public static string TCsNew= "";//Texture code New //MOLDING WALLS public static string WMKs = "ND,0,0"; public static string[] WMK = WMKs.Split(","[0]); public static string WMOs = "ND,0,0"; public static string[] WMO = WMOs.Split(","[0]); //MATCH public static string PNL; //TEXTURTES------------------------------------------------------------------- public static int G = 1; //SELECT--------------------------------------------------------------------------------------------------------------- public static string[] SC = new string[101];//Selection Code Tempory Variables //Selected for constructing----------------------------------------------------------------------// public static string ff = "0";//Object from floor //Scene Mode--------------------------------------------------------------------------------Scene Mode// //public static SceneModes SM = SceneModes.Start;//SceneMode //OBJ--------------------------------------------------------------------------------OBJ// public static List HIDELIST = new(); public static List GHOSTLIST = new(); //public static List INVISIBLELIST=new(); //2023 public static string _ROOM_ID; public static string _SOURCE; //public static string[] _beforeDataTemp; public static Vector3 _beforePos = Vector3.zero; public static Dictionary _Paths = new() { { Paths.Free, "free" }, // header { Paths.Free_Test, "free_test" }, // header { Paths.Kwizine, "kwizine" }, // header { Paths.Bain_Depot, "baindepot" }, // header { Paths.Kitchens_Depot, "kitchensdepot" }, // header { Paths.Kab_Solution, "kabsolution" }, // header { Paths.Armoire_Depot, "armoiredepot" }, // header { Paths.BMR, "bmr" }, // header { Paths.RONA, "rona" }, // header { Paths.Collection_Elite, "collection_elite" }, // header { Paths.KENT, "kent" }, // header { Paths.HomeHardware, "homehardware" }, // header { Paths.LAMINAM, "laminam" }, // header { Paths.CANAC, "canac" }, // header { Paths.Cabinets_ToGo, "cabinetstogo" }, // header { Paths.Saint_Laurent, "saint-laurent" }, // header { Paths.IDEAL_Cabinetry, "ideal_cabinetry" }, // header { Paths.Hampton_Bay, "hampton_bay" }, // header }; public static Dictionary _useNewFormat = new() { { Paths.Free, false}, // header { Paths.Free_Test,true }, // header { Paths.Kab_Solution, false},// header { Paths.Kwizine, false }, // header { Paths.Bain_Depot,false}, // header { Paths.Kitchens_Depot,false}, // header { Paths.Armoire_Depot,false}, // header { Paths.BMR,false}, // header { Paths.RONA,false}, // header { Paths.Collection_Elite,false}, // header { Paths.KENT,false}, // header { Paths.HomeHardware,false}, // header { Paths.LAMINAM,false}, // header { Paths.CANAC,false}, // header { Paths.Cabinets_ToGo,false}, // header { Paths.Saint_Laurent,false}, // header { Paths.IDEAL_Cabinetry,false}, // header { Paths.Hampton_Bay,false} // header }; public static Paths GetPath(string value) { foreach (var keyValue in _Paths) { //Debug.Log(keyValue.Value + " == " + value + " = " + keyValue.Value == value); if (keyValue.Value == value) return keyValue.Key; } return Paths.NULL; } public static bool CompareCurrentClient(Paths path) { _Paths.TryGetValue(path, out string pathToCompare); return pathToCompare == PATH; } public static bool CompareCurrentClient(string path) { return path == PATH; } public static string ref_type; public static string ref_id; public static bool IsEditor { get; set; } //ROOM POINTS public static List[] FloorPoints; public static List[] CeilingPoints; public static List[] ExteriorWallPoints; public static List[] RoomPoints; static public bool CheckIfLibraryUseNewFormat(string path) { Paths currentPaths = GetPath(path); if (currentPaths == Paths.NULL) { Debug.Log("No Key Exist for " + path); return false; } return _useNewFormat[currentPaths]; } public static bool UseNewCsvFormat; public static string GetBaseLibraryKey(string currentKeyPassed) { if (currentKeyPassed == _Paths[Paths.Kab_Solution]) { return _Paths[Paths.Kab_Solution]; } else if (currentKeyPassed == _Paths[Paths.Free_Test]) { return _Paths[Paths.Free]; } else if (currentKeyPassed == _Paths[Paths.Bain_Depot]) { return _Paths[Paths.Bain_Depot]; } else if (currentKeyPassed == _Paths[Paths.Kitchens_Depot]) { return _Paths[Paths.Kitchens_Depot]; } else if (currentKeyPassed == _Paths[Paths.Armoire_Depot]) { return _Paths[Paths.Armoire_Depot]; } else if (currentKeyPassed == _Paths[Paths.BMR]) { return _Paths[Paths.BMR]; } else if (currentKeyPassed == _Paths[Paths.RONA]) { return _Paths[Paths.RONA]; } else if (currentKeyPassed == _Paths[Paths.Collection_Elite]) { return _Paths[Paths.Collection_Elite]; } else if (currentKeyPassed == _Paths[Paths.KENT]) { return _Paths[Paths.KENT]; } else if (currentKeyPassed == _Paths[Paths.HomeHardware]) { return _Paths[Paths.HomeHardware]; } else if (currentKeyPassed == _Paths[Paths.LAMINAM]) { return _Paths[Paths.LAMINAM]; } else if (currentKeyPassed == _Paths[Paths.CANAC]) { return _Paths[Paths.CANAC]; } else if (currentKeyPassed == _Paths[Paths.Cabinets_ToGo]) { return _Paths[Paths.Cabinets_ToGo]; } else if (currentKeyPassed == _Paths[Paths.Saint_Laurent]) { return _Paths[Paths.Saint_Laurent]; } else if (currentKeyPassed == _Paths[Paths.IDEAL_Cabinetry]) { return _Paths[Paths.IDEAL_Cabinetry]; } else if (currentKeyPassed == _Paths[Paths.Hampton_Bay]) { return _Paths[Paths.Hampton_Bay]; } else { return currentKeyPassed; } } }