Package org.spoutcraft.client.packet

Examples of org.spoutcraft.client.packet.PacketControlAction


      } catch (InterruptedException e) {
        break;
      }
    }
    textField.onTypingFinished();
    SpoutClient.getInstance().getPacketManager().sendSpoutPacket(new PacketControlAction(screen, textField, textField.getText(), textField.getCursorPosition()));
  }
View Full Code Here


        boolean doubleclick = false;
        if (System.currentTimeMillis() - 200 < lastClick) {
          doubleclick = true;
        }
        lw.setSelection(n);
        PacketControlAction action = null;
        if (!doubleclick) {
          action = new PacketControlAction(lw.getScreen(), lw, "click", lw.getSelectedRow());
        } else {
          action = new PacketControlAction(lw.getScreen(), lw, "doubleclick", lw.getSelectedRow());
        }
        ListWidgetItem current = lw.getSelectedItem();
        current.onClick(x - 5, y - currentHeight, doubleclick);
        lw.onSelected(lw.getSelectedRow(), doubleclick);
        if (lw instanceof ComboBoxView) {
View Full Code Here

    if (control instanceof RadioButton) {
      RadioButton radio = (RadioButton) control;
      radio.setSelected(true);
    }
    this.buttonClicked((Button) control);
    SpoutClient.getInstance().getPacketManager().sendSpoutPacket(new PacketControlAction(screen, control, 1));
    ((Button) control).onButtonClick();
    if (control instanceof GenericComboBox) {
      PacketComboBox packet = new PacketComboBox((GenericComboBox) control);
      SpoutClient.getInstance().getPacketManager().sendSpoutPacket(packet);
    }
View Full Code Here

            if (control.isFocus() && !isInBoundingRect(control, mouseX, mouseY)) { // released control
              control.setFocus(false);
            }
            if (control instanceof Slider && ((Slider) control).isDragging()) {
              ((Slider) control).setDragging(false);
              SpoutClient.getInstance().getPacketManager().sendSpoutPacket(new PacketControlAction(screen, control, ((Slider) control).getSliderPosition()));
              ((Slider) control).onSliderDrag(((Slider) control).getSliderPosition(), ((Slider) control).getSliderPosition());
            }
          }
        }
      }
View Full Code Here

          if (axis == Orientation.VERTICAL) {
            lw.scroll(0, -scroll / 30);
          } else {
            lw.scroll(-scroll / 30, 0);
          }
          PacketControlAction action = new PacketControlAction(lw.getScreen() != null ? lw.getScreen() : getScreen(), lw, axis.toString(), lw.getScrollPosition(axis));
          SpoutClient.getInstance().getPacketManager().sendSpoutPacket(action);
        }
      }
    }
  }
View Full Code Here

          }
        }
        if (widget instanceof ListWidget) {
          ListWidget lw = (ListWidget) widget;
          if (lw.isEnabled() && lw.isFocus()) {
            PacketControlAction action = null;
            if (Keyboard.getEventKey() == Keyboard.KEY_DOWN && Keyboard.getEventKeyState()) {
              handled = true;
              lw.shiftSelection(1);
              lw.onSelected(lw.getSelectedRow(), false);
              lw.getSelectedItem().onClick(-1, -1, false);
              action = new PacketControlAction(lw.getScreen() != null ? lw.getScreen() : getScreen(), lw, "selected", lw.getSelectedRow());
            }
            if (Keyboard.getEventKey() == Keyboard.KEY_UP && Keyboard.getEventKeyState()) {
              handled = true;
              lw.shiftSelection(-1);
              lw.onSelected(lw.getSelectedRow(), false);
              lw.getSelectedItem().onClick(-1, -1, false);
              action = new PacketControlAction(lw.getScreen() != null ? lw.getScreen() : getScreen(), lw, "selected", lw.getSelectedRow());
            }
            if (Keyboard.getEventKey() == Keyboard.KEY_RETURN && Keyboard.getEventKeyState()) {
              handled = true;
              if (lw.getSelectedRow() != -1) {
                lw.onSelected(lw.getSelectedRow(), true);
                lw.getSelectedItem().onClick(-1, -1, true);
                action = new PacketControlAction(lw.getScreen() != null ? lw.getScreen() : getScreen(), lw, "doubleclick", lw.getSelectedRow());
              }
            }
            if (action != null) {
              SpoutClient.getInstance().getPacketManager().sendSpoutPacket(action);
              break;
View Full Code Here

TOP

Related Classes of org.spoutcraft.client.packet.PacketControlAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.