Ejemplo n.º 1
0
  private static void createOptionsGroup() {
    optionsGroup = new Group();
    optionsGroup.setVisible(false);
    final OptionsPanel p = new OptionsPanel(AbstractScreen.skin, "dialog");
    p.setName(OPTIONS_PANEL_NAME);
    final Button options = new ImageButton(AbstractScreen.skin, "ic_settings");
    options.setBounds(
        AbstractScreen.stagew - OPTIONS_BUTTON_WIDTH_HEIGHT,
        AbstractScreen.stageh - OPTIONS_BUTTON_WIDTH_HEIGHT,
        OPTIONS_BUTTON_WIDTH_HEIGHT,
        OPTIONS_BUTTON_WIDTH_HEIGHT);
    options.addListener(
        new ClickListener() {
          @Override
          public void clicked(InputEvent event, float x, float y) {
            if (!p.isVisible()) {
              AbstractScreen.mockupController.show(p);
            } else {
              AbstractScreen.mockupController.hide(p);
            }
          }
        });
    TextureRegion t = AbstractScreen.skin.getRegion("ic_logo");

    Image i = new Image(t);
    i.setTouchable(Touchable.disabled);
    i.setX(AbstractScreen.halfstagew - t.getRegionWidth() / 2f);
    i.setY(AbstractScreen.halfstageh * 1.1f - t.getRegionHeight() / 2f);

    optionsGroup.addActor(i);
    optionsGroup.addActor(p);
    optionsGroup.addActor(options);
  }
Ejemplo n.º 2
0
 /** decides whether to hide the arrows based on the currently zoomed card index */
 private void updateZoomControls() {
   if (zoomReturnIndex == cards.getChildren().size - 1) {
     nextCardImage.setTouchable(Touchable.disabled);
     nextCardImage.setVisible(false);
     previousCardImage.setTouchable(Touchable.enabled);
     previousCardImage.setVisible(true);
   } else if (zoomReturnIndex == 0) {
     previousCardImage.setTouchable(Touchable.disabled);
     previousCardImage.setVisible(false);
     nextCardImage.setTouchable(Touchable.enabled);
     nextCardImage.setVisible(true);
   } else {
     previousCardImage.setTouchable(Touchable.enabled);
     previousCardImage.setVisible(true);
     nextCardImage.setTouchable(Touchable.enabled);
     nextCardImage.setVisible(true);
   }
 }
Ejemplo n.º 3
0
 @Override
 public void set_touchable(boolean p_bool) {
   super.setTouchable(Touchable.disabled);
 }