public void DecideIfHighlighted(SelectabilityState selectState) { string sSprPath = "Images/Chrs/imgGlow"; switch (selectState) { case SelectabilityState.NONE: //No additional suffix needed for the path break; case SelectabilityState.ALLYSELECTABLE: sSprPath += "4"; break; case SelectabilityState.ENEMYSELECTABLE: sSprPath += "6"; break; default: Debug.Log("Unrecognized SelectabilityState: " + selectState); break; } LibView.AssignSpritePathToObject(sSprPath, this.gameObject); }
public void UpdateDropdownOptions() { LogManager.Get().UpdateRecognizedLogFiles(); List <string> lstLogFileNames = LogManager.Get().lstLogFiles.ConvertAll(fileinfo => fileinfo.Name); LibView.SetDropdownOptions(dropdownLogFileSelector, lstLogFileNames); }
public void InitSavedLoadoutsDropdown() { LibView.SetDropdownOptions(dropdownSavedLoadouts, LoadoutManager.LoadAllLoadoutNamesForChr(ChrTypeSelectingFor())); dropdownSavedLoadouts.value = 0; dropdownSavedLoadouts.RefreshShownValue(); }
public void UpdateDropdownOptions() { LibView.SetDropdownOptions(dropdown, CharType.GetAllChrNames()); //Ensure the default-selected option for this dropdown is mirroring the default in the matchsetup dropdown.SetValueWithoutNotify((int)NetworkMatchSetup.GetCharacterSelection(plyrselectorParent.idPlayer, idChr)); dropdown.RefreshShownValue(); }
public void DisplayIcon() { string sSprPath = "Images/Chrs/" + mod.chrOwner.sName + "/img"; if (mod != null) { sSprPath += mod.sName; } LibView.AssignSpritePathToObject(sSprPath, goIcon); }
//Set the TarAdapt model that we're going to be facilitating payment for public void StartSelection(TarAdapt _modTarAdapt) { modTarAdapt = _modTarAdapt; //Save a copy of the skills we can adapt into lstSkillTypeInfosAdaptable = modTarAdapt.GetAdaptableSkills(); LibView.SetSkillTypeDropDownOptions(dropdownSkillSelection, lstSkillTypeInfosAdaptable); //Set up the submission keybinding KeyBindings.SetBinding(SubmitSelectedSkill, KeyCode.T); }
public void OnLeftDown() { bDown = true; fTimeDown = 0.0f; v3Down = LibView.GetMouseLocation(); switch (stateLeft) { case STATELEFT.IDLE: stateLeft = STATELEFT.PRESS; break; case STATELEFT.CLICK: case STATELEFT.DOUBLECLICK: stateLeft = STATELEFT.DOUBLEPRESS; break; } }
public GameObject AddManaIcon(Mana.MANATYPE manaType, bool bPaidFor, Mana.MANATYPE manaPaidWith = Mana.MANATYPE.EFFORT) { GameObject goManaIcon = new GameObject(string.Format("sprManaIcon{0}", lstgoManaIcons.Count)); goManaIcon.transform.parent = goRequiredManaPosition.transform; SpriteRenderer sprRen = goManaIcon.AddComponent <SpriteRenderer>(); //Assign the appropriate sprite LibView.AssignSpritePathToObject(GetManaIconSpritePath(manaType, bPaidFor, manaPaidWith), goManaIcon); //Sacle the icon apropriately goManaIcon.transform.localScale = new Vector3(fManaSymbolSize, fManaSymbolSize, 1); //Place the icon at the appropriate spot goManaIcon.transform.localPosition = new Vector3(fManaSymbolSpacing * (0.5f + 1.5f * lstgoManaIcons.Count), 0f, 0f); //Ensure the symbol appears ahead of the mana panel sprRen.sortingOrder = 1; lstgoManaIcons.Add(goManaIcon); return(goManaIcon); }
public virtual void Update() { if (bDown) { //Note that this uses the real Time.deltaTime as opposed to the ContTime.fDeltaTime fTimeDown += Time.deltaTime; } else { fTimeUp += Time.deltaTime; } // Handle time related checks switch (stateLeft) { case STATELEFT.PRESS: case STATELEFT.DOUBLEPRESS: // Check if it's been pressed long enough to count as holding the mouse if (fTimeDown >= fTimeDownDelay) { bHeld = true; stateLeft = STATELEFT.HELD; onMouseStartHold(); } break; case STATELEFT.CLICK: case STATELEFT.DOUBLECLICK: if (fTimeUp >= fTimeDoubleDelay) { stateLeft = STATELEFT.IDLE; } break; } // Handle movement related checks switch (stateLeft) { case STATELEFT.PRESS: case STATELEFT.DOUBLEPRESS: case STATELEFT.HELD: // Check if the mouse has moved far enough to count as dragging if (Vector3.Distance(v3Down, LibView.GetMouseLocation()) >= fMinDistDrag) { stateLeft = STATELEFT.DRAG; if (stateLeft != STATELEFT.HELD) { onMouseStartHold(); } onMouseStartDrag(); } break; } if (stateLeft == STATELEFT.DRAG) { // Check if we've dragged off of our object then released on another object if (Input.GetMouseButtonUp(0)) { GameObject goReleasedOver = LibView.GetObjectUnderMouse(); if (this.gameObject != goReleasedOver) { // Then we've released the mouse over a new object after dragging onMouseReleaseOther(goReleasedOver); OnLeftUp(); } //Otherwise we've released the mouse over ourselves, so we'll catch this with StopDrag } } }
public void Init(SkillType.SKILLTYPE skilltypeSelected) { LibView.SetSkillTypeDropDownOptions(dropdownSkillLoadout, loadoutselector.lstSelectableSkills); SetDropdownSelection(skilltypeSelected); }
public void ReplaceManaIcon(int indexToReplace, Mana.MANATYPE manaType, bool bPaidFor, Mana.MANATYPE manaPaidWith = Mana.MANATYPE.EFFORT) { LibView.AssignSpritePathToObject(GetManaIconSpritePath(manaType, bPaidFor, manaPaidWith), lstgoManaIcons[indexToReplace]); }