public Group createSuperRoot() { Group SRoot = new Group(); SRoot.setSize(getFullWidth(), getFullHeight()); SRoot.setPosition(game.getCenterX(), game.getCenterY(), Align.center); return SRoot; }
public T show(Stage stage, float sx, float sy, int aglin) { game.var3dListener.getLineNumber(t); stage.addActor(t); if (stage instanceof VStage) { VStage vStage = (VStage) stage; t.setPosition(vStage.getFullWidth() * sx - vStage.getCutWidth(), vStage.getFullHeight() * sy - vStage.getCutHeight(), aglin); } else { t.setPosition(stage.getWidth() * sx, stage.getHeight() * sy, aglin); } return t; }
public VDialog(VGame game, boolean isStretching) { this.isStretching = isStretching; this.game = game; stageTop = game.getTopStage(); //在有内置虚拟按钮的安卓上会出现屏幕分辨率被改变的状况造成遮盖层无法完全覆盖底层,故强制放大1.5倍解决这个问题 bg0 = game.getImage(stageTop.getFullWidth()*1.5f, stageTop.getFullHeight()*1.5f, Color.BLACK) .setPosition(game.getCenterX(), game.getCenterY(), Align.center).getActor(); if (isStretching) { setScale(1f / stageTop.getRoot().getScaleX(), 1f / stageTop.getRoot().getScaleY()); } addBackgroundAcition(); }
public void synchronousSize(){ if(nativeTextField.getStage()!=null) { Stage stage = nativeTextField.getStage(); float blx,bly; int w,h; float fullWidth,fullHeight; if(stage instanceof VStage){ VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); }else { fullWidth=stage.getWidth(); fullHeight=stage.getHeight(); } blx= (1f/fullWidth*Gdx.graphics.getWidth()); bly= (1f/fullHeight*Gdx.graphics.getHeight()); w= (int) (nativeTextField.getWidth()*blx); h= (int) (nativeTextField.getHeight()*bly); setSize(w,h); synchronousPosition(); }else { setVisible(false); } }
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); }else { fullWidth=stage.getWidth();
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); }else { fullWidth=stage.getWidth();
float fullHeight = stage instanceof VStage ? ((VStage) stage).getFullHeight() : stage.getHeight(); bly= (float) (1f/screenSize.getHeight() * fullHeight); libgdxKeyboardHeight = (float) (keyboardRect.getHeight() *bly);
float fullHeight = stage instanceof VStage ? ((VStage) stage).getFullHeight() : stage.getHeight(); bly= (float) (1f/screenSize.height() * fullHeight); libgdxKeyboardHeight = (float) (keyboardRect.size().height() *bly);
float fullHeight = stage instanceof VStage ? ((VStage) stage).getFullHeight() : stage.getHeight(); bly= (float) (1f/screenSize.height() * fullHeight); libgdxKeyboardHeight = (float) (keyboardRect.size().height() *bly);
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); cutWidth=vStage.getCutWidth(); cutHeight=vStage.getCutHeight();
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); cutWidth=vStage.getCutWidth(); cutHeight=vStage.getCutHeight();
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); cutWidth=vStage.getCutWidth(); cutHeight=vStage.getCutHeight();
VStage vStage= (VStage) stage; fullWidth=vStage.getFullWidth(); fullHeight=vStage.getFullHeight(); cutWidth=vStage.getCutWidth(); cutHeight=vStage.getCutHeight();