当前位置: 首页>>代码示例>>Java>>正文


Java ScrollPane.setCancelTouchFocus方法代码示例

本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setCancelTouchFocus方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollPane.setCancelTouchFocus方法的具体用法?Java ScrollPane.setCancelTouchFocus怎么用?Java ScrollPane.setCancelTouchFocus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.badlogic.gdx.scenes.scene2d.ui.ScrollPane的用法示例。


在下文中一共展示了ScrollPane.setCancelTouchFocus方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: create

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void create() {
  HashSet<Procedure0> _newHashSet = CollectionLiterals.<Procedure0>newHashSet();
  this.updateProcedures = _newHashSet;
  Table _table = new Table();
  this.table = _table;
  this.table.setFillParent(false);
  Skin _skin = this.widgets.getSkin();
  final ScrollPane scrollpane = new ScrollPane(this.table, _skin);
  scrollpane.setSize(Layout.OPTION_SIZE.x, Layout.OPTION_SIZE.y);
  scrollpane.setPosition(Layout.OPTION_SCROLL.x, Layout.OPTION_SCROLL.y);
  scrollpane.setCancelTouchFocus(false);
  scrollpane.setFadeScrollBars(false);
  this.stage.addActor(scrollpane);
}
 
开发者ID:CymricNPG,项目名称:abattle,代码行数:15,代码来源:OptionTable.java

示例2: doShow

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override protected void doShow(final UserData userData) {
    final Table items = new Table();
    final ScrollPane pane = new ScrollPane(items, new ScrollPane.ScrollPaneStyle()) {

        @Override public void layout() {
            float w = items.getPrefWidth();
            float h = Math.min(getParent().getHeight(), items.getPrefHeight());
            if (w != getWidth() || h != getHeight()) {
                setSize(w, h);
                invalidateHierarchy();
            }
            super.layout();
        }
    };
    pane.setTouchable(Touchable.childrenOnly);
    pane.setOverscroll(false, false);
    pane.setCancelTouchFocus(false);
    pane.addListener(new ChangeListener() {

        @Override public void changed(ChangeEvent event, Actor actor) {
            pane.layout();
            pane.layout();
            items.layout();
            if (actor instanceof Layout)
                ((Layout) actor).layout();
            pane.layout();
            pane.layout();
            pane.scrollTo(actor.getX(), actor.getY(), actor.getWidth(), actor.getHeight() + 100);
        }
    });

    Iterable<Die> dice = userData.dice();
    int i = 1;
    int count = userData.diceCount();
    for (Die die : dice) {
        DiePane diePane = new DiePane(die, userData, diceWindowGroup);
        table.add(diePane);
        diePane.setWidth(0);
        diePane.pack();
        diePane.setWidth(ViewController.CELL_SIZE * 6.6f);
        Cell cell = items.add(diePane).fillX().maxWidth(ViewController.CELL_SIZE * 6.6f);
        if (i != count) {
            cell.padBottom(-1);
        }
        cell.row();
        map.put(die, diePane);
        diePane.info.addListener(createMinimizeListener(die, dice));
        i++;
    }
    items.pack();
    table.add(pane).width(items.getPrefWidth());//.size(items.getPrefWidth(), 200);
}
 
开发者ID:ratrecommends,项目名称:dice-heroes,代码行数:53,代码来源:DiceWindow.java

示例3: create

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
public void create() {
	camera = new OrthoCamera();
	camera.resize();

	stageSb = new SpriteBatch();
	stage = new Stage(new StretchViewport(Settings.getWidth(), Settings.getHeight()), stageSb);

	ScrollPane.ScrollPaneStyle paneStyle = new ScrollPane.ScrollPaneStyle();
	paneStyle.background = new TextureRegionDrawable(new TextureRegion(ResourceManager.getInstance().getTexture("invStageBg")));
	//paneStyle.vScrollKnob = new TextureRegionDrawable();
	//paneStyle.hScroll = paneStyle.hScrollKnob = paneStyle.vScroll = paneStyle.vScrollKnob;

	Table invContainer = CachePool.getTable();
	invContainer.setCullingArea(new Rectangle(0, 0, Settings.getWidth(), Settings.getHeight()));
	usedTablesCache.add(invContainer);

	float startX = (Settings.getWidth() / 2) - 255;
	invContainer.setBounds(startX, 0, 370, Settings.getHeight() - 61);

	table = CachePool.getTable();
	table.setCullingArea(new Rectangle(0, 0, Settings.getWidth(), Settings.getHeight()));
	table.addListener(new InventoryButtonClickListener(table));
	usedTablesCache.add(table);

	ScrollPane pane = new ScrollPane(table, paneStyle);
	pane.setCancelTouchFocus(false);
	pane.setCullingArea(new Rectangle(0, 0, Settings.getWidth(), Settings.getHeight()));

	invContainer.add(pane).width(370).height(Settings.getHeight() - 61);
	invContainer.row();
	stage.addActor(invContainer);

	itemNameLabel = new Label("", ResourceManager.getInstance().getFont("font"), startX + 370 + 10, Settings.getHeight() - 61 - 35, false);
	itemInfoLabel = new MultilineLabel("", ResourceManager.getInstance().getFont("font"), startX + 370 + 10, Settings.getHeight() - 61 - 85, false);

	for (int y = 0; y < inventory.getHeight(); y++) {
		for (int x = 0; x < inventory.getWidth(); x++) {

			ItemStack stack = inventory.getItemStack(x, y);
			ItemBox box = new ItemBox(stack, x, y, x + " " + y);
			InventoryDragListener dragListener = getDragListener(box);
			dragListener.setScrollPane(pane);
			dragListener.setTableHolder(table);
			dragListener.setInventory(inventory);
			box.addListener(dragListener);

			Cell<Table> cell = table.add((Table) box).width(60).height(60).padRight(10).padBottom(10);
			if (x == 0) {
				cell.padLeft(10);
			}
			if (y == 0) {
				cell.padTop(10);
			}
		}
		table.row();
	}
	InputController.getInstance().addInputProcessor(stage);
}
 
开发者ID:jmrapp1,项目名称:TerraLegion,代码行数:60,代码来源:InventoryScreen.java

示例4: process

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
@Override
public void process(final LmlParser parser, final LmlTag tag, final ScrollPane actor,
        final String rawAttributeData) {
    actor.setCancelTouchFocus(parser.parseBoolean(rawAttributeData, actor));
}
 
开发者ID:czyzby,项目名称:gdx-lml,代码行数:6,代码来源:ScrollCancelTouchFocusLmlAttribute.java

示例5: generateScrollPane

import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
private ScrollPane generateScrollPane(Actor actor) {
  ScrollPane pane = new ScrollPane(actor);
  pane.setCancelTouchFocus(false);
  pane.setScrollingDisabled(true, false);
  return pane;
}
 
开发者ID:bitbrain,项目名称:craft,代码行数:7,代码来源:IngameScreen.java


注:本文中的com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setCancelTouchFocus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。