Package org.jruby

Examples of org.jruby.RubyObject$Data


   * de.yaams.maker.helper.gui.form.FormList#configForm(de.yaams.maker.helper
   * .gui.form.core.FormBuilder, java.lang.Object)
   */
  @Override
  protected void configForm(FormBuilder f, IRubyObject element) {
    RubyObject r = (RubyObject) element;

    // set it
    f.addElement("basic.frame", RubyForm.getNumber(I18N.t("Frame"), r, "@frame"));
    f.addElement("basic.se", new FormMusicEle(I18N.t("Soundeffekt"), project, RTP.SE, r.getInstanceVariable("@se")));
    f.addElement(
        "basic.scope",
        RubyForm.getComboBoxNum(I18N.t("Flash Scope"), JavaHelper.numAry(3), new String[] { "None", "target", "screen",
            "delete target" }, r, "@flash_scope"));
    f.addElement("basic.color", new FormColor(I18N.t("Flash Color"), r.getInstanceVariable("@flash_color")));
    f.addElement("basic.duration", RubyForm.getNumber(I18N.t("Flash duration"), r, "@frame"));
    f.addElement("basic.effect", RubyForm.getComboBoxNum(I18N.t("Condition of the effect"), JavaHelper.numAry(3), new String[] { "None",
        "Hit", "Miss" }, r, "@flash_scope"));

  }
View Full Code Here


   * @param value
   * @return
   */
  @Override
  public Object getText(final Object value) {
    RubyObject r = (RubyObject) value;
    RubyObject se = (RubyObject) r.getInstanceVariable("@se");

    String play = se.getInstanceVariable("@name").toString().length() == 0 ? "" : I18N.t("Play {0}", se.getInstanceVariable("@name"));

    return I18N.t("{0}. {1}", r.getInstanceVariable("@frame").toString(), play);// RGSS1Helper.get(project,
                                          // Type.ENEMY).get(RubyHelper.toInt(r.getInstanceVariable("@enemy_id"))).getName();
  }
