本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup.setFillParent方法的典型用法代码示例。如果您正苦于以下问题:Java WidgetGroup.setFillParent方法的具体用法?Java WidgetGroup.setFillParent怎么用?Java WidgetGroup.setFillParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup
的用法示例。
在下文中一共展示了WidgetGroup.setFillParent方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: create
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
@Override
public void create() {
Gdx.app.setLogLevel(Application.LOG_DEBUG);
Gdx.gl.glClearColor(0f, 0f, 0f, 0f);
stage = new Stage(new ScreenViewport());
WidgetGroup modalContainer = new WidgetGroup();
modalContainer.setFillParent(true);
WidgetGroup viewContainer = new WidgetGroup();
viewContainer.setFillParent(true);
stage.getRoot().addActor(viewContainer);
stage.getRoot().addActor(modalContainer);
Gdx.input.setInputProcessor(stage);
actor = new LoadingIndicator();
if (actor instanceof WidgetGroup) {
((WidgetGroup) actor).setFillParent(true);
}
viewContainer.addActor(actor);
}
示例2: UI
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
public UI()
{
uiElements = new ArrayList<UIElement>();
stage = new Stage(new ScreenViewport());
skin = new Skin(Gdx.files.internal("data/uiskin.json"));
root = new WidgetGroup();
root.setFillParent(true);
stage.addActor(root);
new MainOptionsWnd(skin);
}
示例3: ToastManager
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
/** Toast manager will create own group to host toasts and put it into the stage root. */
public ToastManager (Stage stage) {
WidgetGroup widgetGroup = new WidgetGroup();
widgetGroup.setFillParent(true);
widgetGroup.setTouchable(Touchable.childrenOnly);
stage.addActor(widgetGroup);
this.root = widgetGroup;
}
示例4: create
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
@Override
public void create() {
Gdx.app.setLogLevel(Application.LOG_DEBUG);
Gdx.gl.glClearColor(1f, 1f, 1f, 1f);
stage = new Stage(new ScreenViewport());
WidgetGroup modalContainer = new WidgetGroup();
modalContainer.setFillParent(true);
WidgetGroup viewContainer = new WidgetGroup();
viewContainer.setFillParent(true);
stage.getRoot().addActor(viewContainer);
stage.getRoot().addActor(modalContainer);
controller = new MokapController(platform = new MockPlatform(),
Gdx.files, viewContainer, modalContainer);
controller.getCommands().pushStack();
platform.setBatch(stage.getBatch());
Gdx.input.setInputProcessor(stage);
ApplicationAssets assets = controller.getApplicationAssets();
actor = buildUI(assets.getSkin(), assets.getI18N());
if (actor instanceof WidgetGroup) {
((WidgetGroup) actor).setFillParent(true);
}
viewContainer.addActor(actor);
stage.addListener(new ShortcutListener());
}
示例5: buildController
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
protected Controller buildController() {
WidgetGroup modalContainer = new WidgetGroup();
modalContainer.setFillParent(true);
WidgetGroup viewContainer = new WidgetGroup();
viewContainer.setFillParent(true);
stage.addActor(viewContainer);
stage.addActor(modalContainer);
return new MokapController(this.platform, Gdx.files, viewContainer,
modalContainer);
}
示例6: ToastManager
import com.badlogic.gdx.scenes.scene2d.ui.WidgetGroup; //导入方法依赖的package包/类
public ToastManager(Stage stage) {
WidgetGroup widgetGroup = new WidgetGroup();
widgetGroup.setFillParent(true);
stage.addActor(widgetGroup);
this.root = widgetGroup;
}