Skip to content

Commit

Permalink
Merge pull request #26 from poco0317/master
Browse files Browse the repository at this point in the history
Prepare for v2.2.3 release - Compatibility with Etterna 0.68.1
  • Loading branch information
poco0317 authored Feb 25, 2020
2 parents c76a663 + 9bb629e commit cce07b2
Show file tree
Hide file tree
Showing 16 changed files with 837 additions and 374 deletions.
758 changes: 651 additions & 107 deletions BGAnimations/ScreenColorEdit overlay.lua

Large diffs are not rendered by default.

24 changes: 17 additions & 7 deletions BGAnimations/ScreenEvaluation decorations/default.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local frameY = 150
local frameWidth = SCREEN_CENTER_X-WideScale(get43size(40),40)
local frameHeight = 300
local rate = getCurRate()
local judge = GetTimingDifficulty()
local judge = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
local offsetIndex

-- Reset preview music starting point since song was finished.
Expand All @@ -30,6 +30,7 @@ local showScoreboardOnSimple = themeConfig:get_data().global.ShowScoreboardOnSim
local offsetY2 = 0
local offsetWidth2 = 0
local offsetHeight2 = 0
local offsetisLocal

local function scroller(event)
if event.type == "InputEventType_FirstPress" then
Expand Down Expand Up @@ -96,7 +97,7 @@ local function oldEvalStuff()
rescoredPercentage = getRescoredWifeJudge(dvt, judge, totalHolds - holdsHit, minesHit, totalTaps)
end
if params.Name == "ResetJudge" then
judge = enabledCustomWindows and 0 or GetTimingDifficulty()
judge = enabledCustomWindows and 0 or (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
self:GetParent():playcommand("ResetJudge")
elseif params.Name ~= "ToggleHands" then
self:GetParent():playcommand("SetJudge", params)
Expand Down Expand Up @@ -687,10 +688,15 @@ local function oldEvalStuff()
self:playcommand("Set")
end,
SetCommand = function(self)
self:settext(THEME:GetString("ScreenEvaluation","CategoryClearType"))
if PREFSMAN:GetPreference("SortBySSRNormPercent") then
self:settextf("%s (J4)", THEME:GetString("ScreenEvaluation", "CategoryClearType"))
else
self:settext(THEME:GetString("ScreenEvaluation","CategoryClearType"))
end
end,
SetJudgeCommand = function(self)
self:settextf("%s (J%d)", THEME:GetString("ScreenEvaluation", "CategoryClearType"), GetTimingDifficulty())
local jdg = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
self:settextf("%s (J%d)", THEME:GetString("ScreenEvaluation", "CategoryClearType"), jdg)
end,
ResetJudgeCommand = function(self)
self:playcommand("Set")
Expand Down Expand Up @@ -767,10 +773,15 @@ local function oldEvalStuff()
self:playcommand("Set")
end,
SetCommand = function(self)
self:settextf("%s - %s",THEME:GetString("ScreenEvaluation","CategoryScore"),getScoreTypeText(1))
if PREFSMAN:GetPreference("SortBySSRNormPercent") then
self:settextf("%s - %s J4", THEME:GetString("ScreenEvaluation","CategoryScore"), getScoreTypeText(1))
else
self:settextf("%s - %s", THEME:GetString("ScreenEvaluation","CategoryScore"), getScoreTypeText(1))
end
end,
SetJudgeCommand = function(self)
self:settextf("%s - %s J%d", THEME:GetString("ScreenEvaluation", "CategoryScore"), getScoreTypeText(1), GetTimingDifficulty())
local jdg = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
self:settextf("%s - %s J%d", THEME:GetString("ScreenEvaluation", "CategoryScore"), getScoreTypeText(1), jdg)
end,
ResetJudgeCommand = function(self)
self:playcommand("Set")
Expand Down Expand Up @@ -1280,7 +1291,6 @@ local function oldEvalStuff()

local lbActor
local offsetScoreID
local offsetisLocal
local currentCountry = "Global"
local scoresPerPage = 5
local maxPages = math.ceil(#hsTable/scoresPerPage)
Expand Down
11 changes: 10 additions & 1 deletion BGAnimations/ScreenSelectMusic overlay/currentsort.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local wheel
local song
local released = false
local goneOff = false
local instantSearch = themeConfig:get_data().global.InstantSearch

local sortTable = {
SortOrder_Preferred = 'Preferred',
Expand Down Expand Up @@ -79,6 +80,9 @@ local function searchInput(event)
MESSAGEMAN:Broadcast("EndSearch")

elseif event.button == "Start" then
if not instantSearch then
wheel:SongSearch(searchstring)
end
MESSAGEMAN:Broadcast("EndSearch")

elseif event.button == "MenuLeft" then
Expand Down Expand Up @@ -115,7 +119,11 @@ local function searchInput(event)
end
end
if lastsearchstring ~= searchstring then
wheel:SongSearch(searchstring)
if instantSearch then
wheel:SongSearch(searchstring)
else
sortText:playcommand("SetSortOrder")
end
lastsearchstring = searchstring
GHETTOGAMESTATE:setMusicSearch(searchstring)
end
Expand Down Expand Up @@ -207,6 +215,7 @@ t[#t+1] = LoadFont("Common Normal") .. {
self:zoom(0.45)
self:diffuse(color(colorConfig:get_data().main.headerFrameText))
self:maxwidth((frameWidth-40)/0.45)
sortText = self
end,
SortOrderChangedMessageCommand = function(self)
self:queuecommand("SetSortOrder")
Expand Down
11 changes: 10 additions & 1 deletion BGAnimations/ScreenSelectMusic overlay/net/currentsort.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local wheel
local song
local released = false
local goneOff = false
local instantSearch = themeConfig:get_data().global.InstantSearch

local sortTable = {
SortOrder_Preferred = 'Preferred',
Expand Down Expand Up @@ -79,6 +80,9 @@ local function searchInput(event)
MESSAGEMAN:Broadcast("EndSearch")

elseif event.button == "Start" then
if not instantSearch then
wheel:SongSearch(searchstring)
end
MESSAGEMAN:Broadcast("EndSearch")

elseif event.button == "MenuLeft" then
Expand Down Expand Up @@ -115,7 +119,11 @@ local function searchInput(event)
end
end
if lastsearchstring ~= searchstring then
wheel:SongSearch(searchstring)
if instantSearch then
wheel:SongSearch(searchstring)
else
sortText:playcommand("SetSortOrder")
end
lastsearchstring = searchstring
GHETTOGAMESTATE:setMusicSearch(searchstring)
end
Expand Down Expand Up @@ -207,6 +215,7 @@ t[#t+1] = LoadFont("Common Normal") .. {
self:zoom(0.45)
self:diffuse(color(colorConfig:get_data().main.headerFrameText))
self:maxwidth((frameWidth-40)/0.45)
sortText = self
end,
SortOrderChangedMessageCommand = function(self)
self:queuecommand("SetSortOrder")
Expand Down
6 changes: 3 additions & 3 deletions Graphics/OffsetGraph.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ local dotHeight = 2
-- shamelessly lifted straight from Til Death in Etterna .64:
local judges = {"marv", "perf", "great", "good", "boo", "miss"}
local tst = ms.JudgeScalers
local judge = GetTimingDifficulty()
local judge = (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
local tso = tst[judge]

local enabledCustomWindows = playerConfig:get_data(pn_to_profile_slot(PLAYER_1)).CustomEvaluationWindowTimings
Expand Down Expand Up @@ -95,8 +95,8 @@ local t = Def.ActorFrame{
end
end
if params.Name == "ResetJudge" then
judge = enabledCustomWindows and 0 or GetTimingDifficulty()
tso = tst[GetTimingDifficulty()]
judge = enabledCustomWindows and 0 or (PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())
tso = tst[(PREFSMAN:GetPreference("SortBySSRNormPercent") and 4 or GetTimingDifficulty())]
end
if params.Name ~= "ResetJudge" and params.Name ~= "PrevJudge" and params.Name ~= "NextJudge" and params.Name ~= "ToggleHands" then return end
maxOffset = (enabledCustomWindows and judge ~= 0) and customWindow.judgeWindows.boo or math.max(180, 180 * tso)
Expand Down
Binary file added Graphics/_thick circle (doubleres).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Graphics/color_hsv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Graphics/color_sat_overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 28 additions & 17 deletions Languages/en.ini
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ TargetTrackerMode = Target Tracker Mode
Leaderboard = Gameplay Leaderboard
LeaderboardSlots = Leaderboard Slots
AnimatedLeaderboard = Leaderboard Animations
InstantSearch=Instant Search


[OptionExplanations]
Expand Down Expand Up @@ -176,6 +177,7 @@ DisplayMean = Show your current tap mean.
TargetTracker = Toggle a tracker that shows your current difference in Wifepoints and Percent against a PB or Goal.
TargetGoal = Define a goal percentage for the Target Tracker.
TargetTrackerMode = Set the mode for the Target Tracker. Set Percent uses the goal percentage. Personal Best uses your current rate PB.
InstantSearch=Turn this on to have the Song Wheel update for every letter you put into the song search. If you lag when searching, turn this off.
[OptionTitles]
JudgeType=Judge Count
Expand Down Expand Up @@ -321,25 +323,25 @@ PacemakerCurrent=Pacemaker Current (unused)
PacemakerTarget=Pacemaker Target (unused)
ScreenFilter=Notefield Filter Color
grade=Grade
grades=Grade
Grade_Failed=Failed
Grade_None=None
Grade_Tier01=AAAA
Grade_Tier02=AAA
Grade_Tier03=AA
Grade_Tier04=A
Grade_Tier05=B
Grade_Tier06=C
Grade_Tier07=D
Grade_Tier08=Grade_Tier08
Grade_Tier09=Grade_Tier09
Grade_Tier10=Grade_Tier10
Grade_Tier11=Grade_Tier11
Grade_Tier12=Grade_Tier12
Grade_Tier13=Grade_Tier13
Grade_Tier14=Grade_Tier14
Grade_Tier15=Grade_Tier15
Grade_Tier16=Grade_Tier16
Grade_Tier01=AAAAA
Grade_Tier02=AAAA:
Grade_Tier03=AAAA.
Grade_Tier04=AAAA
Grade_Tier05=AAA:
Grade_Tier06=AAA.
Grade_Tier07=AAA
Grade_Tier08=AA:
Grade_Tier09=AA.
Grade_Tier10=AA
Grade_Tier11=A:
Grade_Tier12=A.
Grade_Tier13=A
Grade_Tier14=B
Grade_Tier15=C
Grade_Tier16=D
Grade_Tier17=Grade_Tier17
judgment=Judgments
Expand Down Expand Up @@ -403,6 +405,15 @@ ultramarathon=Ultramarathon
[ScreenColorEdit]
HeaderText=Color Config
Description=Press <Enter> to confirm a typed color. Use <Left/Right> to move the cursor\nUse <Backspace> and <Delete> to reset characters\nPress <Enter> after confirming or after clicking to save and exit\nPress <Esc> to exit without saving
AboutToSave=ABOUT TO SAVE
ManualEntry=Manual Entry
Hexadecimal=Hex
RedGreenBlueAlpha=RGBA
Saturation=Sat
Alpha=Alpha
DefaultDescription=Press <CTRL + Delete> to select the default color\nPress <ALT + Delete> to undo changes
Description1=This will change the color
Description2=Press <Left>/<Right> to move cursor, <Up>/<Down> to change value.\nPress <Start> to confirm and <Back> to exit.\nPlease reload metrics after changing colors as some colors will not update unless you do so.
Expand Down
6 changes: 3 additions & 3 deletions Scripts/00 ThemeInfo.lua
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- theme identification file

themeInfo = {
Name = "spawncamping-wallhack (etterna .67.1)",
Version = "2.2.2", -- a.b.c, a for complete overhauls, b for major releases, c for minor additions/bugfix.
Date = "20200108",
Name = "spawncamping-wallhack (etterna .68.1)",
Version = "2.2.3", -- a.b.c, a for complete overhauls, b for major releases, c for minor additions/bugfix.
Date = "20200225",
}

function getThemeName()
Expand Down
50 changes: 27 additions & 23 deletions Scripts/01 color_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -62,26 +62,26 @@ local defaultConfig = {
Freestyle = "#666666", -- gray
},

grade = {
Grade_Tier01 = "#66ccff", -- AAAA
Grade_Tier02 = "#eebb00", -- AAA
Grade_Tier03 = "#66cc66", -- AA
Grade_Tier04 = "#da5757", -- A
Grade_Tier05 = "#5b78bb", -- B
Grade_Tier06 = "#c97bff", -- C
Grade_Tier07 = "#8c6239", -- D
Grade_Tier08 = "#000000", -- ITG PLS
Grade_Tier09 = "#000000", -- ITG PLS
Grade_Tier10 = "#000000", -- ITG PLS
Grade_Tier11 = "#000000", -- ITG PLS
Grade_Tier12 = "#000000", -- ITG PLS
Grade_Tier13 = "#000000", -- ITG PLS
Grade_Tier14 = "#000000", -- ITG PLS
Grade_Tier15 = "#000000", -- ITG PLS
Grade_Tier16 = "#000000", -- ITG PLS
Grade_Tier17 = "#000000", -- ITG PLS
Grade_Failed = "#cdcdcd", -- F
Grade_None = "#666666", -- no play
grades = {
Grade_Tier01 = "#ffffff", -- AAAAA
Grade_Tier02 = "#66ccff", -- AAAA:
Grade_Tier03 = "#66ccff", -- AAAA.
Grade_Tier04 = "#66ccff", -- AAAA
Grade_Tier05 = "#eebb00", -- AAA:
Grade_Tier06 = "#eebb00", -- AAA.
Grade_Tier07 = "#eebb00", -- AAA
Grade_Tier08 = "#66cc66", -- AA:
Grade_Tier09 = "#66cc66", -- AA.
Grade_Tier10 = "#66cc66", -- AA
Grade_Tier11 = "#da5757", -- A:
Grade_Tier12 = "#da5757", -- A.
Grade_Tier13 = "#da5757", -- A
Grade_Tier14 = "#5b78bb", -- B
Grade_Tier15 = "#c97bff", -- C
Grade_Tier16 = "#8c6239", -- D
Grade_Tier17 = "#000000",
Grade_Failed = "#cdcdcd", -- F
Grade_None = "#666666" -- no play
},

judgment = { -- Colors of each Judgment types
Expand Down Expand Up @@ -184,6 +184,10 @@ function setTableKeys(table)
curColor = table
end

function getDefaultColorForCurColor()
return defaultConfig[curColor[1]][curColor[2]]
end

function getMainColor(type)
return color(colorConfig:get_data().main[type])
end
Expand All @@ -196,8 +200,8 @@ function getLeaderboardColor(type)
return color(colorConfig:get_data().leaderboard[type])
end

function getGradeColor (grade)
return color(colorConfig:get_data().grade[grade]) or color(colorConfig:get_data().grade['Grade_None'])
function getGradeColor(grade)
return color(colorConfig:get_data().grades[grade]) or color(colorConfig:get_data().grades['Grade_None'])
end

function getDifficultyColor(diff)
Expand Down Expand Up @@ -340,7 +344,7 @@ end

-- i guess if i'm going to use this naming convention it might as well be complete and standardized which means redundancy -mina
function byGrade(grade)
return color(colorConfig:get_data().grade[grade]) or color(colorConfig:get_data().grade["Grade_None"])
return color(colorConfig:get_data().grades[grade]) or color(colorConfig:get_data().grades["Grade_None"])
end

-- Colorized stuff
Expand Down
3 changes: 2 additions & 1 deletion Scripts/01 theme_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ local defaultConfig = {
EvalScoreboard = true,
SimpleEval = true, -- false means use classic eval
ShowScoreboardOnSimple = false,
PlayerInfoType = true -- true is full, false is minimal (lifebar only)
PlayerInfoType = true, -- true is full, false is minimal (lifebar only)
InstantSearch = true, -- true = search per press, false = search on enter button
},
NPSDisplay = {
DynamicWindow = false, -- unused
Expand Down
32 changes: 32 additions & 0 deletions Scripts/02 ThemePrefs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,38 @@ function SimpleEval()
return t
end

function InstantSearch()
local t = {
Name = "InstantSearch",
LayoutType = "ShowAllInRow",
SelectType = "SelectOne",
OneChoiceForAllPlayers = true,
ExportOnChange = true,
Choices = {THEME:GetString("OptionNames", "Off"), THEME:GetString("OptionNames", "On")},
LoadSelections = function(self, list, pn)
local pref = themeConfig:get_data().global.InstantSearch
if pref then
list[2] = true
else
list[1] = true
end
end,
SaveSelections = function(self, list, pn)
local value
if list[1] then
value = false
else
value = true
end
themeConfig:get_data().global.InstantSearch = value
themeConfig:set_dirty()
themeConfig:save()
end
}
setmetatable(t, t)
return t
end

function ShowScoreboardOnSimple()
local t = {
Name = "ShowScoreboardOnSimple",
Expand Down
Loading

0 comments on commit cce07b2

Please sign in to comment.