Skip to content
Snippets Groups Projects
Commit 7efa2790 authored by Kent Holt's avatar Kent Holt
Browse files

Dont remember

parent e4e288ef
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ public class CityGenWindow : EditorWindow
public void OnGUI()
{
//MakeCitySelec"
MakeMainCityMenu();
}
// ######### GUI Functions #########
......@@ -30,13 +30,27 @@ public class CityGenWindow : EditorWindow
// Make Main menu for selecting the city to edit.
private void MakeMainCityMenu()
{
string cityName = "Name here!";
this.citySelectionMenuScrollPosition = GUILayout.BeginScrollView(this.citySelectionMenuScrollPosition, GUILayout.Width(100), GUILayout.Height(100));
for(int i = 0; i < 5; i++)
if (GUILayout.Button("City " + i))
Debug.Log("Clicked on: City " + i);
foreach(string str in this.entries)
if (GUILayout.Button(str))
HandleMainCityMenuEvent(str);
EditorGUILayout.Separator();
EditorGUILayout.BeginHorizontal("Button");
cityName = GUILayout.TextField(cityName);
if (GUILayout.Button("Add"))
NewCity(cityName);
EditorGUILayout.EndHorizontal();
GUILayout.EndScrollView();
}
private void NewCity(string cityname_filename)
{
entries.Add(cityname_filename);
//cityGen.NewCity();
}
private bool HandleMainCityMenuEvent(string cityname_filename)
{
if (!cityGen.load(cityname_filename))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment