KSP-Conformal-Decals/Source/ConformalDecals/ModuleConformalText.cs

34 lines
1.0 KiB
C#
Raw Normal View History

2020-06-19 08:01:46 +00:00
using ConformalDecals.Text;
2020-07-13 03:27:19 +00:00
using ConformalDecals.UI;
using ConformalDecals.Util;
using TMPro;
using UnityEngine;
2020-07-13 03:27:19 +00:00
using UnityEngine.UI;
namespace ConformalDecals {
public class ModuleConformalText: ModuleConformalDecal {
[KSPField(isPersistant = true)] public string text = "Hello World!";
2020-07-13 03:27:19 +00:00
private GameObject _textEntryGui;
public override void OnLoad(ConfigNode node) {
base.OnLoad(node);
}
public override void OnStart(StartState state) {
base.OnStart(state);
}
2020-07-13 03:27:19 +00:00
[KSPEvent(guiActive = false, guiActiveEditor = true, guiName = "#LOC_ConformalDecals_gui-select-flag")]
public void SetText()
{
if (_textEntryGui == null) {
_textEntryGui = Instantiate(UILoader.textEntryPrefab, MainCanvasUtil.MainCanvas.transform, true);
2020-07-13 05:38:37 +00:00
//_textEntryGui.AddComponent<DragPanel>();
//MenuNavigation.SpawnMenuNavigation(_textEntryGui, Navigation.Mode.Automatic, true);
}
}
}
}