Added shadow, working on UI adapting
This commit is contained in:
parent
f61a12f874
commit
c991b5dbc1
@ -71,22 +71,24 @@
|
||||
{
|
||||
"id": "ghost_01x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"meshTextures": {
|
||||
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
|
||||
},
|
||||
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
|
||||
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
|
||||
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
|
||||
"positionX": 0.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": -6.4,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelScale": 1.0,
|
||||
"modelCorrectionRotX": -90.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
@ -95,22 +97,24 @@
|
||||
{
|
||||
"id": "ghost_02x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"meshTextures": {
|
||||
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
|
||||
},
|
||||
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
|
||||
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
|
||||
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
|
||||
"positionX": -5.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": 12.0,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelScale": 1.0,
|
||||
"modelCorrectionRotX": -90.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
@ -119,22 +123,24 @@
|
||||
{
|
||||
"id": "ghost_03x",
|
||||
"name": "Тень",
|
||||
"texturePath": "resources/w/ghost_skin002.png",
|
||||
"animationIdlePath": "resources/w/default_float001.anim",
|
||||
"animationWalkPath": "resources/w/default_float001.anim",
|
||||
"animationActionIdlePath": "resources/w/float_attack003_cut.anim",
|
||||
"animationActionAttackPath": "resources/w/float_attack003.anim",
|
||||
"animationStandToActionPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToStandPath": "resources/w/default_float001_cut.anim",
|
||||
"animationActionToDeathPath": "resources/w/default_float001_cut.anim",
|
||||
"animationDeathIdlePath": "resources/w/default_float001_cut.anim",
|
||||
"meshTextures": {
|
||||
"Shadow_NPC_Rigged": "resources/w/shadow/Shadow_BaseColor.png"
|
||||
},
|
||||
"animationIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationWalkPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionIdlePath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionAttackPath": "resources/w/shadow/shadow_attack003.txt",
|
||||
"animationStandToActionPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToStandPath": "resources/w/shadow/shadow_idle003.txt",
|
||||
"animationActionToDeathPath": "resources/w/shadow/shadow_die003.txt",
|
||||
"animationDeathIdlePath": "resources/w/shadow/shadow_dead003.txt",
|
||||
"positionX": 5.0,
|
||||
"positionY": 0.0,
|
||||
"positionZ": 12.0,
|
||||
"walkSpeed": 1.5,
|
||||
"rotationSpeed": 8.0,
|
||||
"modelScale": 0.01,
|
||||
"modelCorrectionRotX": 0.0,
|
||||
"modelScale": 1.0,
|
||||
"modelCorrectionRotX": -90.0,
|
||||
"modelCorrectionRotY": 180.0,
|
||||
"modelCorrectionRotZ": 0.0,
|
||||
"hp": 35,
|
||||
|
||||
BIN
resources/w/shadow/Shadow_BaseColor.png
(Stored with Git LFS)
Normal file
BIN
resources/w/shadow/Shadow_BaseColor.png
(Stored with Git LFS)
Normal file
Binary file not shown.
97498
resources/w/shadow/shadow_attack003.txt
Normal file
97498
resources/w/shadow/shadow_attack003.txt
Normal file
File diff suppressed because it is too large
Load Diff
84993
resources/w/shadow/shadow_dead003.txt
Normal file
84993
resources/w/shadow/shadow_dead003.txt
Normal file
File diff suppressed because it is too large
Load Diff
103293
resources/w/shadow/shadow_die003.txt
Normal file
103293
resources/w/shadow/shadow_die003.txt
Normal file
File diff suppressed because it is too large
Load Diff
99938
resources/w/shadow/shadow_idle003.txt
Normal file
99938
resources/w/shadow/shadow_idle003.txt
Normal file
File diff suppressed because it is too large
Load Diff
27
resources/w/ui/hud_skip.json
Normal file
27
resources/w/ui/hud_skip.json
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"root": {
|
||||
"type": "FrameLayout",
|
||||
"name": "hud_root",
|
||||
"width": "match_parent",
|
||||
"height": "match_parent",
|
||||
"children": [
|
||||
{
|
||||
"type": "Button",
|
||||
"name": "skipButton",
|
||||
"horizontal_gravity": "right",
|
||||
"vertical_gravity": "top",
|
||||
"x": -23,
|
||||
"y": -35,
|
||||
"width": 200,
|
||||
"height": 200,
|
||||
"clickZoneWidth": 176,
|
||||
"clickZoneHeight": 176,
|
||||
"textures": {
|
||||
"normal": "resources/w/ui/img/RedClose001_State=Default001.png",
|
||||
"hover": "resources/w/ui/img/RedClose001_State=Selected001.png",
|
||||
"pressed": "resources/w/ui/img/RedClose001_State=Tap001.png"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -653,7 +653,7 @@ namespace ZL
|
||||
Environment::width = event.window.data1;
|
||||
Environment::height = event.window.data2;
|
||||
Environment::computeProjectionDimensions();
|
||||
//menuManager.uiManager.updateAllLayouts();
|
||||
menuManager.uiManager.updateAllLayouts();
|
||||
std::cout << "Window resized: " << Environment::width << "x" << Environment::height << std::endl;
|
||||
|
||||
//space.clearTextRendererCache();
|
||||
|
||||
@ -2161,16 +2161,28 @@ namespace ZL {
|
||||
node->name = nodeName;
|
||||
node->width = bubble->computeWidth();
|
||||
node->height = bubble->computeHeight();
|
||||
node->localX = 430.0f;
|
||||
|
||||
if (incoming) {
|
||||
node->localX = -node->width * 0.5+110 - (UiChatBubble::MAX_WIDTH - node->width);// +(425.f - node->width);
|
||||
}
|
||||
else
|
||||
{
|
||||
node->localX = node->width * 0.5-110 - (UiChatBubble::MAX_WIDTH - node->width);// -(425.f - node->width);
|
||||
}
|
||||
//430
|
||||
//1280
|
||||
|
||||
node->localY = 0.0f;
|
||||
node->visible = true;
|
||||
node->chatBubble = bubble;
|
||||
|
||||
node->layoutSettings.hGravity = HorizontalGravity::Center;
|
||||
/*
|
||||
if (incoming) {
|
||||
node->layoutSettings.hGravity = HorizontalGravity::Left;
|
||||
} else {
|
||||
node->layoutSettings.hGravity = HorizontalGravity::Right;
|
||||
}
|
||||
}*/
|
||||
// Bottom gravity means localY is used as-is for screenRect.y (no parentH transform).
|
||||
// The original static chat nodes all had "vertical_gravity": "bottom" for the same reason.
|
||||
node->layoutSettings.vGravity = VerticalGravity::Bottom;
|
||||
|
||||
12
src/main.cpp
12
src/main.cpp
@ -259,7 +259,7 @@ int main(int argc, char *argv[]) {
|
||||
}*/
|
||||
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_FULLSCREEN_DESKTOP;
|
||||
#else
|
||||
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN;
|
||||
const Uint32 windowFlags = SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI;
|
||||
#endif
|
||||
|
||||
ZL::Environment::window = SDL_CreateWindow(
|
||||
@ -272,6 +272,16 @@ int main(int argc, char *argv[]) {
|
||||
SDL_GLContext ctx = SDL_GL_CreateContext(ZL::Environment::window);
|
||||
SDL_GL_MakeCurrent(ZL::Environment::window, ctx);
|
||||
|
||||
// On HiDPI displays the drawable (physical) size is larger than the
|
||||
// logical window size. Use the drawable size so the GL framebuffer
|
||||
// covers every physical pixel and the image stays sharp.
|
||||
{
|
||||
int drawW, drawH;
|
||||
SDL_GL_GetDrawableSize(ZL::Environment::window, &drawW, &drawH);
|
||||
ZL::Environment::width = drawW;
|
||||
ZL::Environment::height = drawH;
|
||||
}
|
||||
|
||||
game.setup();
|
||||
|
||||
while (!game.shouldExit()) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user