本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setScrollBarPositions方法的典型用法代码示例。如果您正苦于以下问题:Java ScrollPane.setScrollBarPositions方法的具体用法?Java ScrollPane.setScrollBarPositions怎么用?Java ScrollPane.setScrollBarPositions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
的用法示例。
在下文中一共展示了ScrollPane.setScrollBarPositions方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DirectionalLightsForm
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public DirectionalLightsForm(Skin skin, ReloadSceneListener reloadSceneListener) {
setSkin(skin);
addButton = new TextButton("add new light", skin);
listener = reloadSceneListener;
add(addButton);
row();
content = new Table();
content.setBackground(DevelopmentWindow.INNER_BACKGROUND);
content.pad(5);
ScrollPane pane = new ScrollPane(content);
pane.setScrollingDisabled(true, false);
pane.setScrollBarPositions(false, true);
pane.setScrollbarsOnTop(true);
add(pane).height(300);
row();
}
示例2: 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) {
final String[] setup = parser.parseArray(rawAttributeData, actor);
if (setup.length != 2) { // Alpha, delay.
parser.throwErrorIfStrict(
"Scroll bar positions setup needs an array with exactly 2 elements (in that order): bar on bottom, bar on right. See ScrollPane#setScrollBarPositions(boolean, boolean).");
return;
}
final boolean bottom = parser.parseBoolean(rawAttributeData, actor);
final boolean right = parser.parseBoolean(rawAttributeData, actor);
actor.setScrollBarPositions(bottom, right);
}
示例3: GUIList
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIList()
{
this.name = "GenericGUIList";
this.window = new Window(this.name,
GameManager.getSkin(GameManager.selectedSkin), "window");
this.window.setName(name);
this.window.setPosition(0 / (float)Vars.getDouble("balancedScreenWidth"),
0 / (float)Vars.getDouble("balancedScreenHeight"));
this.window.setHeight(0 / (float)Vars.getDouble("balancedScreenHeight"));
this.window.setWidth(0 / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults().padLeft(0);
window.defaults().padRight(0);
window.defaults().padTop(0);
window.defaults().padBottom(0);
window.defaults().minWidth(100 / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults().minHeight(30 / (float)Vars.getDouble("balancedScreenHeight"));
table = new Table();
table.defaults().padLeft(0);
table.defaults().padRight(0);
table.defaults().padTop(0);
table.defaults().padBottom(0);
table.setFillParent(true);
table.setWidth(100);
table.setHeight(30);
table.left();
table.bottom();
scroll = new ScrollPane(table);
scroll.setScrollBarPositions(false, true);
scroll.setScrollingDisabled(true, true);
scroll.setScrollbarsOnTop(true);
scroll.setFadeScrollBars(false);
scroll.setFillParent(true);
scroll.setSmoothScrolling(false);
scroll.setWidth(90);
scroll.setHeight(30);
window.add(scroll).fill();
}
示例4: DialogUI
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public DialogUI(HUDScreen parent) {
super("对话", Assets.instance.STATUSUI_SKIN, "solidbackground");
hudScreen = parent;
json = new Json();
graph = new ConversationGraph();
//create
talkText = new Label("", Assets.instance.STATUSUI_SKIN);
talkText.setWrap(true);
talkText.setAlignment(Align.left);
items = new List<ConversationChoice>(Assets.instance.STATUSUI_SKIN);
closeButton = new TextButton("X", Assets.instance.STATUSUI_SKIN);
ScrollPane scrollPane = new ScrollPane(items);
scrollPane.setOverscroll(false, false);
scrollPane.setFadeScrollBars(false);
scrollPane.setScrollingDisabled(true, false);
scrollPane.setForceScroll(true, false);
scrollPane.setScrollBarPositions(false, true);
//layout
this.add();
this.add(closeButton);
this.row();
this.defaults().expand().fill();
this.add(talkText).pad(10, 10, 10, 10);
this.row();
this.add(scrollPane).pad(10,10,10,10);
//this.debug();
this.pack();
//Listeners
items.addListener(new ClickListener() {
@Override
public void clicked (InputEvent event, float x, float y) {
ConversationChoice choice = (ConversationChoice)items.getSelected();
if( choice == null ) return;
//TODO: pickup,sleep event etc
// graph.notify(graph, choice.getConversationCommandEvent());
hudScreen.executeCommandEvent(graph, choice.getConversationCommandEvent());
populateConversationDialog(choice.getDestinationId());
}
});
}
示例5: GUIContainer
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIContainer(String n, Window w, ContainerType type,
Vector2 vector2, Vector2 vector22, int j, int i, int k, int l)
{
this.name = n;
this.type = type;
modal = w;
this.modal.setPosition(vector2.x / (float)Vars.getDouble("balancedScreenWidth"),
vector2.y / (float)Vars.getDouble("balancedScreenHeight"));
this.modal.setHeight(vector22.y / (float)Vars.getDouble("balancedScreenHeight"));
this.modal.setWidth(vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
modal.defaults().padLeft(i);
modal.defaults().padRight(j);
modal.defaults().padTop(k);
modal.defaults().padBottom(l);
modal.defaults().minWidth(100);
modal.defaults().minHeight(30);
modal.setMovable(true);
table = new Table();
table.defaults().padLeft(i);
table.defaults().padRight(j);
table.defaults().padTop(k);
table.defaults().padBottom(l);
table.setFillParent(true);
table.setWidth(vector22.x - i - j);
table.setHeight(vector22.y - k - l);
table.left();
table.bottom();
scroll = new ScrollPane(table);
scroll.setScrollBarPositions(false, true);
scroll.setScrollingDisabled(true, false);
scroll.setScrollbarsOnTop(true);
scroll.setFadeScrollBars(false);
scroll.setFillParent(true);
scroll.setSmoothScrolling(false);
scroll.setWidth(vector22.x - 10);
scroll.setHeight(vector22.y - 10);
modal.add(table).fill();
}
示例6: GUIServerList
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIServerList()
{
this.window = new Window("servers_list",
GameManager.getSkin(GameManager.selectedSkin), "window");
this.window.setHeight(500 / (float)Vars.getDouble("balancedScreenHeight"));
this.window.setWidth(500 / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults().padLeft(10);
window.defaults().padRight(10);
window.defaults().padTop(10);
window.defaults().padBottom(10);
window.defaults().prefWidth(500 / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults()
.prefHeight(500 / (float)Vars.getDouble("balancedScreenHeight"));
table = new Table();
table.defaults().padLeft(10);
table.defaults().padRight(10);
table.defaults().padTop(10);
table.defaults().padBottom(10);
table.setFillParent(true);
table.setWidth(480);
table.setHeight(480);
table.left();
table.bottom();
scroll = new ScrollPane(table);
scroll.setScrollBarPositions(false, true);
scroll.setScrollingDisabled(true, true);
scroll.setScrollbarsOnTop(true);
scroll.setFadeScrollBars(false);
scroll.setFillParent(true);
scroll.setSmoothScrolling(false);
scroll.setWidth(480);
scroll.setHeight(480);
window.add(scroll).fill();
window.setTitle("Pick a server");
mainTable = new Table();
mainTable.setFillParent(true);
mainTable.add(window);
}
示例7: GUIChatWindow
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //导入方法依赖的package包/类
public GUIChatWindow(String n, Window w, Vector2 vector2, Vector2 vector22,
int i, int j, int k, int l)
{
this.name = n;
this.window = w;
this.window.setName(n);
this.window.setPosition(vector2.x / (float)Vars.getDouble("balancedScreenWidth"),
vector2.y / (float)Vars.getDouble("balancedScreenHeight"));
this.window.setHeight(vector22.y / (float)Vars.getDouble("balancedScreenHeight"));
this.window.setWidth(vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults().padLeft(i);
window.defaults().padRight(j);
window.defaults().padTop(k);
window.defaults().padBottom(l);
window.defaults().prefWidth(
vector22.x / (float)Vars.getDouble("balancedScreenWidth"));
window.defaults().prefHeight(
vector22.y / (float)Vars.getDouble("balancedScreenHeight"));
table = new Table();
table.defaults().padLeft(i);
table.defaults().padRight(j);
table.defaults().padTop(k);
table.defaults().padBottom(l);
table.setFillParent(true);
table.setWidth(vector22.x - i - j);
table.setHeight(vector22.y - k - l);
table.left();
table.bottom();
scroll = new ScrollPane(table);
scroll.setScrollBarPositions(false, true);
scroll.setScrollingDisabled(true, true);
scroll.setScrollbarsOnTop(true);
scroll.setFadeScrollBars(false);
scroll.setFillParent(true);
scroll.setSmoothScrolling(false);
scroll.setWidth(vector22.x - 10);
scroll.setHeight(vector22.y - 20);
window.add(scroll).fill();
}