-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Customize gameplay overhaul/update (#349)
tldr: * refactored/reorganized code so wifejudgmentspotting is sane again * added borders to moveable stuffs * added mouse control for moving elements to the borders * active element is now a toggle instead of a hold down * added support for leaderboard/replay buttons commits: * Add customization to the Leaderboard Includes x, y, height, width and spacing between entries. * Add customization to the replay buttons * proof of concept element border * Add border to the miniprogressbar in customize gameplay * add basic xy movement functionality with mouse * fix mouse clicks not toggling text properly * allow directly toggling from one element to another with kb also fix potential nil bools oops * add wrapper function for updating property text and fix update conditions for keyboard adjustments * tone down opacity on active borders * fix mouse not being able to select a button if keyboard toggled off * first try at having border update to zoom without distorting * add border to display percent * diffuse borders slightly even if nothing is active * add border to judgecounter * add border to full progress bar * add wrapper for adjusting aligned text to borders * fiddle with display percent border/bg positioning * add borders to target tracker * remove buffer on miniprogressbar borders if we do this it should be standardized in some way * round mouse pos when moving things around * remove unused values * update textborder alignment function * adjustments to xy have to be made equally if customization is on or off this could be a point of confusion in the future * update default gameplay elements positions to reflect coord refactoring * set noborder on fullprogressbar so it doesnt update incorrectly * update explanatory text to reflect toggle/mouse changes * Try to centralize the customize gameplay into a single file * Make the movable values global for customize gameplay * Move everything else missing to the centralized customize gameplay * we have to always call setbordersfortext if we dont' there will be a position mismatch between customize gameplay position and regular gameplay this is because setbordersfortext originally moved the borders only, but i changed it to move the text instead in order to keep the elmeent centered while moving it with the mouse yes i know this is bad and should be handled differently but the use case is limited at the moment an di need time to figure out a better way to handle this * added manual offsets for judgment since its center relative and valigned * fix border reacting to zoom on judgment * add border to combo * fix border xy/spacing for leaderboards (zoom not done) * reset active customize element when entering gameplay * fix borders for nps display * Fix border zoom for leaderboards * fix nps graph border * Fix the check for moving the leaderboards border * fix borders for replay buttons (disabled zoom) zoom desyncs the buttons from their rollovers * strong alpha helper message when moused over
- Loading branch information
1 parent
8c0c084
commit 5321555
Showing
14 changed files
with
1,416 additions
and
1,050 deletions.
There are no files selected for viewing
768 changes: 186 additions & 582 deletions
768
Themes/Til Death/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
Themes/Til Death/BGAnimations/ScreenGameplay overlay/messagebox.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
local settext = BitmapText.settext | ||
|
||
local function highlight(self) | ||
self:queuecommand("Highlight") | ||
end | ||
|
||
local function highlightIfOver(self) | ||
if isOver(self) then | ||
self:diffusealpha(0.2) | ||
else | ||
self:diffusealpha(1) | ||
end | ||
end | ||
|
||
return Def.ActorFrame { | ||
OnCommand = function(self) | ||
SCREENMAN:GetTopScreen():AddInputCallback(MovableInput) | ||
self:SetUpdateFunction(highlight) | ||
end, | ||
Def.BitmapText { | ||
Name = "message", | ||
Font = "Common Normal", | ||
InitCommand = function(self) | ||
Movable.message = self | ||
self:horizalign(left):vertalign(top):shadowlength(2):xy(10, 20):zoom(.5):visible(false) | ||
end | ||
}, | ||
Def.BitmapText { | ||
Name = "Instructions", | ||
Font = "Common Normal", | ||
InitCommand = function(self) | ||
self:horizalign(left):vertalign(top):xy(SCREEN_WIDTH - 240, 20):zoom(.5):visible(true) | ||
end, | ||
HighlightCommand = function(self) | ||
highlightIfOver(self) | ||
end, | ||
OnCommand = function(self) | ||
local text = { | ||
"Enable AutoplayCPU with shift+f8\n", | ||
"Press keys to toggle active elements", | ||
"Right click cancels any active element\n", | ||
"1: Judgement Text Position", | ||
"2: Judgement Text Size", | ||
"3: Combo Text Position", | ||
"4: Combo Text Size", | ||
"5: Error Bar Text Position", | ||
"6: Error Bar Text Size", | ||
"7: Target Tracker Text Position", | ||
"8: Target Tracker Text Size", | ||
"9: Full Progress Bar Position", | ||
"0: Full Progress Bar Size", | ||
"q: Mini Progress Bar Position", | ||
"w: Display Percent Text Position", | ||
"e: Display Percent Text Size", | ||
"r: Notefield Position", | ||
"t: Notefield Size", | ||
"y: NPS Display Text Position", | ||
"u: NPS Display Text Size", | ||
"i: NPS Graph Position", | ||
"o: NPS Graph Size", | ||
"p: Judge Counter Position", | ||
"a: Leaderboard Position", | ||
"s: Leaderboard Size", | ||
"d: Leaderboard Spacing", | ||
"f: Replay Buttons Position", | ||
--"g: Replay Buttons Size", | ||
"h: Replay Buttons Spacing" | ||
} | ||
if playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).LaneCover ~= 0 then | ||
table.insert(text, "/: Lane Cover Height") | ||
end | ||
self:settext(table.concat(text, "\n")) | ||
end | ||
} | ||
} |
Oops, something went wrong.