private void btnGoToProject_Click(object sender, RoutedEventArgs e) { dbRepository dbrep = new dbRepository(); dbOriginalRepository dbOriginalRep = new dbOriginalRepository(); ApplicationState.SetValue(ApplicationVariables.intProjectId, project.ProjectId); //ProjectView pv = new ProjectView(); //pv.Show(); persoon projectleider = dbOriginalRep.GetContact(dbrep.GetProjectleider(project.ProjectleiderId).ContactIdOrigineel); // create the page and load all values Projecten.Overzicht.Project po = new Projecten.Overzicht.Project(project.Naam + " - ID " + project.ProjectIdOrigineel, projectleider.voornaam + " " + projectleider.tussenvoegsel + " " + projectleider.achternaam); //new Projecten.Overzicht.Project(project.ProjectId + ": " + project.Naam, projectleider.voornaam + " " + projectleider.tussenvoegsel + " " + projectleider.achternaam); // load the page into the contentcontrol MenuControl owner = Tools.FindVisualParent <MenuControl>(this); //po.PageGereedButtonVisibility = System.Windows.Visibility.Visible; //po.PageOKButtonText = "PROJECT TOEVOEGEN"; //po.OkClick += po.ToevoegenAanVakman; //po.dgProjecten.MouseDoubleClick -= po.dgProjecten_MouseDoubleClick; //po.dgProjecten.MouseDoubleClick += po.dgProjecten_MouseDoubleClickForVakman; //po.Load(); //po.tabControl.SelectedIndex = 1; owner.PageGoToPage(po); }
void lblDag_Click(object sender, RoutedEventArgs e) { Mouse.OverrideCursor = Cursors.Wait; ApplicationState.SetValue(ApplicationVariables.intVakmanViewModus, 1); vwVakman cVakman = (vwVakman)((List <object>)((Button)sender).Tag)[0]; DateTime selectedDay = (DateTime)((List <object>)((Button)sender).Tag)[1]; ApplicationState.SetValue(ApplicationVariables.dtSelectedDay, selectedDay); ApplicationState.SetValue(ApplicationVariables.intVakmanId, cVakman.VakmanId); dbOriginalRepository dbrepOriginal = new dbOriginalRepository(); MDRpersoon objPersoon = dbrepOriginal.GetContact(cVakman.ContactIdOrigineel); // create the page and load all values MandagenRegistratie.controls.Vakmannen.Detail.VakmanDetailView vm = new MandagenRegistratie.controls.Vakmannen.Detail.VakmanDetailView(objPersoon); //vm.Load(); // load the page into the contentcontrol MenuControl owner = Tools.FindVisualParent <MenuControl>(this); owner.PageGoToPage(vm); Mouse.OverrideCursor = null; }
void Awake() { playerInstance = GameObject.Find("Player").GetComponent <Player>(); gameControlInstance = gc.GetComponent <GameControl> (); gameControlGUIInstance = gc.GetComponent <GameControlGUI> (); shopControlInstance = gc.GetComponent <ShopControl> (); shopControlGUIInstance = gc.GetComponent <ShopControlGUI> (); clickControlInstance = gc.GetComponent <ClickControl> (); gridControlInstance = gc.GetComponent <GridControl>(); optionControlInstance = gc.GetComponent <OptionControl>(); dragControlInstance = gc.GetComponent <DragControl>(); eventGUIInstance = gc.GetComponent <EventGUI>(); enemyLibraryInstance = gc.GetComponent <EnemyLibrary>(); cardLibraryInstance = gc.GetComponent <CardLibrary>(); goalLibraryInstance = gc.GetComponent <GoalLibrary>(); guiStyleLibraryInstance = gc.GetComponent <GUIStyleLibrary>(); mainMenuInstance = gc.GetComponent <MainMenu>(); encyclopediaMenuInstance = gc.GetComponent <EncyclopediaMenu>(); godChoiceMenuInstance = gc.GetComponent <GodChoiceMenu>(); customizeMenuInstance = gc.GetComponent <CustomizeMenu>(); gridCursorControlInstance = gc.GetComponent <GridCursorControl>(); menuControlInstance = gc.GetComponent <MenuControl>(); tutorialInstance = gc.GetComponent <Tutorial>(); deckAnimateInstance = deck.GetComponent <DeckAnimate>(); shopAndGoalParentCanvasInstance = goalandshopparent .GetComponent <ShopAndGoalParentCanvas>(); shopGridCanvasInstance = shopgrid .GetComponent <ShopGridCanvas>(); gridCursorControlGUIInstance = gridcursorcontrolgui .GetComponent <GridCursorControlGUI>(); }
void lblDag_Click(object sender, RoutedEventArgs e) { Mouse.OverrideCursor = Cursors.Wait; ApplicationState.SetValue(ApplicationVariables.intVakmanViewModus, 1); Project cProject = (Project)((List <object>)((Button)sender).Tag)[0]; DateTime selectedDay = (DateTime)((List <object>)((Button)sender).Tag)[1]; ApplicationState.SetValue(ApplicationVariables.dtSelectedDay, selectedDay); ApplicationState.SetValue(ApplicationVariables.intProjectId, cProject.ProjectId); dbOriginalRepository dbrepOriginal = new dbOriginalRepository(); MDRproject projectorigineel = dbrepOriginal.GetProject((int)cProject.ProjectNr); MDRpersoon projectleider = dbrepOriginal.GetContact(objProjectleider.ContactIdOrigineel); // create the page and load all values MandagenRegistratie.controls.Projecten.Lijst.Project pv = new MandagenRegistratie.controls.Projecten.Lijst.Project(projectorigineel); //pv.Load(); // load the page into the contentcontrol MenuControl owner = Tools.FindVisualParent <MenuControl>(this); owner.PageGoToPage(pv); Mouse.OverrideCursor = null; }
private void btnCancel_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (canCancel) { dbRepository dbrep = new dbRepository(); dbrep.Deletemandag(mandag); // refresh alle andere programma's MenuControl owner = Tools.FindVisualParent <MenuControl>(this); //#if DEBUG //#else DateTime dt1 = ApplicationState.GetValue <DateTime>(ApplicationVariables.dtSelectedDay); DateTime dt2 = dt1.AddDays(1); List <int> vakmanIds = new List <int>(); vakmanIds.Add(vakman.VakmanId); owner.PageChannelMessage("projectdagview", Tools.CreateChannelMessage(vakmanIds, dt1, dt2)); //#endif RaiseEvent(new RoutedEventArgs(VakmanDagViewRefreshEvent, this)); } }
} // END //-----------------------------------------------------------------------------START METHODS MENUITEM--------------------------------------------------------------------\\ // Get the components void getComponents() { _rect = this.GetComponent <RectTransform> (); // Get the RectTransform component of this object _menuc = FindObjectOfType <MenuControl> (); // Get the Control Menu (there should only be one) _text = this.GetComponent <Text> (); // Get the Text component of children _effectSelected = this.GetComponentInChildren <Image> (); // Get the Image component of children } // END
protected virtual void HandlePopupItemPressed(ButtonBase sender) { if (CloseMenuOnClick && !(sender is DropDownBase) && MenuControl.GetTag <ButtonBase>("Owner") == this) { Hide(false); } }
// Set tab menu. public void SetMenu(int no) { for (int i = 0; i < menuControls.Length; i++) { MenuControl mc = menuControls[i]; if (i == no) { mc.OnMenu(); } else { mc.OffMenu(); } WindowControl wc = winControls[i]; if (i == no) { NGUITools.SetActive(wc.gameObject, true); } else { NGUITools.SetActive(wc.gameObject, false); } } if (no == 0) { NGUITools.SetActive(viewCamera, true); } else { NGUITools.SetActive(viewCamera, false); } }
public ProjectExplorer(EditorController editorController, TypeControllerManager typeControllerManager) : base("Medical.GUI.ProjectExplorer.ProjectExplorer.layout") { this.editorController = editorController; editorController.ProjectChanged += editorController_ProjectChanged; this.typeControllerManager = typeControllerManager; typeControllerManager.FilesystemWatcherCreated += typeControllerManager_FilesystemWatcherCreated; typeControllerManager.FilesystemWatcherDisposing += typeControllerManager_FilesystemWatcherDisposing; windowTitle = window.Caption; menuBar = window.findWidget("MenuBar") as MenuBar; fileBrowser = new FileBrowserTree((ScrollView)window.findWidget("FileTableScroll")); fileBrowser.FileSelected += new FileBrowserEvent(fileBrowser_FileSelected); fileBrowser.NodeContextEvent += new FileBrowserNodeContextEvent(fileBrowser_NodeContextEvent); //File Menu MenuItem fileMenuItem = menuBar.addItem("File", MenuItemType.Popup); MenuControl fileMenu = menuBar.createItemPopupMenuChild(fileMenuItem); fileMenu.ItemAccept += new MyGUIEvent(fileMenu_ItemAccept); newProject = fileMenu.addItem("New Project"); openProject = fileMenu.addItem("Open Project"); closeProject = fileMenu.addItem("Close Project"); saveAll = fileMenu.addItem("Save All"); this.Resized += new EventHandler(ProjectExplorer_Resized); }
private void btnGoToProject_Click(object sender, RoutedEventArgs e) { ApplicationState.SetValue(ApplicationVariables.intVakmanId, vakman.VakmanId); //ApplicationState.SetValue(ApplicationVariables.objVakman, vakman); //ProjectView pv = new ProjectView(); //pv.Show(); dbOriginalRepository dbrepOriginal = new dbOriginalRepository(); persoon persoon = dbrepOriginal.GetContact(vakman.ContactIdOrigineel); // create the page and load all values Vakmannen.Detail.VakmanDetailView vdv = new Vakmannen.Detail.VakmanDetailView(persoon.voornaam + " " + persoon.tussenvoegsel + " " + persoon.achternaam); // load the page into the contentcontrol MenuControl owner = Tools.FindVisualParent <MenuControl>(this); //po.PageGereedButtonVisibility = System.Windows.Visibility.Visible; //po.PageOKButtonText = "PROJECT TOEVOEGEN"; //vdv.Load(); //vdv.tabControl.SelectedIndex = 1; //po.OkClick += po.ToevoegenAanVakman; //po.dgProjecten.MouseDoubleClick -= po.dgProjecten_MouseDoubleClick; //po.dgProjecten.MouseDoubleClick += po.dgProjecten_MouseDoubleClickForVakman; owner.PageGoToPage(vdv); }
public void getName() { ControlKniveHit.playername = GameObject.Find("NameField").GetComponent <Text>().text; GameObject.Find("NameField").GetComponent <Text>().text = ""; showCanvas(false); MenuControl.IniciarOpciones(true); }
void MenuSelect(string goToLevel) { GameObject menuControlObject = GameObject.FindGameObjectWithTag("Menu"); MenuControl menuControl = menuControlObject.GetComponent("MenuControl") as MenuControl; menuControl.GoToLevel(); }
public void UpdateControl(string param) { var controls = param.Split(new char[] { '$' }, StringSplitOptions.RemoveEmptyEntries); foreach (var elem in controls) { var input = elem.Split('='); string eleId = input[0]; bool val = Convert.ToBoolean(input[1]); if (!val) { //the given element is not selected and must be deleted this.UnitWork.MenuControl.DeleteAll(x => x.ElementID == eleId && x.AppName == AppContext.AppName); } else { //check if the given element has been registered var elements = this.UnitWork.MenuControl.Get(x => x.AppName == AppContext.AppName && x.ElementID == eleId); if (elements.Count() == 0) { //insert element into MENUCONTROL table var newControl = new MenuControl(); newControl.ID = this.UnitWork.MenuControl.NewID(x => x.ID, 4); newControl.AppName = AppContext.AppName; newControl.ElementID = eleId; newControl.Timestamp = DateTime.Now; newControl.CreatedBy = HttpContext.Current.User.Identity.Name; newControl.Active = true; this.UnitWork.MenuControl.Insert(newControl); } } } }
void Start() { ws_main_language = new WS_MAIN_LANGUAGE(); ws_options_language = new WS_OPTIONS_LANGUAGE(); _menuControl = this.GetComponent <MenuControl> (); _optionsControl = this.GetComponent <OptionsControl> (); }
/// <summary> /// Edits the specified object's value using the editor style indicated by GetEditStyle. /// </summary> /// <param name="context">An ITypeDescriptorContext that can be used to gain additional context information.</param> /// <param name="provider">An IServiceProvider that this editor can use to obtain services.</param> /// <param name="value">The object to edit.</param> /// <returns></returns> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { if ((context != null) && (context.Instance != null) && (provider != null)) { // Convert to the correct class. MenuCommandCollection commands = value as MenuCommandCollection; // Create the dialog used to edit the menu commands MenuCollectionDialog dialog = new MenuCollectionDialog(commands); // Give user the chance to modify the nodes if (dialog.ShowDialog() == DialogResult.OK) { // Reflect changes back into original copy and generate appropriate // component changes to designer to reflect these changes SynchronizeCollections(commands, dialog.Commands, context); // Notify container that value has been changed context.OnComponentChanged(); // Need to repaint the control to take account of new values MenuControl mc = context.Instance as MenuControl; // Just in case it is null if (mc != null) { mc.Invalidate(); } } } // Return the original value return(value); }
private void pictureBox3_Click(object sender, EventArgs e) { if (MyUserInfo.currentUserId <= 0) { About about = new About(); about.ShowDialog(this); } else { if (myMenu == null) { RECT rect = new RECT(); WinApi.GetWindowRect(this.Handle, ref rect); int x = rect.Right - 72; WinApi.GetWindowRect(pictureBox3.Handle, ref rect); myMenu = new MenuControl(this); myMenu.StartPosition = FormStartPosition.Manual; myMenu.Location = new Point(x, rect.Bottom); myMenu.Size = new Size(72, 72); myMenu.Show(); } else { myMenu.Close(); myMenu = null; } } }
void LoadNextSceneInArea() { SaveLevelData(); string str = SceneManager.GetActiveScene().name.Split('_')[2]; int l = int.Parse(str); string sceneName = areaName + "_lvl_" + (l + 1); if ((l + 1) > (int)area) { //areaName finished EndText.text = "Finished Area"; StartCoroutine(Wait(2f, () => { EndText.text = ""; SceneManager.LoadScene("AreasMenu"); })); } try { SceneManager.LoadScene(sceneName); } catch (Exception) { MenuControl.LoadScene("Menu"); } }
//-----------------------------------------------------------------------------START METHODS MENUITEM--------------------------------------------------------------------\\ #region void getComponents() { _rect = this.GetComponent <RectTransform> (); // Get the RectTransform _menuc = FindObjectOfType <MenuControl> (); // Get the Control Menu _text = this.GetComponent <Text> (); // Get the Text component of children _effectSelected = this.GetComponentInChildren <Image> (); // Get the Image component of children }
private void OnTriggerEnter(Collider other) { if (other.CompareTag("Control")) { _hoveredControl = other.GetComponent <MenuControl>(); } }
protected virtual void Show(bool focus) { var prevOwner = MenuControl.GetTag <ButtonBase>("Owner"); if (prevOwner != null && prevOwner is ButtonBase prevCheck) { prevCheck.Checked = false; } MenuControl.SetTag("Owner", this); BeforeShow?.Invoke(); Checked = true; IsPopupOpen = true; var location = ActualLocation; if (MenuControl is ContextMenuStrip) { showContextMenu(location); } else { setRegularMenuLocation(location); showRegularMenu(); } if (focus) { focusFirstMenuItem(); } }
// Use this for initialization void Start() { menuManager = GameObject.FindGameObjectWithTag("Manager").GetComponent <MenuControl>(); transform.DOScale(new Vector3(0.8f, 0.8f, 0.8f), 0f); logo.transform.DOScale(new Vector3(0f, 0f, 0f), 0f); interactable = true; clickSound = GetComponent <AudioSource>(); }
// Use this for initialization void Start() { Cursor.lockState = CursorLockMode.Locked; mc = FindObjectOfType <MenuControl> (); oc = FindObjectOfType <OptionsControl> (); InputManager = FindObjectOfType <CustomInput>(); isAc = mc.isActiveCanvas; }
private void OnTriggerExit(Collider other) { if (other.CompareTag("Control")) { _hoveredControl = null; this.StopUsingControl(); } }
public MediaPortalEditor() { InitializeComponent(); Text = "MediaPortalEditor"; // Initialize style options style = VisualStyle.IDE; SetStyle(ControlStyles.DoubleBuffer, true); SetStyle(ControlStyles.AllPaintingInWmPaint, true); // Create the docking and tab manager tabManager = new TabControl(); tabManager.Appearance = TabControl.VisualAppearance.MultiDocument; tabManager.ClosePressed += new EventHandler(OnDesignerClosed); tabManager.SelectionChanged += new EventHandler(OnDesignerIndexChanged); tabManager.Dock = DockStyle.Fill; tabManager.Style = style; tabManager.IDEPixelBorder = true; tabManager.ShowClose = false; tabManager.ImageList = tabImageList; Controls.Add(tabManager); dockManager = new DockingManager(this, style); dockManager.InnerControl = tabManager; dockManager.TabControlCreated += new DockingManager.TabControlCreatedHandler(OnTabControlCreated); dockManager.ContentHidden += new DockingManager.ContentHandler(OnContentHidden); dockManager.ContentShown += new DockingManager.ContentHandler(OnContentShown); // Create Status Bar statusBar = CreateStatusBar(); dockManager.OuterControl = statusBar; // Create Menu and Toolbar topMenu = CreateTopMenu(); // Create Skin Tree skinExplorer = new MpeExplorer(this); Content c = dockManager.Contents.Add(skinExplorer, "Explorer", serviceImageList, 0); dockManager.AddContentWithState(c, State.DockLeft); // Create Properties propertyManager = new MpePropertyManager(this); c = dockManager.Contents.Add(propertyManager, "Properties", serviceImageList, 1); dockManager.AddContentWithState(c, State.DockRight); // Create Help Manager and Browser helpManager = new MpeHelpManager(this); c = dockManager.Contents.Add(helpManager, "Help", serviceImageList, 2); dockManager.AddContentWithState(c, State.DockBottom); helpBrowser = new MpeHelpBrowser(this); // Setup Tab Designers selectedDesignerIndex = -1; // Static Self Reference self = this; }
// Start is called before the first frame update void Start() { menuControl = GameObject.Find("GameController").GetComponent <MenuControl>(); navTank = this.gameObject.GetComponent <NavMeshAgent>(); shootableMask = LayerMask.GetMask("Shootable"); //timeAfterFire = 0f; //RunFrom(); }
void OnBackButtonClick() { switch (GetLevel) { default: QuitGame(); break; case "Menu": MenuControl menuControl = GameObject.Find("Menu Control").GetComponent <MenuControl> (); FBscript fbScript = GameObject.Find("FBholder").GetComponent <FBscript> (); // FB maneger if (menuControl.storePanel.activeSelf) // close store { menuControl.QuitStore(); } else if (menuControl.settingPanel.activeSelf) // close settings { menuControl.QuitSettings(); } else if (menuControl.questPanel.activeSelf) // close quest { menuControl.QuitQuest(); } else if (fbScript.FBPanel.activeSelf) //close FB Panel { fbScript.QuitFBScore(); } else // Quit Game { QuitGame(); } break; case "Game": GameObject skillDespObj = GameObject.Find("Modal Panel Skill Description"); if (skillDespObj) { skillDespObj.SetActive(false); Time.timeScale = 1f; } else { QuitGame(); } break; } }
/// <summary> /// Initialisiert die Schaltflächen /// </summary> /// <param name="menuControl">Schaltflächen-Objekt</param> public ButtonRepresentation(MenuControl menuControl) { this.menuControl = menuControl; this.font = ViewContent.UIContent.Font; this.fontSelect = ViewContent.UIContent.FontSelect; this.buttonTexture = ViewContent.UIContent.MenuButton; this.selectTexture = ViewContent.UIContent.SettingsButton; this.normalColor = Color.White; this.activeColor = new Color(0, 234, 255); }
public static void Main(string[] args) { var menuControl = new MenuControl(); menuControl.GenerateMainMenu(); // var accountController = new AccountController(); // accountController.Register(); // SeedingHelper helper = new SeedingHelper(); // helper.SeedAcount(); }
void Start() { Time.timeScale = 1; input = GameObject.Find("InputManager").GetComponent <InputManager>(); audiocontrol = GameObject.Find("Audio").GetComponent <AudioControl>(); menu = GetComponent <MenuControl>(); menu.HideOverlay(); }
public PartialViewResult MenuGetir() { Personel p = (Personel)Session["Kullanici"]; MenuControl k = new MenuControl(); k.menuler = db.Menu.ToList(); k.roller = db.MenuRol.Where(x => x.RolID == p.RolID).ToList(); return(PartialView(k)); }
// Use this for initialization void Start() { networkHandlerObject = GameObject.FindGameObjectWithTag("NetworkHandler"); MainCamera = GameObject.FindGameObjectWithTag("MainCamera"); menuControl = GameObject.FindGameObjectWithTag("Menu").GetComponent<MenuControl>(); networkHandler = networkHandlerObject.GetComponent<NetworkGameHandler>(); MainCameraFollow = MainCamera.GetComponent<SmoothFollow2>(); InitializeGame(); }
// Use this for initialization void Awake() { mControl = GameObject.FindGameObjectWithTag("Menu"); mControlScript = mControl.GetComponent<MenuControl>() as MenuControl; mCameraFollowScript = mCamera.GetComponent<SmoothFollow2>() as SmoothFollow2; rStartScript = rStart.GetComponent<RaceStart>() as RaceStart; lrPadScript = lrPad.GetComponent<InputLRPad>() as InputLRPad; //jumpScript = jButton.GetComponent<JumpButton>() as JumpButton; //fallScript = fButton.GetComponent<FallButton>() as FallButton; if(mControlScript.dinoIndex == 0) { dinos[0].SetActive(true); mCameraFollowScript.target = dinos[0].transform; lrPadScript.player = dinos[0]; rStartScript.player = dinos[0]; //jumpScript.player = dinos[0]; //fallScript.player = dinos[0]; } else if(mControlScript.dinoIndex == 1) { dinos[1].SetActive(true); mCameraFollowScript.target = dinos[1].transform; mCameraFollowScript.distance = -(mCameraFollowScript.distance); lrPadScript.player = dinos[1]; rStartScript.player = dinos[1]; //jumpScript.player = dinos[1]; //fallScript.player = dinos[1]; } else if(mControlScript.dinoIndex == 2) { dinos[2].SetActive(true); mCameraFollowScript.target = dinos[2].transform; lrPadScript.player = dinos[2]; rStartScript.player = dinos[2]; //jumpScript.player = dinos[2]; //fallScript.player = dinos[2]; } }
public RadialMenu(List<Function> functions, List<Texture2D> icons, bool applyOnChange, MenuControl openMenu, MenuControl closeMenu) { this.openMenu = openMenu; IsOpen = false; this.closeMenu = closeMenu; this.applyOnChange = applyOnChange; index = 0; itemCount = functions.Count; allItems = new List<Item>(); for (int i = 0; i < itemCount; i++) { allItems.Add(new Item(i, this, functions[i], icons[i])); } displayedItems = new List<Item>(); nullRadius = 20; fade = Color.White; radius = 9 * itemCount + nullRadius + 12; }
// Use this for initialization void Start() { Time.timeScale = 1; mControl = GameObject.FindGameObjectWithTag("Menu"); mControlScript = mControl.GetComponent<MenuControl>() as MenuControl; ResizeButtons(buttons); transform.position = Vector3.zero; transform.localScale = Vector3.zero; guiTexture.pixelInset = buttons[0]; continueRace.transform.position = Vector3.zero; continueRace.transform.localScale = Vector3.zero; continueRace.guiTexture.pixelInset = buttons[1]; exitRace.transform.position = Vector3.zero; exitRace.transform.localScale = Vector3.zero; exitRace.guiTexture.pixelInset = buttons[2]; }
void Awake() { playerInstance = GameObject.Find("Player").GetComponent<Player>(); gameControlInstance = gc.GetComponent<GameControl> (); gameControlGUIInstance = gc.GetComponent<GameControlGUI> (); shopControlInstance = gc.GetComponent<ShopControl> (); shopControlGUIInstance = gc.GetComponent<ShopControlGUI> (); clickControlInstance = gc.GetComponent<ClickControl> (); gridControlInstance = gc.GetComponent<GridControl>(); optionControlInstance = gc.GetComponent<OptionControl>(); dragControlInstance = gc.GetComponent<DragControl>(); eventGUIInstance = gc.GetComponent<EventGUI>(); enemyLibraryInstance = gc.GetComponent<EnemyLibrary>(); cardLibraryInstance = gc.GetComponent<CardLibrary>(); goalLibraryInstance = gc.GetComponent<GoalLibrary>(); guiStyleLibraryInstance = gc.GetComponent<GUIStyleLibrary>(); mainMenuInstance = gc.GetComponent<MainMenu>(); encyclopediaMenuInstance = gc.GetComponent<EncyclopediaMenu>(); godChoiceMenuInstance = gc.GetComponent<GodChoiceMenu>(); customizeMenuInstance = gc.GetComponent<CustomizeMenu>(); gridCursorControlInstance = gc.GetComponent<GridCursorControl>(); menuControlInstance = gc.GetComponent<MenuControl>(); tutorialInstance = gc.GetComponent<Tutorial>(); deckAnimateInstance = deck.GetComponent<DeckAnimate>(); shopAndGoalParentCanvasInstance = goalandshopparent .GetComponent<ShopAndGoalParentCanvas>(); shopGridCanvasInstance = shopgrid .GetComponent<ShopGridCanvas>(); gridCursorControlGUIInstance = gridcursorcontrolgui .GetComponent<GridCursorControlGUI>(); }
public void MouseMove(int y) { mouseOverControl = controls[ControlIndexFromPos(ref y)]; }
public void MouseLeave() { mouseOverControl = null; }
public void AddControl(MenuControl ctrl) { controls.Add(ctrl); ctrl.parent = this; }
void Start() { slowamount = 1; //booleans to check if pillos are used pillocontrol = true; pillocontrolreleased = true; mc = FindObjectOfType<MenuControl>().GetComponent<MenuControl>(); }
static void menu_EventMenuControlClose(MenuControl _sender) { Export.DebugOut("EventMenuControlClose"); }
static void menu_EventMenuControlAccept(MenuControl _sender, MenuItem _item) { Export.DebugOut("EventMenuControlAccept item=" + _item.ToString()); }
void Start() { canHitPirate = false; hashitkraken = true; movement = FindObjectOfType<Movement>().GetComponent<Movement>(); pickupspawner = FindObjectOfType<PickUpSpawning>().GetComponent<PickUpSpawning>(); menucontrols = FindObjectOfType<MenuControl>().GetComponent<MenuControl>(); //lvlm = FindObjectOfType<LevelManager>().GetComponent<LevelManager>(); krakenspawner = FindObjectOfType<KrakenSpawn>().GetComponent<KrakenSpawn>(); //so = FindObjectOfType<SpawnObstacles>().GetComponent<SpawnObstacles>(); boatupgrade = FindObjectOfType<BoatUpgrade>().GetComponent<BoatUpgrade>(); pirateTime = 8.0f; collisionParticles = GameObject.FindGameObjectWithTag("CollisionParticle"); //sfx = GameObject.Find("SfxPlayer").GetComponent<AudioSource>(); }
void Start() { questDisplayMode = true; mc = menuControlObject.GetComponent<MenuControl> (); quests = new Dictionary<int, Quest> (); unclaimed_quests = new List<Quest> (); }
// Update () void Update() { // determines whether the user enters "Play Mode" or "Train Mode" if (Application.loadedLevelName == "Menu") { resetHealth (); menuControl = GameObject.Find ("Main Camera").GetComponent<MenuControl> (); isPlayMode = menuControl.playMode; } if (Application.loadedLevelName != "Menu" && Application.loadedLevelName != "TrainMenuList" && Application.loadedLevelName != "GameEnd") { displayHealth(); } else { GameObject.Find("HealthBit3").guiTexture.enabled = false; GameObject.Find("HealthBit2").guiTexture.enabled = false; GameObject.Find("HealthBit1").guiTexture.enabled = false; } }
// Use this for initialization void Start() { transform.position = Vector3.zero; transform.localScale = Vector3.zero; Time.timeScale = 1; mControl = GameObject.FindGameObjectWithTag("Menu"); if(mControl != null) { mControlScript = mControl.GetComponent<MenuControl>() as MenuControl; guiTexture.pixelInset = mainButtonPos; continueRace.transform.position = Vector3.zero; continueRace.transform.localScale = Vector3.zero; //continueRace.guiTexture.pixelInset = buttons[0]; exitRace.transform.position = Vector3.zero; exitRace.transform.localScale = Vector3.zero; //exitRace.guiTexture.pixelInset = buttons[1]; } }
static void menu_EventMenuControlAccept(MenuControl _sender, MenuItem _item) { Gui.Instance.Log("TestApp", LogLevel.Info, "EventMenuControlAccept item=" + _item.ToString()); }
static void menu_EventMenuControlClose(MenuControl _sender) { Gui.Instance.Log("TestApp", LogLevel.Info, "EventMenuControlClose"); }
void Start() { menuControl = transform.root.GetComponent<MenuControl>(); }
// Update () void Update() { // determines whether the user enters "Play Mode" or "Train Mode" if (Application.loadedLevelName == "Menu") { menuControl = GameObject.Find ("Main Camera").GetComponent<MenuControl> (); isPlayMode = menuControl.playMode; } else if (Application.loadedLevelName != "Menu" || Application.loadedLevelName != "TrainMenu") { displayHealth(); } }