void InitOverlays() { CopsLogo = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(339f, 47f, 413f, 233f) }, 1000000); CopsLogo.SetTexture((int)E_Texture.IDLE, LMS_Textures.GetCache("COPS_LOGO_TEX")); OptionsWindow = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(163f, 12f, 445f, 484f) }, 2000000); OptionsWindow.SetTexture((int)E_Texture.IDLE, OptionsWindow.GeneratePlainTexture(Color.black.AlterAlpha(206f / 255f))); TouchBar = InstantiateChild <LMS_GuiBaseTouchBar>(new LMS_GuiConfig() { Rect = new Rect(0f, 0f, Screen.width, Screen.height) }, 3000000); TouchBar.SetTexture((int)E_Texture.IDLE, OptionsWindow.GeneratePlainTexture(Color.clear)); TouchBar.onSwipe += (swipe) => { if (Owner.Down) { return; } if (swipe == E_Swipe.DOWN) { if (selectedIndex + 1 == SelectionIndex.Count) { selectedIndex = 0; } else { selectedIndex++; } } else if (swipe == E_Swipe.UP) { if (selectedIndex - 1 == -1) { selectedIndex = SelectionIndex.Count - 1; } else { selectedIndex--; } } else { if (SelectionIndex.Keys.Count == 0) { return; } LMS_GuiBaseButton b = SelectionIndex[selectedIndex].Value; if (b.OnClick != null) { b.OnClick(); } } }; }
void InitOverlays() { LeftPanel = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(8f, 41f, 486f, 587f) }, 100000); LeftPanel.SetTexture((int)E_Texture.IDLE, LMS_GuiBaseUtils.NextGrade(m_Skin.box.normal.background)); RightPanel = InstantiateChild <LMS_GuiBaseBox2D>(new LMS_GuiConfig() { Rect = new Rect(197f, 41f, 705f, 587f) }, 100000); RightPanel.SetTexture((int)E_Texture.IDLE, LMS_GuiBaseUtils.NextGrade(m_Skin.box.normal.background)); }
void Start() { InitBar = LMS_GuiBaseUtils._InstantiateGUIElement <LMS_GuiBaseProgressBar>(new LMS_GuiConfig { Rect = new Rect(0f, 700f, 1280f, 20f) }, 928, new GameObject("Init")); InitBar.realProg = 100f; InitBar.ReloadRenderer = true; InitBar.canRender = true; InitBar.Speed = 1.5f; InitBar.Color = "(0.5803921568627451,0,0.8274509803921569)"; SplashImage = LMS_GuiBaseUtils._InstantiateGUIElement <LMS_GuiBaseBox2D>(new LMS_GuiConfig { Rect = new Rect(240f, 110f, 800f, 500f) }, 213, GameObject.Find("Init")); SplashImage.UseRelativeRect = false; LMS_ModifiedTexture test; LMS_GuiBaseUtils.ModifiedTexture("test", out test); SplashImage.SetTexture((int)E_Texture.IDLE, test.MainTexture); LMS_GuiParser.Parse(LitJson.JsonMapper.ToJson(SplashImage.GetParserOptions())); }