Package de.yaams.extensions.rgssproject.map

Examples of de.yaams.extensions.rgssproject.map.YMapView


          @Override
          public void run() {

            // load
            YMapView map = new YMapView(e.getId() == 201 ? RubyHelper.toInt(e.getParameters(), 1) : 1, e.getYecl().getProject());
            map.installClickSupport();

            map.setSelectX(RubyHelper.toInt(e.getParameters(), 2));
            map.setSelectY(RubyHelper.toInt(e.getParameters(), 3));
            if (e.getId() == 201) {
              map.installMapChance();
            }

            // show
            if (YDialog.show(I18N.t("Neue Position"), "map", map, true)) {
              // set it
              RubyHelper.setNum(e.getParameters(), 2, map.getSelectX());
              RubyHelper.setNum(e.getParameters(), 3, map.getSelectY());
              if (e.getId() == 201) {
                RubyHelper.setNum(e.getParameters(), 1, map.getMapID());
              }
            }
            ((JButton) f.getElement("map.map").getElement()).setText(getPos(e, I18N.t("Neue Position")));

          }
View Full Code Here


                    RubyHelper.toInt(system, "@start_x"), RubyHelper.toInt(system, "@start_y"))), "map", new AE() {

                  @Override
                  public void run() {
                    // load
                    YMapView map = new YMapView(RubyHelper.toInt(system, "@start_map_id"), project);
                    map.installClickSupport();

                    map.setSelectX(RubyHelper.toInt(system, "@start_x"));
                    map.setSelectY(RubyHelper.toInt(system, "@start_y"));
                    map.installMapChance();

                    // show
                    if (YDialog.show(I18N.t("Start Position"), "map", map, true)) {
                      //
                      RubyHelper.setNum(system, "@start_x", map.getSelectX());
                      RubyHelper.setNum(system, "@start_y", map.getSelectY());
                      RubyHelper.setNum(system, "@start_map_id", map.getMapID());
                    }
                    ((JButton) form.getElement("party.pos").getElement()).setText(I18N.t(
                        "Start Position {0} - {1}/{2}", RubyHelper.toInt(system, "@start_map_id"),
                        RubyHelper.toInt(system, "@start_x"), RubyHelper.toInt(system, "@start_y")));
View Full Code Here

      // build main gui
      left = new JPanel(new GridLayout(1, 1));
      main = new JPanel(new BorderLayout());

      view = new YMapView(map, project);
      view.installClickSupport();
      view.getView().recreateEventImage();
      view.getView().addMouseListener(new MouseAdapter() {

        @Override
View Full Code Here

  public void buildForm(FormBuilder form, final int id) {
    // Load Map
    final RubyObject map = RGSS1Helper.get(project, Type.MAP).get(id).getObject();

    // add map view
    final YMapView view = new YMapView(map, project);
    view.recreateEventImage();

    // build basics
    form.addHeader("basic", new FormHeader(I18N.t("Grundlegenes"), getIcon() + "_info").setColumn(6));
    form.addElement("basic.name", RubyForm.getString("Name", "@name", map));
    form.addElement("basic.tile", new FormDBComboBox(I18N.t("Tileset"), project, Type.TILESET, map, "@tileset_id", false)
        .addChangeListener(new FormElementChangeListener() {

          @Override
          public void stateChanged(FormElement form) {
            view.recreateImage();

          }
        }));
    form.addElement("basic.size",
        new FormInfo(I18N.t("Size"), I18N.t("{0}x{1}", map.getInstanceVariable("@width"), map.getInstanceVariable("@height")))
View Full Code Here

TOP

Related Classes of de.yaams.extensions.rgssproject.map.YMapView

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.