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


Java Scaling.none方法代码示例

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


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

示例1: SelectDBItem

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public SelectDBItem(int listIndex, File file, String fileInfo, SelectDB_Activity.SelectDbStyle style) {

        super(listIndex);
        Label.LabelStyle nameStyle = new Label.LabelStyle();
        nameStyle.font = style.nameFont;
        nameStyle.fontColor = style.nameColor;

        Label.LabelStyle infoStyle = new Label.LabelStyle();
        infoStyle.font = style.infoFont;
        infoStyle.fontColor = style.infoColor;

        Table infoTable = new VisTable();

        fileName = file.getName();
        lblName = new VisLabel(fileName, nameStyle);
        lblInfo = new VisLabel(fileInfo, infoStyle);
        infoTable.add(lblName).left().fillX();
        infoTable.row();
        infoTable.add(lblInfo).left().fillX();

        Image iconImage = new Image(CB.getSkin().getMenuIcon.manageDB, Scaling.none);
        this.add(iconImage).center().padRight(CB.scaledSizes.MARGIN_HALF);

        this.add(infoTable).expandX().fillX();
    }
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:26,代码来源:SelectDBItem.java

示例2: ProgressDialog

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public ProgressDialog() {
	super();

	ResolutionIndependentAtlas resolutionIndependentAtlas = new ResolutionIndependentAtlas(Gdx.files.internal("hud/skin.txt"));
	Image progressSpinner = new Image(new TextureRegionDrawable(resolutionIndependentAtlas.findRegion("progress-indeterminate")), Scaling.none);
	progressSpinner.layout();
	progressSpinner.setOriginX(progressSpinner.getImageWidth() / 2);
	progressSpinner.setOriginY(progressSpinner.getImageHeight() / 2);

	Table c = new Table();
	c.add(progressSpinner).fill();

	setView(c);

	Tween.to(progressSpinner, WidgetAccessor.ROTATION, 1000).target(-360.0f).repeat(Tween.INFINITY, 350).start(TweenSystem.manager());
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:17,代码来源:ProgressDialog.java

示例3: AvatarInfoRow

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public AvatarInfoRow(Avatar avatar) {
	super();
	this.avatar = avatar;

	hungerBar = new ProgressBar((int) (avatar.getHungerLevel() * 100));
	restaurantsSatsifaction = new ProgressBar((int) (avatar.getSatisfactionFood() * 100));
	movingToLabel = FontManager.Roboto12.makeLabel("");

	row().fillX().space(Display.devicePixel(8));
	Image avatarImage = new Image(new TextureRegionDrawable(avatar), Scaling.none);
	avatarImage.setColor(avatar.getColor());
	add(avatarImage);
	add(FontManager.Default.makeLabel(avatar.getName())).expandX();
	add(hungerBar);
	add(restaurantsSatsifaction);
	add(movingToLabel).width(200);
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:18,代码来源:AvatarInfoRow.java

示例4: QuickButtonItem

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public QuickButtonItem(int listIndex, Drawable background, final AbstractAction action, CharSequence Desc, QuickActions type) {
    super(listIndex);
    this.background = background;
    quickActionsEnum = type;
    mAction = action;
    mActionDesc = Desc;
    try {
        spriteDrawable = action.getIcon();
    } catch (Exception e) {
        throw new IllegalStateException(action.getName() + " Action has no Icon");
    }

    mButtonIcon = new Image(spriteDrawable, Scaling.none, Align.center);
    this.addActor(mButtonIcon);

    if (action instanceof Action_Show_Hint) {
        EventHandler.add(new SelectedCacheChangedListener() {
            @Override
            public void selectedCacheChanged(SelectedCacheChangedEvent event) {
                spriteDrawable = action.getIcon();
                mButtonIcon.setDrawable(spriteDrawable);
                needsLayout = true;
                QuickButtonItem.this.invalidate();
            }
        });
    }
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:28,代码来源:QuickButtonItem.java

示例5: BooleanPropertyListView

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public BooleanPropertyListView(int listIndex, final BooleanProperty property, Drawable icon, final CharSequence name) {
    super(listIndex);

    this.property = property;

    //Left icon
    final Image iconImage = new Image(icon, Scaling.none);
    this.add(iconImage).center().padRight(CB.scaledSizes.MARGIN_HALF);

    //Center name text
    final Label label = new VisLabel(name);
    label.setWrap(true);
    this.add(label).expandX().fillX().padTop(CB.scaledSizes.MARGIN).padBottom(CB.scaledSizes.MARGIN);

    //Right checkBox
    checkImage = new Image(style.CheckNo);
    this.add(checkImage).width(checkImage.getWidth()).pad(CB.scaledSizes.MARGIN / 2);

    this.setCheckImage();

    this.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            property.set(!property.get());
        }
    });

    property.setChangeListener(new Property.PropertyChangedListener() {
        @Override
        public void propertyChanged() {
            log.debug("Property {} changed to {}", name, property.get());

            //property changed, so set name to "?"
            filterSettings.filterProperties.setName("?");
            setCheckImage();
        }
    });
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:39,代码来源:FilterSetListView.java

示例6: PresetItem

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public PresetItem(int listIndex, PresetEntry entry) {
    super(listIndex);
    this.entry = entry;
    final Image iconImage = new Image(entry.icon, Scaling.none);
    this.add(iconImage).center().padRight(CB.scaledSizes.MARGIN_HALF);
    final VisLabel label = new VisLabel(entry.name);
    label.setWrap(true);
    this.add(label).expandX().fillX().padTop(CB.scaledSizes.MARGIN).padBottom(CB.scaledSizes.MARGIN);
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:10,代码来源:PresetListView.java

示例7: updateControls

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
@Override
protected void updateControls() {
	super.updateControls();

	crimeBar.setValue(gridObject.getSurroundingCrimeLevel() * 5f);
	residencyBar.setValue(gridObject.getResidencyLevel() * 5f);

	boolean updatedLayout = false;

	if (gridObject.hasResidents()) {
		if (residentImages.getChildren().size < gridObject.getResidents().size()) {
			residentImages.clear();

			for (Avatar avatar : gridObject.getResidents()) {
				Image image = new Image(new TextureRegionDrawable(avatar), Scaling.none);
				image.getColor().set(avatar.getColor());
				residentImages.add(image).width((int) avatar.getWidth());
			}
			residentImages.pack();
			updatedLayout = true;
		}
	}

	if (updatedLayout) {
		invalidateHierarchy();
		pack();
	}
}
 
开发者ID:frigidplanet,项目名称:droidtowers,代码行数:29,代码来源:RoomPopOver.java

示例8: IntPropertyListView

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public IntPropertyListView(int listIndex, final IntProperty property, Drawable icon, final CharSequence name) {
    super(listIndex);

    this.property = property;

    //Left icon
    final Image iconImage = new Image(icon, Scaling.none);
    this.add(iconImage).center().padRight(CB.scaledSizes.MARGIN_HALF);

    //Center name text
    final Label label = new VisLabel(name);
    label.setWrap(true);
    this.add(label).expandX().fillX().padTop(CB.scaledSizes.MARGIN).padBottom(CB.scaledSizes.MARGIN);

    //Right checkBox
    checkImage = new Image(style.CheckNo);
    this.add(checkImage).width(checkImage.getWidth()).pad(CB.scaledSizes.MARGIN / 2);

    this.setCheckImage();

    this.addListener(new ClickListener() {
        @Override
        public void clicked(InputEvent event, float x, float y) {
            int value = property.getInt();

            if (value == -1)
                value = 0;
            else if (value == 0)
                value = 1;
            else if (value == 1)
                value = -1;
            property.set(value);
        }
    });

    property.setChangeListener(new Property.PropertyChangedListener() {
        @Override
        public void propertyChanged() {
            log.debug("Property {} changed to {}", name, property.getInt());

            //property changed, so set name to "?"
            filterSettings.filterProperties.setName("?");
            setCheckImage();
        }
    });
}
 
开发者ID:Longri,项目名称:cachebox3.0,代码行数:47,代码来源:FilterSetListView.java

示例9: GdxImage

import com.badlogic.gdx.utils.Scaling; //导入方法依赖的package包/类
public GdxImage(Texture t, String name) {
	super(t, Scaling.none, Align.CENTER, name);
}
 
开发者ID:steelkiwi,项目名称:libGDX-Path-Editor,代码行数:4,代码来源:GdxImage.java


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