Created
July 28, 2011 16:46
-
-
Save bingomanatee/1111914 to your computer and use it in GitHub Desktop.
unity Editor dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyDialog extends EditorWindow { | |
@MenuItem("Terrain/Dialog Test") | |
static function ShowWindow() { | |
var window:MyDialog = EditorWindow.GetWindow(MyDialog); | |
} | |
static function load_section(){ | |
print('load section'); | |
} | |
var section_id = ""; | |
function OnGUI() { | |
section_id = GUI.TextField( Rect(20, 40, 200, 30), section_id); | |
if (GUI.Button( Rect (220, 40, 80, 20), "Load Terrain")){ | |
MyDialog.load_section(); | |
} | |
if (GUI.Button( Rect (220, 140, 80, 20), "2 Terrain")){ | |
print ('button clicked'); | |
// load_section(section_id); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment