Skip to content

Commit c4ec101

Browse files
committed
[update] signup button
1 parent 39086fc commit c4ec101

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

Editor/OllamaSupportWindow.cs

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ public class OllamaSupportWindow : EditorWindow
1111
private Texture2D logo;
1212

1313
private int selectedModelIndex;
14-
1514
private bool isDownloading;
1615

16+
private const string NeocortexUrl = "https://neocortex.link";
17+
private const string NeocortexSignUpUrl = "https://neocortex.link/register";
18+
1719
[MenuItem("Tools/Neocortex/Ollama Support")]
1820
public static void ShowWindow()
1921
{
2022
var window = GetWindow<OllamaSupportWindow>(false, "Neocortex Ollama Support", true);
21-
window.minSize = new Vector2(512, 352);
22-
window.maxSize = new Vector2(512, 352);
23+
window.minSize = new Vector2(512, 400); // Adjusted height for extra button
24+
window.maxSize = new Vector2(512, 400);
2325
}
2426

2527
private void OnEnable()
@@ -31,14 +33,19 @@ private void OnEnable()
3133
ollama.SetPlatformDependedStrings();
3234
}
3335

34-
private async void OnGUI()
36+
private void OnGUI()
3537
{
3638
if (logo)
3739
{
3840
float x = (position.width - 512) / 2;
3941
GUILayout.BeginHorizontal();
4042
GUILayout.Space(x);
41-
GUILayout.Label(logo, GUILayout.Width(512), GUILayout.Height(132));
43+
44+
if (GUILayout.Button(logo, GUIStyle.none, GUILayout.Width(512), GUILayout.Height(132)))
45+
{
46+
Application.OpenURL(NeocortexUrl);
47+
}
48+
4249
GUILayout.Space(x);
4350
GUILayout.EndHorizontal();
4451
}
@@ -48,6 +55,13 @@ private async void OnGUI()
4855
}
4956

5057
EditorGUILayout.BeginVertical("Box");
58+
59+
if (GUILayout.Button("Sign Up for Neocortex", GUILayout.Height(30)))
60+
{
61+
Application.OpenURL(NeocortexSignUpUrl);
62+
}
63+
64+
GUILayout.Space(10);
5165

5266
EditorGUILayout.HelpBox(
5367
"This window provides support for Ollama.\nClick the button below to download the necessary tools.",
@@ -62,14 +76,13 @@ private async void OnGUI()
6276
{
6377
Application.OpenURL(ollama.DownloadUrl);
6478
}
65-
6679
GUI.enabled = true;
6780

6881
GUILayout.Space(10);
6982

7083
EditorGUILayout.HelpBox(
7184
"At least 8 GB RAM is needed for 7B models, 16 GB for 13B models, and 32 GB for 33B models." +
72-
$"\nCurrent Device: VRAM: {SystemInfo.graphicsMemorySize / 1024f:F1} GB, RAM: {SystemInfo.systemMemorySize / 1024f:F1} GB",
85+
$"\nCurrent Device: VRAM: {SystemInfo.graphicsMemorySize / 1024f:F1} GB, RAM: {SystemInfo.systemMemorySize / 1024f:F1} GB",
7386
MessageType.Warning);
7487

7588
GUI.enabled = ollama.IsOllamaInstalled;
@@ -107,7 +120,6 @@ private async void OnGUI()
107120
}
108121

109122
GUI.enabled = true;
110-
111123
EditorGUILayout.EndVertical();
112124
}
113125

@@ -128,4 +140,4 @@ private void UpdateProgressBar()
128140
}
129141
}
130142
}
131-
}
143+
}

0 commit comments

Comments
 (0)