Package com.prineside.tdi2.managers
Class UiManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.UiManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
,Manager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Слои, от нижнему к высшему.static class
static interface
static class
Nested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptioncom.badlogic.gdx.graphics.g2d.ParticleEffectPool
com.badlogic.gdx.scenes.scene2d.utils.Drawable[][]
com.badlogic.gdx.scenes.scene2d.utils.Drawable[]
final com.badlogic.gdx.utils.Array<UiManager.UiLayer>[]
final com.badlogic.gdx.scenes.scene2d.Group[]
final com.badlogic.gdx.scenes.scene2d.Stage
final com.badlogic.gdx.utils.viewport.ScreenViewport
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddHighlight
(com.badlogic.gdx.scenes.scene2d.Actor forActor) addLayer
(UiManager.MainUiLayer mainLayer, int zIndex, String name) Создает новый слой в глобальном mainLayeraddLayer
(UiManager.MainUiLayer mainLayer, int zIndex, String name, boolean ignoreSafeMargin) void
dispose()
Releases all resources of this object.<T extends UiManager.UiComponent>
voiddisposeComponent
(Class<T> type) void
dumpActorsHierarchy
(com.badlogic.gdx.scenes.scene2d.Group actor, int tabSize) com.badlogic.gdx.scenes.scene2d.Actor
void
Вызывается в Lua<T extends UiManager.UiComponent>
TgetComponent
(Class<T> type) float
int
Real PXvoid
getTextInput
(com.badlogic.gdx.Input.TextInputListener listener, String title, String text, String hint) void
<T extends UiManager.UiComponent>
booleanisComponentInit
(Class<T> type) void
postRender
(float deltaTime) Вызывается после отрисовки и обновления экранаvoid
preRender
(float deltaTime) Вызывается перед любыми обновлениями и отрисовками экранов и системvoid
Сортирует и меняет порядок table слоев в соответствии с zIndexvoid
void
removeHighlight
(HighlightActor highlightActor) void
removeLayer
(UiManager.UiLayer layer) Ищет и убирает слой из всех основных слоевvoid
Установить stage единственным обработчиком ввода.void
setLogTouchDownsEnabled
(boolean enabled) void
setup()
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращатьсяMethods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, test
-
Field Details
-
viewport
public final com.badlogic.gdx.utils.viewport.ScreenViewport viewport -
stage
public final com.badlogic.gdx.scenes.scene2d.Stage stage -
layers
-
mainLayerGroups
public final com.badlogic.gdx.scenes.scene2d.Group[] mainLayerGroups -
itemCellFlashParticles
public com.badlogic.gdx.graphics.g2d.ParticleEffectPool itemCellFlashParticles -
itemCellRarityCoats
public com.badlogic.gdx.scenes.scene2d.utils.Drawable[][] itemCellRarityCoats -
itemCellShapes
public com.badlogic.gdx.scenes.scene2d.utils.Drawable[] itemCellShapes
-
-
Constructor Details
-
UiManager
public UiManager()
-
-
Method Details
-
getComponent
-
isComponentInit
-
disposeComponent
-
getTextInput
-
setLogTouchDownsEnabled
public void setLogTouchDownsEnabled(boolean enabled) -
hideAllComponents
public void hideAllComponents() -
setup
public void setup()Description copied from interface:Manager
Вызывается, когда объекты всех менеджеров созданы и можно к ним обращаться- Specified by:
setup
in interfaceManager
- Overrides:
setup
in classManager.ManagerAdapter
-
findDuplicateActorNames
public void findDuplicateActorNames()Вызывается в Lua -
findActor
-
dumpActorsHierarchy
public void dumpActorsHierarchy(com.badlogic.gdx.scenes.scene2d.Group actor, int tabSize) -
setAsInputHandler
public void setAsInputHandler()Установить stage единственным обработчиком ввода. -
addLayer
Создает новый слой в глобальном mainLayer- Parameters:
mainLayer
- основной слойzIndex
- высота слоя внутри основного слоя, чем больше, тем выше. В отличии от Actor#setZIndex(), не просто сортирует массив children, а сохраняет Z-индекс и учитывает всегда. Может быть любым значением.- Returns:
- таблица stage2d, размеры которой всегда соответствуют размерам экрана
-
addLayer
public UiManager.UiLayer addLayer(UiManager.MainUiLayer mainLayer, int zIndex, String name, boolean ignoreSafeMargin) -
removeLayer
Ищет и убирает слой из всех основных слоев -
getScreenSafeMargin
public int getScreenSafeMargin()Real PX -
getRegularLayerWidth
public float getRegularLayerWidth() -
rebuildLayers
public void rebuildLayers()Сортирует и меняет порядок table слоев в соответствии с zIndex -
preRender
public void preRender(float deltaTime) Description copied from interface:Manager
Вызывается перед любыми обновлениями и отрисовками экранов и систем- Specified by:
preRender
in interfaceManager
- Overrides:
preRender
in classManager.ManagerAdapter
-
postRender
public void postRender(float deltaTime) Description copied from interface:Manager
Вызывается после отрисовки и обновления экрана- Specified by:
postRender
in interfaceManager
- Overrides:
postRender
in classManager.ManagerAdapter
-
addHighlight
-
removeHighlight
-
removeAllHighlights
public void removeAllHighlights() -
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.Disposable
Releases all resources of this object.- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
- Overrides:
dispose
in classManager.ManagerAdapter
-