Package com.pointcliki.ui

Examples of com.pointcliki.ui.DropDownMenu


  }
 
  private void createLogicEditor() {
    fItem = "";
    // Add settings
    final DropDownMenu type = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String t, SelectionEvent event) {
        fType = ((DropDownMenu) event.source()).value();
        try {
          fSubType = JSONObject.getNames(fLogics.getJSONObject(fType))[0];
        } catch (JSONException e) {
          System.err.println("Can't parse subtype");
          System.err.println(e.getMessage());
        }
        editLogic(null);
        return Minion.CONTINUE;
      }
    });
    for (String s: JSONObject.getNames(fLogics)) type.add(s);
    type.select(fType);
    type.resize(new Vector2f(155, 24));
    addChild(type, 10);
   
    final DropDownMenu subtype = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String type, SelectionEvent event) {
        fSubType = ((DropDownMenu) event.source()).value();
        editLogic(null);
        return Minion.CONTINUE;
      }
    });
    subtype.position(new Vector2f(0, 26));
    try {
      for (String s: JSONObject.getNames(fLogics.getJSONObject(fType))) subtype.add(s);
    } catch (JSONException e) {
      System.err.println("Error parsing the editor preset logics");
      System.err.println(e.getMessage());
    }
    subtype.select(fSubType);
    subtype.resize(new Vector2f(155, 24));
    addChild(subtype, 9);
   
    fLogicPane = new LogicPane();
    fLogicPane.position(new Vector2f(0, 56));
    addChild(fLogicPane);   
View Full Code Here


              return Minion.CONTINUE;
            }
          });
          addChild(box, n);
        } else {
          DropDownMenu drop = new DropDownMenu(new Minion<SelectionEvent>() {
            @Override
            public long run(Dispatcher<SelectionEvent> dispatcher, String type, SelectionEvent event) {
              s.choice(event.value());
              editLogic(l);
              return Minion.CONTINUE;
            }
          });
          drop.position(new Vector2f(0, i)).resize(new Vector2f(155, 24));
          for (String str: choices) drop.add(str.toLowerCase());
          if (!s.value().equals("")) drop.select(s.value().toLowerCase());
          addChild(drop, n);
        }
      }
      n--;
      i += 26;
View Full Code Here

  public void init() {
    resize(new Vector2f(164, 740));
   
    fImages = PointClikiGame.resourceManager().spritesheet("editor/smarts", 32, 32);
   
    fTilesetMenu = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String type, SelectionEvent event) {
        updateTiles();
        return Minion.CONTINUE;
      }
View Full Code Here

        scene(EditorScene.class).map().quirks(quirks.value());
        return Minion.CONTINUE;
      };
    });
   
    final DropDownMenu type = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String t, SelectionEvent event) {
        scene(EditorScene.class).map().type(((DropDownMenu)event.source()).value());
        return Minion.CONTINUE;
      }
    });
    type.add("Questz");
    type.add("Friendz");
    type.add("Battlez");
    type.select(scene(EditorScene.class).map().type());
    type.resize(new Vector2f(155, 24));
    type.position(new Vector2f(0, 130));
    addChild(type, 3);
   
    DropDownMenu fog = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String t, SelectionEvent event) {
        scene(EditorScene.class).map().fog(((DropDownMenu)event.source()).value());
        return Minion.CONTINUE;
      }
    });
    fog.add("No Fog");
    fog.add("Fog Of War");
    fog.add("Fixed Fog");
    fog.select(scene(EditorScene.class).map().fog());
    fog.resize(new Vector2f(155, 24));
    fog.position(new Vector2f(0, 156));
    addChild(fog, 2);
   
    Button play = new Button(new Minion<SelectionEvent>() {
     
      @Override
View Full Code Here

  protected Entity fTiles;

  public void init() {
    resize(new Vector2f(164, 740));
   
    fTilesetMenu = new DropDownMenu(new Minion<SelectionEvent>() {
      @Override
      public long run(Dispatcher<SelectionEvent> dispatcher, String type, SelectionEvent event) {
        updateTiles();
        return Minion.CONTINUE;
      }
View Full Code Here

TOP

Related Classes of com.pointcliki.ui.DropDownMenu

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.