mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 02:55:15 +00:00
Replace hardcoded Tooltip.AddTooltip() calls with TooltipGiver script in GameObject (#593)
* Remove all hardcoded Tooltip.AddTooltip() calls * Add TooltipGiver component where previously hardcoded * Add TooltipGiver.cs * Revert "Add TooltipGiver component where previously hardcoded" This reverts commit 45ef0fb0bcf05464230a9a2da77eb716fc4b984d. * Add TooltipGiver component where previously hardcoded * Remove cherry-pick residue
This commit is contained in:
parent
493309c925
commit
1578f0268f
8 changed files with 619 additions and 61 deletions
|
@ -14,8 +14,8 @@ RenderTexture:
|
|||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 2560
|
||||
m_Height: 1440
|
||||
m_Width: 858
|
||||
m_Height: 482
|
||||
m_AntiAliasing: 2
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 92
|
||||
|
|
|
@ -14,8 +14,8 @@ RenderTexture:
|
|||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 3840
|
||||
m_Height: 2160
|
||||
m_Width: 1287
|
||||
m_Height: 723
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 92
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -108,25 +108,7 @@ namespace HeavenStudio.Editor
|
|||
|
||||
foreach (var minigame in EventCaller.instance.minigames)
|
||||
AddIcon(minigame);
|
||||
|
||||
Tooltip.AddTooltip(NewBTN.gameObject, "New <color=#adadad>[Ctrl+N]</color>");
|
||||
Tooltip.AddTooltip(OpenBTN.gameObject, "Open <color=#adadad>[Ctrl+O]</color>");
|
||||
Tooltip.AddTooltip(SaveBTN.gameObject, "Save Project <color=#adadad>[Ctrl+S]</color>\nSave Project As <color=#adadad>[Ctrl+Alt+S]</color>");
|
||||
Tooltip.AddTooltip(UndoBTN.gameObject, "Undo <color=#adadad>[Ctrl+Z]</color>");
|
||||
Tooltip.AddTooltip(RedoBTN.gameObject, "Redo <color=#adadad>[Ctrl+Y or Ctrl+Shift+Z]</color>");
|
||||
Tooltip.AddTooltip(CopyBTN.gameObject, "Copy <color=#adadad>[Ctrl+C]</color>");
|
||||
Tooltip.AddTooltip(PasteBTN.gameObject, "Paste <color=#adadad>[Ctrl+V]</color>");
|
||||
Tooltip.AddTooltip(MusicSelectBTN.gameObject, "Music Select");
|
||||
Tooltip.AddTooltip(FullScreenBTN.gameObject, "Preview <color=#adadad>[Tab]</color>");
|
||||
Tooltip.AddTooltip(TempoFinderBTN.gameObject, "Tempo Finder");
|
||||
Tooltip.AddTooltip(SnapDiagBTN.gameObject, "Snap Settings");
|
||||
Tooltip.AddTooltip(ChartParamBTN.gameObject, "Remix Properties");
|
||||
Tooltip.AddTooltip(SortAlphabetBTN.gameObject, "Sort Alphabetically");
|
||||
Tooltip.AddTooltip(SortFavoritesBTN.gameObject, "Sort By Favorite");
|
||||
Tooltip.AddTooltip(SortChronologicBTN.gameObject, "Sort Chronologically");
|
||||
Tooltip.AddTooltip(SearchBar.gameObject, "Search Games");
|
||||
|
||||
Tooltip.AddTooltip(EditorSettingsBTN.gameObject, "Editor Settings <color=#adadad>[Ctrl+Shift+O]</color>");
|
||||
|
||||
UpdateEditorStatus(true);
|
||||
|
||||
BuildDateDisplay.text = GlobalGameManager.buildTime;
|
||||
|
|
|
@ -70,10 +70,6 @@ namespace HeavenStudio.Editor
|
|||
tempoLayer.GetComponent<Image>().color = theme.properties.TempoLayerCol.Hex2RGB();
|
||||
musicLayer.GetComponent<Image>().color = theme.properties.MusicLayerCol.Hex2RGB();
|
||||
sectionLayer.GetComponent<Image>().color = theme.properties.SectionLayerCol.Hex2RGB();
|
||||
Tooltip.AddTooltip(specialLayers.gameObject, $"All Special Tracks");
|
||||
Tooltip.AddTooltip(tempoLayer.gameObject, $"Tempo Track");
|
||||
Tooltip.AddTooltip(musicLayer.gameObject, $"Music Volume Track");
|
||||
Tooltip.AddTooltip(sectionLayer.gameObject, $"Remix Sections Track");
|
||||
|
||||
|
||||
layer.gameObject.SetActive(false);
|
||||
|
|
|
@ -310,33 +310,8 @@ namespace HeavenStudio.Editor.Track
|
|||
WaveformToggle();
|
||||
});
|
||||
|
||||
Tooltip.AddTooltip(SongBeat.gameObject, "Current Beat");
|
||||
Tooltip.AddTooltip(SongPos.gameObject, "Current Time");
|
||||
Tooltip.AddTooltip(CurrentTempo.gameObject, "Current Tempo (BPM)");
|
||||
|
||||
Tooltip.AddTooltip(PlayBTN.gameObject, "Play <color=#adadad>[Space]</color>");
|
||||
Tooltip.AddTooltip(PauseBTN.gameObject, "Pause <color=#adadad>[Shift + Space]</color>");
|
||||
Tooltip.AddTooltip(StopBTN.gameObject, "Stop <color=#adadad>[Space]</color>");
|
||||
|
||||
Tooltip.AddTooltip(MetronomeBTN.gameObject, "Metronome <color=#adadad>[M]</color>");
|
||||
Tooltip.AddTooltip(AutoplayBTN.gameObject, "Autoplay <color=#adadad>[P]</color>");
|
||||
|
||||
Tooltip.AddTooltip(SelectionsBTN.gameObject, "Tool: Selection <color=#adadad>[1]</color>");
|
||||
Tooltip.AddTooltip(TempoChangeBTN.gameObject, "Tool: Tempo Change <color=#adadad>[2]</color>");
|
||||
Tooltip.AddTooltip(MusicVolumeBTN.gameObject, "Tool: Music Volume <color=#adadad>[3]</color>");
|
||||
Tooltip.AddTooltip(ChartSectionBTN.gameObject, "Tool: Beatmap Sections <color=#adadad>[4]</color>");
|
||||
|
||||
Tooltip.AddTooltip(StartingTempoSpecialAll.gameObject, "Starting Tempo (BPM)");
|
||||
Tooltip.AddTooltip(StartingTempoSpecialTempo.gameObject, "Starting Tempo (BPM)");
|
||||
Tooltip.AddTooltip(StartingVolumeSpecialVolume.gameObject, "Starting Volume (%)");
|
||||
|
||||
Tooltip.AddTooltip(ZoomInBTN.gameObject, "Zoom In");
|
||||
Tooltip.AddTooltip(ZoomOutBTN.gameObject, "Zoom Out");
|
||||
Tooltip.AddTooltip(ZoomResetBTN.gameObject, "Zoom Reset");
|
||||
Tooltip.AddTooltip(WaveformBTN.gameObject, "Waveform Toggle");
|
||||
|
||||
Tooltip.AddTooltip(PlaybackSpeed.gameObject, "The preview's playback speed. Right click to reset to 1.0");
|
||||
|
||||
SetTimeButtonColors(true, false, false);
|
||||
MetronomeBTN.transform.GetChild(0).GetComponent<Image>().color = Color.gray;
|
||||
MetronomeBTN.transform.GetChild(1).GetComponent<Image>().color = Color.gray;
|
||||
|
|
17
Assets/Scripts/LevelEditor/TooltipGiver.cs
Normal file
17
Assets/Scripts/LevelEditor/TooltipGiver.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HeavenStudio.Editor
|
||||
{
|
||||
public class TooltipGiver : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private string TooltipText;
|
||||
|
||||
void Start()
|
||||
{
|
||||
Tooltip.AddTooltip(gameObject, TooltipText);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/LevelEditor/TooltipGiver.cs.meta
Normal file
11
Assets/Scripts/LevelEditor/TooltipGiver.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2a525ece7c981f3418a70bbfa58c1146
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in a new issue