private void ItemSelected(GLUControl sender)
    {
        GLUMenuItem mi = (sender.tag as GLUMenuItem);

        mi.isChecked = !mi.isChecked;
        GLUDebug.Log("ItemSelected " + mi);
    }
Esempio n. 2
0
    private void SceneSelector0OnEndDrag(GLUControl sender, GLUControl target)
    {
        if (!GLU.terminal.input.leftButtonReleased)
        {
            return;
        }
        // ButtonsView0.ClearItems();

        GLUList <GLUListItem> il = new GLUList <GLUListItem>();

        if (!selectionChanged)
        {
            Vector3 mp = GLU.terminal.input.cursorPosition;
            SceneSelector0.selection = GLURTSUnitsController.instance.Select(new GLURect(
                                                                                 (int)mp.x - clickSelectionSize,
                                                                                 (int)mp.y - clickSelectionSize,
                                                                                 (int)mp.x + clickSelectionSize,
                                                                                 (int)mp.y + clickSelectionSize));
        }
        selectionChanged = false;

        foreach (GLURTSUnit u in GLURTSUnitsController.instance.units)
        {
            if (u.selected)
            {
                il.Add(new GLUListItem(u.name, u, "GLU/Controls/Textures/SceneView/unitIcon"));
            }
        }
        ButtonsView0.items = il;
    }
Esempio n. 3
0
 private void Button0OnPress(GLUControl sender)
 {
     foreach (GLURTSUnit u in GLURTSUnitsController.instance.units)
     {
         u.health = 100;
         u.deadFire.gameObject.ToogleActive(false);
         u.deadSmoke.gameObject.ToogleActive(false);
     }
     Close();
 }
Esempio n. 4
0
 private void SceneSelector0OnChar(GLUControl sender, Char key)
 {
     i++;
     i = i % 5;
     if (i == 0)
     {
         i++;
     }
     SceneSelector0.selectorRotation = (GLURotation)i;
     Debug.Log(" SceneView0.selectorRotation = " + SceneSelector0.selectorRotation);
 }
Esempio n. 5
0
    private void ButtonsView0OnItemInputPressed(GLUControl sender, Vector3 mp)
    {
        GLUListItem           li = (sender as GLUControl).tag as GLUListItem;
        GLUList <GLUListItem> il = new GLUList <GLUListItem>()
        {
            li
        };

        ButtonsView0.items = il;
        GLURTSUnitsController.instance.Select(li.obj as GLURTSUnit);
        SceneSelector0.selection.Clear();
        SceneSelector0.selection.Add(li.obj as GLURTSUnit);
    }
Esempio n. 6
0
    private void RTSGUIFormOnInputPressed(GLUControl sender, Vector3 mp)
    {
        if (!GLU.terminal.input.rightButtonPressed)
        {
            return;
        }
        Vector3 v = GetZeroPlanePoint0(Input.mousePosition);

        v.y = -0.25f;
        RallyPoint.instance.ShowRallyPoint(v);
        v.y = 0;
        foreach (GLURTSUnit u in GLURTSUnitsController.instance.units)
        {
            if (u.selected)
            {
                u.SetRallyPoint(v);
            }
        }
    }
Esempio n. 7
0
    private void SceneSelector0OnDrag(GLUControl sender, Vector3 mp)
    {
        if (!GLU.terminal.input.leftButtonDown)
        {
            return;
        }
        selectionChanged = true;

        /* Vector3 tl = GetZeroPlanePoint(new Vector3(SceneSelector0.selectionStart.x, GLU.terminal.height - SceneSelector0.selectionStart.y));
         * Vector3 tr = GetZeroPlanePoint(new Vector3(SceneSelector0.selectionEnd.x, GLU.terminal.height - SceneSelector0.selectionStart.y));
         * Vector3 br = GetZeroPlanePoint(new Vector3(SceneSelector0.selectionEnd.x, GLU.terminal.height - SceneSelector0.selectionEnd.y));
         * Vector3 bl = GetZeroPlanePoint(new Vector3(SceneSelector0.selectionStart.x, GLU.terminal.height - SceneSelector0.selectionEnd.y));
         * // Debug.Log(" SceneSelector0OnEndDrag: " + tl + ", " + tr + ", " + br + ", " + bl);
         * SceneSelector0.selection = GLURTSUnitsController.instance.Select(tl, tr, br, bl); */
        SceneSelector0.selection = GLURTSUnitsController.instance.Select(new GLURect(
                                                                             (int)Mathf.Min(SceneSelector0.selectionStart.x, SceneSelector0.selectionEnd.x),
                                                                             (int)Mathf.Min(SceneSelector0.selectionStart.y, SceneSelector0.selectionEnd.y),
                                                                             (int)Mathf.Max(SceneSelector0.selectionStart.x, SceneSelector0.selectionEnd.x),
                                                                             (int)Mathf.Max(SceneSelector0.selectionStart.y, SceneSelector0.selectionEnd.y)));
    }
Esempio n. 8
0
 private void Button4OnPress(GLUControl sender)
 {
     Application.Quit();
 }
Esempio n. 9
0
 private void Button2OnPress(GLUControl sender)
 {
     GLUMessageDialog.ShowOkModal("Message", "Not realized", "OK", null, 256);
 }
Esempio n. 10
0
 private void SaveFilePressed(GLUControl sender)
 {
     GLUFileBrowserDialog.ShowSaveDialog("Save file", "Folder", "File", "Ok", "Cancel", "", null, "*.*", "*.xml");
 }
Esempio n. 11
0
 private void LoadFilePressed(GLUControl sender)
 {
     GLUFileBrowserDialog.ShowLoadDialog("Load file", "Folder", "File", "Ok", "Cancel", "", null, "*.*", "*.xml");
 }
Esempio n. 12
0
 public void OkButtonPress(GLUControl sender)
 {
     Hide();
 }
Esempio n. 13
0
 private void CustomListBox0OnSelectionChanged(GLUControl sender)
 {
     GLUMessageDialog.ShowOkModal("Message", "ListBox selection changed", "OK", null, 320);
 }
Esempio n. 14
0
 private void TextEdit0OnEnter(GLUControl sender, Vector3 mp)
 {
 }
Esempio n. 15
0
 public void MessageBoxPress(GLUControl sender)
 {
     GLUMessageDialog.ShowYesNoModal("Message box", messageBoxEdit.text, "Accept", "Decline", null);
 }
Esempio n. 16
0
 private void SceneSelector0OnClick(GLUControl sender)
 {
 }
Esempio n. 17
0
 private void Button0OnPress(GLUControl sender)
 {
     GLURTSMenuForm.instance.ShowModal();
 }
Esempio n. 18
0
 private void Button0OnPress(GLUControl sender)
 {
     Close();
 }
Esempio n. 19
0
 private void ClonePressed(GLUControl sender)
 {
     (new RuntimeCreatedForm()).Show();
 }
Esempio n. 20
0
 private void Button2OnPress(GLUControl sender)
 {
     TerminalMessageForm.instance.ShowModal();
 }
Esempio n. 21
0
 private void ClosePressed(GLUControl sender)
 {
     Close();
 }
 private void TextButton0OnPress(GLUControl sender)
 {
     GLUMessageDialog.ShowOkModal("Message", "You pressed me!", "Ok", null, 320);
 }
Esempio n. 23
0
 private void ShowModalForm(GLUControl sender)
 {
     GLUENAboutForm.instance.ShowModal();
 }