當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。