some new textures + UI test
Before Width: | Height: | Size: 44 KiB |
29
assets/gui_alex.json
Executable file
@ -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"
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}
|
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 5.6 KiB |
BIN
assets/wall_bonus_mod2.png
Executable file
After Width: | Height: | Size: 31 KiB |
BIN
assets/wall_left_mod2.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
assets/wall_right_mod2.png
Executable file
After Width: | Height: | Size: 16 KiB |
BIN
assets/wall_up_mod2.png
Executable file
After Width: | Height: | Size: 46 KiB |
@ -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));
|
||||
|
||||
|
@ -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()
|
||||
@ -640,3 +637,12 @@ 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) {
|
||||
|
||||
});
|
||||
}
|
||||
}
|
@ -173,6 +173,8 @@ public:
|
||||
float GetGameLevelScreenWidth();
|
||||
float GetGameLevelScreenHeight();
|
||||
void SetGameLevelScreenScale();
|
||||
|
||||
void SetButtonsAction();
|
||||
};
|
||||
|
||||
|
||||
|