first commit

This commit is contained in:
Chris
2025-03-12 14:22:16 -04:00
commit 0ad0c01249
1999 changed files with 189708 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
using UnityEditor;
using UnityEngine;
namespace SingularityGroup.HotReload.Editor {
internal class OpenDialogueButton : IGUIComponent {
public readonly string text;
public readonly string url;
public readonly string title;
public readonly string message;
public readonly string ok;
public readonly string cancel;
public OpenDialogueButton(string text, string url, string title, string message, string ok, string cancel) {
this.text = text;
this.url = url;
this.title = title;
this.message = message;
this.ok = ok;
this.cancel = cancel;
}
public void OnGUI() {
Render(text, url, title, message, ok, cancel);
}
public static void Render(string text, string url, string title, string message, string ok, string cancel) {
if (GUILayout.Button(new GUIContent(text.StartsWith(" ") ? text : " " + text))) {
if (EditorUtility.DisplayDialog(title, message, ok, cancel)) {
Application.OpenURL(url);
}
}
}
public static void RenderRaw(Rect rect, string text, string url, string title, string message, string ok, string cancel, GUIStyle style = null) {
if (GUI.Button(rect, new GUIContent(text.StartsWith(" ") ? text : " " + text), style ?? GUI.skin.button)) {
if (EditorUtility.DisplayDialog(title, message, ok, cancel)) {
Application.OpenURL(url);
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 97ca8174f0514e8e9ee5d4be26ed8078
timeCreated: 1674416481

View File

@@ -0,0 +1,29 @@
using UnityEditor;
using UnityEngine;
namespace SingularityGroup.HotReload.Editor {
internal class OpenURLButton : IGUIComponent {
public readonly string text;
public readonly string url;
public OpenURLButton(string text, string url) {
this.text = text;
this.url = url;
}
public void OnGUI() {
Render(text, url);
}
public static void Render(string text, string url) {
if (GUILayout.Button(new GUIContent(text.StartsWith(" ") ? text : " " + text))) {
Application.OpenURL(url);
}
}
public static void RenderRaw(Rect rect, string text, string url, GUIStyle style = null) {
if (GUI.Button(rect, new GUIContent(text.StartsWith(" ") ? text : " " + text), style ?? GUI.skin.button)) {
Application.OpenURL(url);
}
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ef12252fc9d1f9f438cbd34cf8f7364b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: