This commit is contained in:
gskbladez 2021-08-14 15:50:01 -04:00
commit d32447cd99
2 changed files with 22 additions and 1 deletions

View File

@ -53,7 +53,7 @@ local drawFooter = function ()
gfx.FontSize(20) gfx.FontSize(20)
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP) gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_TOP)
gfx.FillColor(255, 255, 255, 255); gfx.FillColor(255, 255, 255, 255);
gfx.Text('EXPERIMENTALGEAR 0.1.0 - CLOSED BETA. DO. NOT. LEAK.', 8, 1895); gfx.Text('EXPERIMENTALGEAR 0.1.1 - CLOSED BETA. DO. NOT. LEAK.', 8, 1895);
end end
local progressTransitions = function () local progressTransitions = function ()

View File

@ -64,8 +64,10 @@ draw_button = function(button, x, y, selected, index)
if (selected) then if (selected) then
-- Draw button background -- Draw button background
gfx.BeginPath();
gfx.ImageRect(x, y+(196/2 * (1-scrollTransitionScale)), 505, 196*scrollTransitionScale, selectedButtonBgImage, 1, 0); gfx.ImageRect(x, y+(196/2 * (1-scrollTransitionScale)), 505, 196*scrollTransitionScale, selectedButtonBgImage, 1, 0);
-- Draw button main label -- Draw button main label
gfx.BeginPath();
gfx.ImageRect(x + 256 - (labelWidth/2), (y+58)+(64/2 * (1-scrollTransitionScale)), labelWidth, 64*scrollTransitionScale, labelImage, 1, 0); gfx.ImageRect(x + 256 - (labelWidth/2), (y+58)+(64/2 * (1-scrollTransitionScale)), labelWidth, 64*scrollTransitionScale, labelImage, 1, 0);
-- Draw description -- Draw description
@ -73,10 +75,12 @@ draw_button = function(button, x, y, selected, index)
gfx.GlobalAlpha((scrollTransitionScale - 0.8) * 5) gfx.GlobalAlpha((scrollTransitionScale - 0.8) * 5)
gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE) gfx.TextAlign(gfx.TEXT_ALIGN_CENTER + gfx.TEXT_ALIGN_MIDDLE)
gfx.FontSize(40); gfx.FontSize(40);
gfx.BeginPath();
gfx.Text(descriptionText, x+256, y+28); gfx.Text(descriptionText, x+256, y+28);
gfx.GlobalAlpha(1) gfx.GlobalAlpha(1)
-- Draw the glow overlay -- Draw the glow overlay
gfx.BeginPath();
gfx.ImageRect(x+2, (y-42)+(277/2 * (1-scrollTransitionScale)), 501, 277*scrollTransitionScale, selectedButtonOverImage, 1, 0); gfx.ImageRect(x+2, (y-42)+(277/2 * (1-scrollTransitionScale)), 501, 277*scrollTransitionScale, selectedButtonOverImage, 1, 0);
else else
if scrollingUp then if scrollingUp then
@ -95,13 +99,16 @@ draw_button = function(button, x, y, selected, index)
end end
end end
-- Draw button background -- Draw button background
gfx.BeginPath();
gfx.ImageRect(x, y + buttonsMovementScale*buttonHeight, 1026 / 2, 257 / 2, unselectedButtonImage, 1, 0); gfx.ImageRect(x, y + buttonsMovementScale*buttonHeight, 1026 / 2, 257 / 2, unselectedButtonImage, 1, 0);
-- Draw button main label -- Draw button main label
gfx.BeginPath();
gfx.ImageRect(x+64, y+28 + buttonsMovementScale*buttonHeight, labelWidth, 64, labelImage, 1, 0); gfx.ImageRect(x+64, y+28 + buttonsMovementScale*buttonHeight, labelWidth, 64, labelImage, 1, 0);
-- Draw description -- Draw description
gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE) gfx.TextAlign(gfx.TEXT_ALIGN_LEFT + gfx.TEXT_ALIGN_MIDDLE)
gfx.FontSize(28); gfx.FontSize(28);
gfx.BeginPath();
gfx.Text(descriptionText, x+64, y+18 + buttonsMovementScale*buttonHeight); gfx.Text(descriptionText, x+64, y+18 + buttonsMovementScale*buttonHeight);
gfx.GlobalAlpha(1) gfx.GlobalAlpha(1)
@ -167,8 +174,10 @@ end;
function drawTexts() function drawTexts()
currentFullDescriptionText = buttons[cursorIndex][5]; currentFullDescriptionText = buttons[cursorIndex][5];
gfx.BeginPath();
gfx.UpdateLabel(selectorDescriptionLabel, currentFullDescriptionText, 22) gfx.UpdateLabel(selectorDescriptionLabel, currentFullDescriptionText, 22)
gfx.BeginPath();
gfx.UpdateLabel(selectorLegendScrollLabel, 'DEBUG: ' .. buttonsMovementScale, 20); gfx.UpdateLabel(selectorLegendScrollLabel, 'DEBUG: ' .. buttonsMovementScale, 20);
-- descriptionAlpha = math.abs(selectedButtonScaleY - 0.5) * 2; -- descriptionAlpha = math.abs(selectedButtonScaleY - 0.5) * 2;
@ -176,13 +185,19 @@ function drawTexts()
-- Description -- Description
gfx.FillColor(255,255,255,math.floor(scrollTransitionScale*255)); gfx.FillColor(255,255,255,math.floor(scrollTransitionScale*255));
gfx.BeginPath();
gfx.DrawLabel(selectorDescriptionLabel, 64, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - 52); gfx.DrawLabel(selectorDescriptionLabel, 64, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - 52);
-- Legend on the selector -- Legend on the selector
gfx.FillColor(217,177,126); gfx.FillColor(217,177,126);
gfx.BeginPath();
gfx.DrawLabel(selectorLegendScrollLabel, 118, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER + 56); gfx.DrawLabel(selectorLegendScrollLabel, 118, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER + 56);
gfx.BeginPath();
gfx.DrawLabel(selectorLegendSelectLabel, 360, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER + 56); gfx.DrawLabel(selectorLegendSelectLabel, 360, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER + 56);
gfx.FillColor(255,255,255); gfx.FillColor(255,255,255);
end; end;
@ -257,6 +272,7 @@ render = function(deltaTime)
gfx.Scale(scale, scale); gfx.Scale(scale, scale);
-- Draw background -- Draw background
gfx.BeginPath();
gfx.ImageRect(0, 0, desw, desh, bgImage, 1, 0); gfx.ImageRect(0, 0, desw, desh, bgImage, 1, 0);
local idolAnimTickRes = gfx.TickAnimation(idolAnimation, deltaTime); local idolAnimTickRes = gfx.TickAnimation(idolAnimation, deltaTime);
@ -268,11 +284,13 @@ render = function(deltaTime)
idolAnimTransitionScale = 1; idolAnimTransitionScale = 1;
end end
gfx.BeginPath();
gfx.ImageRect(0, 0, desw, desh, idolAnimation, 1, 0); gfx.ImageRect(0, 0, desw, desh, idolAnimation, 1, 0);
gfx.GlobalAlpha(1); gfx.GlobalAlpha(1);
end end
-- Draw selector background -- Draw selector background
gfx.BeginPath();
gfx.ImageRect(0, (desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER) - 280/2, 1079, 280, selectorBgImage, 1, 0); gfx.ImageRect(0, (desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER) - 280/2, 1079, 280, selectorBgImage, 1, 0);
setButtons() setButtons()
@ -283,6 +301,7 @@ render = function(deltaTime)
drawTexts(); drawTexts();
-- Draw the arrows around the selected button -- Draw the arrows around the selected button
gfx.BeginPath();
gfx.ImageRect(desw-512, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - buttonHeight - 8, 501, 300, selectorArrowsImage, 1, 0); gfx.ImageRect(desw-512, desh/2 + SELECTOR_BAR_OFFSET_FROM_CENTER - buttonHeight - 8, 501, 300, selectorArrowsImage, 1, 0);
-- Draw top and bottom bars -- Draw top and bottom bars
@ -300,6 +319,8 @@ render = function(deltaTime)
else else
buttonsMovementScale = -1+scrollTransitionScale buttonsMovementScale = -1+scrollTransitionScale
end; end;
gfx.BeginPath();
end; end;
mouse_pressed = function(button) mouse_pressed = function(button)