本文整理汇总了Java中com.badlogic.gdx.scenes.scene2d.actions.Actions.alpha方法的典型用法代码示例。如果您正苦于以下问题:Java Actions.alpha方法的具体用法?Java Actions.alpha怎么用?Java Actions.alpha使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.badlogic.gdx.scenes.scene2d.actions.Actions
的用法示例。
在下文中一共展示了Actions.alpha方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: displayContextMenu
import com.badlogic.gdx.scenes.scene2d.actions.Actions; //导入方法依赖的package包/类
public void displayContextMenu(Table content, boolean lock, ButtonKeyboardHelper keyboardHelper)
{
if (lockContextMenu)
{
return;
}
lockContextMenu = lock;
if ( !created )
{
create();
created = true;
}
contextMenu = new Tooltip( content, skin, stage );
contextMenu.setWidth( stage.getWidth() - ( abilityPanel.getWidth() + equipmentPanel.getWidth() + 40 ) );
contextMenu.setHeight( stage.getHeight() - ( buttonsPanel.getHeight() + 40 ) );
contextMenu.show( stage.getWidth() / 2 - contextMenu.getWidth() / 2 - 10, stage.getHeight() / 2 - contextMenu.getHeight() / 2 - 30, lock );
ParallelAction parallelAction = new ParallelAction(
new SequenceAction( Actions.alpha( 0 ), Actions.fadeIn( 0.25f ) ),
new SequenceAction( Actions.scaleTo( 0, 0 ), Actions.scaleTo( 1, 1, 0.25f ) ) );
contextMenu.addAction( new SequenceAction( parallelAction, Actions.removeAction( parallelAction ) ) );
this.keyboardHelper = keyboardHelper;
}