本文整理匯總了Java中com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.setSize方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrollPane.setSize方法的具體用法?Java ScrollPane.setSize怎麽用?Java ScrollPane.setSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.badlogic.gdx.scenes.scene2d.ui.ScrollPane
的用法示例。
在下文中一共展示了ScrollPane.setSize方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: create
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
@Override
public void create() {
Table _table = new Table();
this.table = _table;
Widgets _widgets = this.getWidgets();
String _get = I18N.get("wait_name");
Label _createLabel = _widgets.createLabel(_get);
this.table.<Label>add(_createLabel);
this.table.row();
final ScrollPane scrollpane = new ScrollPane(this.table);
scrollpane.setSize(Layout.LOCAL_SIZE.x, Layout.LOCAL_SIZE.y);
scrollpane.setPosition(Layout.LOCAL_SCROLL.x, Layout.LOCAL_SCROLL.y);
MyStage _stage = this.getStage();
_stage.addActor(scrollpane);
Widgets _widgets_1 = this.getWidgets();
final Procedure0 _function = new Procedure0() {
@Override
public void apply() {
WaitingScreen.this.leaveGame();
}
};
_widgets_1.addButton(Layout.Back, Icons.Back, _function);
Widgets _widgets_2 = this.getWidgets();
String _get_1 = I18N.get("wait_msg");
Label _addLabel = _widgets_2.addLabel(Layout.WAIT_START.x, Layout.WAIT_START.y, _get_1);
this.waitLabel = _addLabel;
}
示例2: create
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
@Override
public void create() {
ArrayList<NetworkGameInfo> _newArrayList = CollectionLiterals.<NetworkGameInfo>newArrayList();
this.games = _newArrayList;
this.initGames();
Table _table = new Table();
this.table = _table;
this.fillTable();
final ScrollPane scrollpane = new ScrollPane(this.table);
scrollpane.setSize(Layout.LOCAL_SIZE.x, Layout.LOCAL_SIZE.y);
scrollpane.setPosition(Layout.LOCAL_SCROLL.x, Layout.LOCAL_SCROLL.y);
MyStage _stage = this.getStage();
_stage.addActor(scrollpane);
Widgets _widgets = this.getWidgets();
final Procedure0 _function = new Procedure0() {
@Override
public void apply() {
LocalScreen.this.exitScreen(Screens.Main);
}
};
_widgets.addButton(Layout.Back, Icons.Back, _function);
Widgets _widgets_1 = this.getWidgets();
final Procedure0 _function_1 = new Procedure0() {
@Override
public void apply() {
LocalScreen.this.exitScreen(Screens.New);
}
};
_widgets_1.addButton(Layout.LOCAL_NEW, Icons.New, _function_1);
}
示例3: 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);
}
示例4: RoomChatPanel
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public RoomChatPanel (float w, float h) {
super();
content = new StringBuilder();
chatprint= new Label(content,Resources._skin);
inputfield = new TextField("",Resources._skin);
inputfield.setWidth(w);
inputfield.setMaxLength(max_char_per_mess);
inputfield.setMessageText("Enter to send ...");
inputfield.addListener(new InputListener() {
RoomChat__ chat = new RoomChat__();
public boolean keyTyped(InputEvent event, char character) {
if ( character == 13) {
chat.content = inputfield.getText().getBytes();
Resources._nclient.sendRoomChat(chat);
inputfield.setText("");
}
return false;
};
} );
scrpane = new ScrollPane(chatprint, Resources._skin);
scrpane.setSize(w,h-inputfield.getHeight()-1);
scrpane.setFadeScrollBars(false);
scrpane.setPosition(0,inputfield.getHeight()+1);
addActor(scrpane);
addActor(inputfield);
this.h = h;
this.w = w;
}
示例5: LoadDialog
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane; //導入方法依賴的package包/類
public LoadDialog(String path, Skin skin) {
super("Load from " + Config.PROJECT_PATH + path, skin);
this.path = path;
FileHandle internal = Gdx.files.local(Config.PROJECT_PATH + path);
String errorText = null;
if (!internal.exists()) {
errorText = "Directory not found '" + internal.path() + "'";
}
FileHandle[] list = internal.list(new FileFilter() {
@Override
public boolean accept(File pathname) {
return pathname.isFile();
}
});
if (list.length == 0) {
errorText = "No files found in '" + internal.path() + "'";
}
if (errorText != null) {
text(errorText);
button("OK", false);
key(Input.Keys.ENTER, false);
key(Input.Keys.ESCAPE, false);
return;
}
uiList = new List<String>(skin);
String[] fileNames = new String[list.length];
for (int i = 0; i < list.length; i++) {
FileHandle file = list[i];
fileNames[i] = file.name();
}
uiList.setItems(fileNames);
ScrollPane pane = new ScrollPane(uiList, skin);
pane.setFadeScrollBars(false);
pane.setSize(300, 300);
getContentTable().add(pane).top();
getContentTable().defaults().pad(2);
button("load", true);
button("cancel", false);
key(Input.Keys.ENTER, true);
key(Input.Keys.ESCAPE, false);
}