View Full Code Here

   * de.yaams.maker.helper.gui.form.FormList#configForm(de.yaams.maker.helper
   * .gui.form.core.FormBuilder, java.lang.Object)
   */
  @Override
  protected void configForm(FormBuilder f, IRubyObject element) {
    RubyObject r = (RubyObject) element;

    // set it
    f.addElement("basic.frame", RubyForm.getNumber(I18N.t("Frame"), r, "@frame"));
    f.addElement("basic.se", new FormMusicEle(I18N.t("Soundeffekt"), project, RTP.SE, r.getInstanceVariable("@se")));
    f.addElement(
        "basic.scope",
        RubyForm.getComboBoxNum(I18N.t("Flash Scope"), JavaHelper.numAry(3), new String[] { "None", "target", "screen",
            "delete target" }, r, "@flash_scope"));
    f.addElement("basic.color", new FormColor(I18N.t("Flash Color"), r.getInstanceVariable("@flash_color")));
    f.addElement("basic.duration", RubyForm.getNumber(I18N.t("Flash duration"), r, "@frame"));
    f.addElement("basic.effect", RubyForm.getComboBoxNum(I18N.t("Condition of the effect"), JavaHelper.numAry(3), new String[] { "None",
        "Hit", "Miss" }, r, "@flash_scope"));

    // f.addHeader("kind", new FormHeader("Actiontyp", icon))
View Full Code Here

   * @param value
   * @return
   */
  @Override
  public Object getText(final Object value) {
    RubyObject r = (RubyObject) value;
    RubyObject se = (RubyObject) r.getInstanceVariable("@se");

    String play = se.getInstanceVariable("@name").toString().length() == 0 ? "" : I18N.t("Play {0}", se.getInstanceVariable("@name"));

    return I18N.t("{0}. {1}", r.getInstanceVariable("@frame").toString(), play);// RGSS1Helper.get(project,
                                          // Type.ENEMY).get(RubyHelper.toInt(r.getInstanceVariable("@enemy_id"))).getName();
  }
View Full Code Here

  public static void setObj(Object holder, Object index, IRubyObject value) {

    // rubyobject and string name?
    if (holder instanceof RubyObject && index instanceof String) {
      // get vars
      RubyObject rb = (RubyObject) holder;
      String var = (String) index;

      // set it
      rb.setInstanceVariable(var, value);

      return;
    }

    // arraylisr and index id?
View Full Code Here

  public static IRubyObject getObj(Object holder, Object index) {

    // rubyobject and string name?
    if (holder instanceof RubyObject && index instanceof String) {
      // get vars
      RubyObject rb = (RubyObject) holder;
      String var = (String) index;

      return (IRubyObject) rb.getInternalVariable(var);

    }

    // arraylist and index id?
    if (holder instanceof ArrayList && index instanceof Integer) {
View Full Code Here

      // paint events
      RubyHash events = (RubyHash) map.getInstanceVariable("@events");
      for (Object id : events.keySet()) {
        // load event
        RubyObject event = (RubyObject) events.get(id);
        int x = (Integer) event.getInstanceVariable("@x").toJava(Integer.class);
        int y = (Integer) event.getInstanceVariable("@y").toJava(Integer.class);
        // get first page for image
        RubyObject page = (RubyObject) ((RubyArray) event.getInstanceVariable("@pages")).get(0);
        // get image
        RubyObject graphic = (RubyObject) page.getInstanceVariable("@graphic");
        BufferedImage img = null;
        int tile = (Integer) graphic.getInstanceVariable("@tile_id").toJava(Integer.class);
        String cname = (String) graphic.getInstanceVariable("@character_name").toJava(String.class);
        // tile, graphic or nothing?
        if (tile > 0) {
          img = tileset.get(tile);
        } else if (cname != null && cname.length() > 0) {
          img = RessRess.getGraphic(project, "Characters", cname);
View Full Code Here

      return new RGSSRessourceTab(p);
    }

    // check for map
    if ((MapEditorTab.ID.equals(id) || EventsEditorTab.ID.equals(id) || EventTab.ID.equals(id)) && parameters.containsKey("map")) {
      RubyObject map = RGSS1Helper.get(p, Type.MAP).get(Integer.valueOf(parameters.get("map"))).getObject();

      // add tab
      if (EventsEditorTab.ID.equals(id)) {
        return new EventsEditorTab(p, map);
      }
      if (EventTab.ID.equals(id)) {
        // search for event
        RubyHash events = (RubyHash) map.getInstanceVariable("@events");
        int eid = Integer.valueOf(parameters.get("event"));

        for (Object key : events.keySet()) {
          // load event
          RubyObject event = (RubyObject) events.get(key);
          // right id?
          if (RubyHelper.toInt(event.getInstanceVariable("@id")) == eid) {
            return new EventTab(p, map, event);
          }
        }

      }
View Full Code Here

        if (!RGSSProjectHelper.is(project, true, false)) {
          return;
        }

        // load system
        final RubyObject system = RGSS1Helper.get(project, Type.SYSTEM).get(0).getObject();
        final RubyObject words = (RubyObject) system.getInstanceVariable("@words");

        // add basics
        eles.add(new SplitActionListElement(I18N.t("Basics"), I18N.t("Verwaltet die Grundlagen des Spiels"), "game") {

          @Override
View Full Code Here

    // convert
    while (os.size() != 0) {
      int size = os.size();

      // get code
      RubyObject r = (RubyObject) os.get(0);

      int id = RubyHelper.toInt(r.getInstanceVariable("@code"));

      EventCommandManagement.get(id).rawToView(codes, os, r, this);

      // nothig happend?
      if (size == os.size()) {
View Full Code Here

TOP

Related Classes of org.jruby.RubyObject$Data

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.