diff --git a/assets/bottom_frame_fragment.png b/assets/bottom_frame_fragment.png deleted file mode 100755 index 527c30a..0000000 Binary files a/assets/bottom_frame_fragment.png and /dev/null differ diff --git a/assets/gui_alex.json b/assets/gui_alex.json new file mode 100755 index 0000000..51c9245 --- /dev/null +++ b/assets/gui_alex.json @@ -0,0 +1,29 @@ +{ + "widgets": [{ + "type": "FrameLayout", + "name": "levelLayout", + "background": "#00000000", + "width": "match_parent", + "height": "match_parent", + "horizontalAlignment": "HA_CENTER", + "verticalAlignment": "VA_CENTER", + "children": [{ + "type": "HorizontalLinearLayout", + "name": "topPannel", + "background": "#000000ff", + "marginBottom": 300, + "width": "wrap_content", + "height": "wrap_content", + "itemSpacing": 1, + "children": [{ + "type": "Button", + "name": "backButton", + "width": 60, + "height": 40, + "background": "showBothModesButton_normal.png", + "pressedDrawable": "showBothModesButton_pressed.png", + "hoverDrawable": "showBothModesButton_selected.png" + }] + }] + }] +} \ No newline at end of file diff --git a/assets/left_frame_fragment.png b/assets/left_frame_fragment.png deleted file mode 100755 index e2714f6..0000000 Binary files a/assets/left_frame_fragment.png and /dev/null differ diff --git a/assets/right_frame_fragment.png b/assets/right_frame_fragment.png deleted file mode 100755 index 765e4f4..0000000 Binary files a/assets/right_frame_fragment.png and /dev/null differ diff --git a/assets/top_frame_fragment.png b/assets/top_frame_fragment.png deleted file mode 100755 index 33f8cd4..0000000 Binary files a/assets/top_frame_fragment.png and /dev/null differ diff --git a/assets/wall_bonus_mod2.png b/assets/wall_bonus_mod2.png new file mode 100755 index 0000000..cc50367 Binary files /dev/null and b/assets/wall_bonus_mod2.png differ diff --git a/assets/wall_left_mod2.png b/assets/wall_left_mod2.png new file mode 100755 index 0000000..079ef86 Binary files /dev/null and b/assets/wall_left_mod2.png differ diff --git a/assets/wall_right_mod2.png b/assets/wall_right_mod2.png new file mode 100755 index 0000000..1371a80 Binary files /dev/null and b/assets/wall_right_mod2.png differ diff --git a/assets/wall_up_mod2.png b/assets/wall_up_mod2.png new file mode 100755 index 0000000..d46c8d2 Binary files /dev/null and b/assets/wall_up_mod2.png differ diff --git a/game/gamecode.cpp b/game/gamecode.cpp index 80f7a9c..eb1e6b2 100644 --- a/game/gamecode.cpp +++ b/game/gamecode.cpp @@ -868,12 +868,12 @@ void TGameLevel::Draw() Renderer->DrawRect(wallUpPos1, wallUpPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); const Vector2f wallLeftPos1(xlOffset, lrFBO+ylOffset); - const Vector2f wallLeftPos2(lWTW + xlOffset, tSH-ylOffset-uWTW); + const Vector2f wallLeftPos2(lWTW + xlOffset, tSH-ylOffset-(uWTW*0.8f)); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_LEFT_TEXTURE]); Renderer->DrawRect(wallLeftPos1, wallLeftPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); const Vector2f wallRightPos1(tSW+xlOffset-rWTW, lrFBO+ylOffset); - const Vector2f wallRightPos2(tSW + xlOffset, tSH-ylOffset-uWTW); + const Vector2f wallRightPos2(tSW + xlOffset, tSH-ylOffset-(uWTW*0.8f)); glBindTexture(GL_TEXTURE_2D,ResourceManager->TexList[CONST_WALL_RIGHT_TEXTURE]); Renderer->DrawRect(wallRightPos1, wallRightPos2, Vector2f(0.f, 0.f), Vector2f(1.f, 1.f)); diff --git a/game/main_code.cpp b/game/main_code.cpp index c643d1b..bd83183 100644 --- a/game/main_code.cpp +++ b/game/main_code.cpp @@ -33,17 +33,11 @@ const std::string CONST_BALLGLOW_TEXTURE = "ball_glow"; const std::string CONST_REFLECTOR_TEXTURE = "reflector_mod1"; -const std::string CONST_WALL_LEFT_TEXTURE = "wall_left_mod1"; -const std::string CONST_WALL_RIGHT_TEXTURE = "wall_right_mod1"; -const std::string CONST_WALL_UP_TEXTURE = "wall_up_mod1"; -//const std::string CONST_WALL_BONUS_TEXTURE = "wall_bonus"; +const std::string CONST_WALL_LEFT_TEXTURE = "wall_left_mod2"; +const std::string CONST_WALL_RIGHT_TEXTURE = "wall_right_mod2"; +const std::string CONST_WALL_UP_TEXTURE = "wall_up_mod2"; -/* -const std::string CONST_WALL_LEFT_TEXTURE = "left_frame_fragment"; -const std::string CONST_WALL_RIGHT_TEXTURE = "right_frame_fragment"; -const std::string CONST_WALL_UP_TEXTURE = "top_frame_fragment"; -*/ -const std::string CONST_WALL_BONUS_TEXTURE = "bottom_frame_fragment"; +const std::string CONST_WALL_BONUS_TEXTURE = "wall_bonus_mod2"; const std::string CONST_BACK_BTN_TEXTURE = "back_btn"; const std::string CONST_SLIDE_UP_BTN_TEXTURE = "slide_up_btn"; @@ -117,7 +111,10 @@ void TMyApplication::InnerInit() Application->SetGameLevelScreenScale(); //GameLevel.SetLevelScale(); EffectsInit(); - + /* + ResourceManager->newGuiManager.LoadFromConfig("gui_alex.json"); + SetButtonsAction(); + */ } void TMyApplication::InnerDeinit() @@ -639,4 +636,13 @@ void TMyApplication::hitSpark(std::string direct,Vector2f Pos) { void TMyApplication::fireworkEffect() { lvlFirework.stopSpawn(); lvlFirework.startSpawn(); +} + +void TMyApplication::SetButtonsAction () { + auto backBtn = ResourceManager->newGuiManager.findWidgetByName("backButton"); + if (backBtn) { + backBtn->onMouseUpSignal.connect([this, backBtn](Vector2f pos, int touchNumber) { + + }); + } } \ No newline at end of file diff --git a/game/main_code.h b/game/main_code.h index cacab24..4c466dd 100644 --- a/game/main_code.h +++ b/game/main_code.h @@ -173,6 +173,8 @@ public: float GetGameLevelScreenWidth(); float GetGameLevelScreenHeight(); void SetGameLevelScreenScale(); + + void SetButtonsAction(); };