本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollPane.ScrollPaneStyle方法的具体用法?Java ScrollPane.ScrollPaneStyle怎么用?Java ScrollPane.ScrollPaneStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
的用法示例。
在下文中一共展示了ScrollPane.ScrollPaneStyle方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setStyle
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public void setStyle(EditTextStyle style) {
this.style = style;
ScrollPane.ScrollPaneStyle sps = new ScrollPane.ScrollPaneStyle();
sps.background = style.background;
this.scrollPane.setStyle(sps);
Label.LabelStyle ls = new Label.LabelStyle();
ls.font = style.font;
ls.fontColor = style.fontColor;
this.textLabel.setStyle(ls);
Button.ButtonStyle bs = new Button.ButtonStyle();
bs.up = style.editIcon;
bs.down = style.editIcon;
editButton.setStyle(bs);
}
示例2: a
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public final void a(Skin paramSkin, Stage paramStage)
{
this.k = ((Label.LabelStyle)paramSkin.get("mission-list", Label.LabelStyle.class));
this.l = ((Label.LabelStyle)paramSkin.get("mission-list-disabled", Label.LabelStyle.class));
this.d = ((TextButton.TextButtonStyle)paramSkin.get("mission-list", TextButton.TextButtonStyle.class));
this.e = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-completed", TextButton.TextButtonStyle.class));
this.f = ((TextButton.TextButtonStyle)paramSkin.get("mission-list-selected", TextButton.TextButtonStyle.class));
this.g = ((Button.ButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
this.h = ((Button.ButtonStyle)paramSkin.get("disabled", Button.ButtonStyle.class));
this.o = paramSkin.getDrawable("nav-button-clear");
this.b = new Table();
this.b.setWidth(paramStage.getWidth());
this.b.setHeight(paramStage.getHeight());
cc.a(this.a, new aa(paramSkin, (int)paramStage.getWidth(), cc.b(this.a), com.nianticproject.ingress.common.ui.widget.ag.c));
this.b.add(cc.c(this.a));
this.b.row();
this.c = new Table();
this.c.setWidth(-10 + (int)paramStage.getWidth());
ScrollPane localScrollPane = new ScrollPane(this.c, new ScrollPane.ScrollPaneStyle());
localScrollPane.setScrollY(0.0F);
localScrollPane.setScrollingDisabled(true, false);
this.b.add(localScrollPane).g().o().p().j().a(5.0F, 5.0F, 5.0F, 5.0F);
paramStage.addActor(this.b);
}
示例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);
//CATEGORY BUTTONS
stage.addActor(toolCategoryBtn.getImageButton());
stage.addActor(furnitureCategoryBtn.getImageButton());
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 craftingContainer = CachePool.getTable();
usedTablesCache.add(craftingContainer);
float startX = (Settings.getWidth() / 2) - 255;
craftingContainer.setBounds(startX, 0, 370, Settings.getHeight() - 61);
craftingTable = CachePool.getTable();
stage.addListener(new CraftingButtonClickListener(stage, craftingTable, craftingContainer.getX(), craftingContainer.getY()));
usedTablesCache.add(craftingTable);
pane = new ScrollPane(craftingTable, paneStyle);
craftingContainer.add(pane).width(370).height(Settings.getHeight() - 61);
craftingContainer.row();
stage.addActor(craftingContainer);
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);
populateCraftableItems(toolCategoryBtn.getCategory());
InputController.getInstance().addInputProcessor(stage);
}
示例4: a
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public a(com.nianticproject.ingress.shared.playerprofile.a parama, Skin paramSkin, c paramc, float paramFloat)
{
this.a = ((com.nianticproject.ingress.shared.playerprofile.a)an.a(parama));
this.b = ((Skin)an.a(paramSkin));
this.c = ((c)an.a(paramc));
this.h = l.a(32.0F);
this.g = paramFloat;
this.f = new Table();
this.f.defaults().j(l.a(8.0F));
ScrollPane.ScrollPaneStyle localScrollPaneStyle = (ScrollPane.ScrollPaneStyle)paramSkin.get("avatar-color-picker", ScrollPane.ScrollPaneStyle.class);
ScrollPane localScrollPane = new ScrollPane(this.f, localScrollPaneStyle);
localScrollPane.setScrollingDisabled(false, true);
localScrollPane.setFadeScrollBars(false);
add(localScrollPane).o().g().c(this.h + 2.0F * paramFloat);
}
示例5: aa
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public aa(Skin paramSkin, int paramInt, af paramaf, ag paramag)
{
this.c = paramSkin;
this.a = paramaf;
this.b = paramag;
this.e = new Table();
this.d = new ab(this, this.e, new ScrollPane.ScrollPaneStyle());
setWidth(paramInt);
this.d.setWidth(paramInt);
this.d.setScrollingDisabled(false, true);
Table localTable1 = new Table();
Table localTable2 = new Table();
localTable2.setBackground(paramSkin.getDrawable("ops-title-background"));
localTable1.add(localTable2).o().g();
Label localLabel = new Label("OPS", paramSkin, "ops-title");
localLabel.setAlignment(16, 16);
localTable2.add(localLabel).o().g().m().h(e.a(0.02F));
localTable1.row();
Table localTable3 = new Table();
this.f = new Table();
this.f.setBackground(paramSkin.getDrawable("ops-scroll-indicator-left"));
this.g = new Table();
this.g.setBackground(paramSkin.getDrawable("ops-scroll-indicator-right"));
localTable3.add(this.f).n().f().k().a(e.a(0.1F));
localTable3.add(this.g).n().f().m().a(e.a(0.1F));
Actor[] arrayOfActor = new Actor[2];
arrayOfActor[0] = this.d;
arrayOfActor[1] = localTable3;
localTable1.stack(arrayOfActor);
Table localTable4 = new Table();
localTable4.setWidth(getWidth());
localTable4.setHeight(getHeight());
Button localButton = new Button(paramSkin, "ops-close");
localButton.addListener(new ac(this));
localTable4.add(localButton).n().k().j();
stack(new Actor[] { localTable1, localTable4 });
}
示例6: h
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public h(Actor paramActor, ScrollPane.ScrollPaneStyle paramScrollPaneStyle, float paramFloat1, float paramFloat2, float paramFloat3)
{
super(paramActor, paramScrollPaneStyle);
this.c = paramFloat2;
this.d = paramFloat3;
this.e = paramFloat1;
this.f = 0L;
if (paramFloat1 > 0.0F);
for (this.h = (0.5F * (paramFloat1 * paramFloat2)); ; this.h = 0.0F)
{
setScrollingDisabled(true, false);
addListener(new i(this));
return;
}
}
示例7: 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);
}
示例8: 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);
}
示例9: ListViewStyle
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public ListViewStyle (ListViewStyle style) {
if (style.scrollPaneStyle != null) this.scrollPaneStyle = new ScrollPane.ScrollPaneStyle(style.scrollPaneStyle);
}
示例10: a
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public final void a(Skin paramSkin, Stage paramStage)
{
Table localTable1 = new Table();
localTable1.setWidth(paramStage.getWidth());
localTable1.setHeight(paramStage.getHeight());
Table localTable2 = new Table();
this.f = new al(this.b, paramStage, paramSkin, this.c);
localTable2.add(this.f).o().g().h(24.0F);
localTable2.row();
localTable2.add(new Image(com.nianticproject.ingress.common.b.c.a(paramSkin, 46783))).c(l.a(2.0F)).o().g();
localTable2.row();
Table localTable3 = new Table();
this.m = new Label("", (Label.LabelStyle)paramSkin.get("profiles-select-badge-for-details", Label.LabelStyle.class));
paramSkin.get("default", TextButton.TextButtonStyle.class);
localTable3.add(this.m);
localTable2.add(localTable3).h(l.a(16.0F)).j(l.a(16.0F));
localTable2.row();
float f1 = l.a(24.0F);
this.g = new z(this.a, paramSkin, this.b, null, Integer.valueOf(5), localTable1.getWidth(), f1, 0.0F, 0.0F);
Table localTable4 = new Table();
localTable4.top();
localTable4.add(this.g).o().g().k(f1);
ScrollPane localScrollPane = new ScrollPane(localTable4, (ScrollPane.ScrollPaneStyle)paramSkin.get("profiles", ScrollPane.ScrollPaneStyle.class));
localScrollPane.setScrollingDisabled(true, false);
localScrollPane.setFadeScrollBars(false);
localTable2.add(localScrollPane).f().n();
Table localTable5 = new Table();
localTable5.setBackground(com.nianticproject.ingress.common.b.c.a(paramSkin, 0));
ProgressIndicator localProgressIndicator = new ProgressIndicator(paramSkin);
localProgressIndicator.a(true);
localTable5.add(localProgressIndicator).i();
Table localTable6 = new Table();
this.k = new Label("", (Label.LabelStyle)paramSkin.get("default", Label.LabelStyle.class));
localTable6.add(this.k).i();
this.l = new f("", (TextButton.TextButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
localTable6.row();
localTable6.add(this.l).i().h(l.a(8.0F));
this.h = localTable5;
this.i = localTable2;
this.j = localTable6;
Table localTable7 = new Table();
d locald = new d(paramSkin, "ops-close");
locald.addListener(new ar(this));
localTable7.add(locald).n().k().j();
Actor[] arrayOfActor = new Actor[4];
arrayOfActor[0] = this.i;
arrayOfActor[1] = this.h;
arrayOfActor[2] = this.j;
arrayOfActor[3] = localTable7;
localTable1.stack(arrayOfActor).f().n();
paramStage.addActor(localTable1);
}
示例11: a
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public final void a(Skin paramSkin, Stage paramStage)
{
this.f = new Table();
this.f.setWidth(paramStage.getWidth());
this.f.setHeight(paramStage.getHeight());
if (this.c != null)
{
this.e = new aa(paramSkin, (int)paramStage.getWidth(), this.c, ag.b);
if (this.a)
{
this.f.add(this.e);
this.f.row();
}
}
Table localTable1 = this.f;
float f1 = this.f.getWidth();
Table localTable2 = new Table();
localTable2.top();
float f2 = l.a(24.0F);
this.l = new al(this.b, paramStage, paramSkin, this.a);
localTable2.add(this.l).o().g();
this.m = new z(this.d, paramSkin, this.b, Integer.valueOf(2), Integer.valueOf(5), f1, f2, l.a(16.0F), l.a(16.0F));
localTable2.row();
localTable2.add(this.m).o().g().k(f2);
this.m.setBackground(paramSkin.getTiledDrawable("tile-diag"));
localTable2.row();
localTable2.add(new Image(com.nianticproject.ingress.common.b.c.a(paramSkin, 46783))).c(l.a(2.0F)).o().g().k(f2);
this.n = new af(paramSkin, f1, f2);
localTable2.row();
localTable2.add(this.n).o().g().k(f2);
ScrollPane localScrollPane = new ScrollPane(localTable2, (ScrollPane.ScrollPaneStyle)paramSkin.get("profiles", ScrollPane.ScrollPaneStyle.class));
localScrollPane.setScrollingDisabled(true, false);
Table localTable3 = new Table();
Table localTable4 = new Table();
ProgressIndicator localProgressIndicator = new ProgressIndicator(paramSkin);
localProgressIndicator.a(true);
localTable3.add(localProgressIndicator).i();
this.j = new Label("", (Label.LabelStyle)paramSkin.get("default", Label.LabelStyle.class));
localTable4.add(this.j).i();
this.k = new f("", (TextButton.TextButtonStyle)paramSkin.get("default", TextButton.TextButtonStyle.class));
localTable4.row();
localTable4.add(this.k).i().h(l.a(8.0F));
Table localTable5 = new Table();
this.g = localScrollPane;
this.h = localTable3;
this.i = localTable4;
Table localTable6 = new Table();
d locald = new d(paramSkin, "ops-close");
locald.addListener(new be(this));
localTable6.add(locald).n().k().j();
if (!this.a);
for (boolean bool = true; ; bool = false)
{
localTable6.setVisible(bool);
Actor[] arrayOfActor = new Actor[4];
arrayOfActor[0] = this.g;
arrayOfActor[1] = this.h;
arrayOfActor[2] = this.i;
arrayOfActor[3] = localTable6;
localTable5.stack(arrayOfActor).n().f();
localTable1.add(localTable5).f().n();
paramStage.addActor(this.f);
return;
}
}
示例12: ab
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
ab(aa paramaa, Actor paramActor, ScrollPane.ScrollPaneStyle paramScrollPaneStyle)
{
super(paramActor, paramScrollPaneStyle);
}