示例#1
0
    static public InstantGuiButton CreateButton()
    {
        InstantGuiButton element = (InstantGuiButton)InstantGuiElement.Create("Button", typeof(InstantGuiButton), GetSelectedElement());

        InstantGui.ForceUpdate();
        Selection.activeGameObject = element.gameObject;
        return(element);
    }
示例#2
0
    public override void  OnInspectorGUI()
    {
        InstantGuiButton script = (InstantGuiButton)target;

        base.OnInspectorGUI();
        if (!script)
        {
            return;
        }

        //EditorGUILayout.Space();

        InstantGuiInspector.DrawActivator("On Pressed:", script.onPressed);
    }
	void swapTextures(ref InstantGuiButton a, ref InstantGuiButton b)
	{
		Texture tmpTexture = a.style.main.texture;
		a.style.main.texture = b.style.main.texture;
		b.style.main.texture = tmpTexture;
	}
示例#4
0
        public void SelectGalaxy(int buttonId)
        {
            InstantGuiButton button = (InstantGuiButton)GameManager.GetGuiComponentWithName("sistema" + buttonId);

            _labelServerSelected.text = button.text;
        }