Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C;CLCC config menu UI #81

Draft
wants to merge 34 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ab2d21a
Added all sprites to cclcc optionsmenu profile
PringlesGang Oct 16, 2024
87508b0
Moved config slider profile settings to derived classes
PringlesGang Oct 17, 2024
5cff4c1
Added cclcc config sprites to cpp profile
PringlesGang Oct 17, 2024
d7204db
Added positioning info to cclcc options profile
PringlesGang Oct 17, 2024
6de0a3c
Implemented static cclcc config ui mockup
PringlesGang Oct 17, 2024
b62f748
Implemented pages and binary buttons
PringlesGang Oct 20, 2024
bb06bf2
Added options slider
PringlesGang Oct 20, 2024
52a63df
Added highlight color to profile
PringlesGang Oct 20, 2024
c5b4da3
Implemented base of config movement
PringlesGang Nov 12, 2024
a50a363
Implemented config slider movement
PringlesGang Nov 12, 2024
7540247
Added character voice page
PringlesGang Nov 13, 2024
8a506db
Added highlight boxes
PringlesGang Nov 13, 2024
76813ac
Allow for muting characters on hover
PringlesGang Nov 16, 2024
7c204a2
Added page indicator lights
PringlesGang Nov 16, 2024
c77d66d
Fixed options entry highlighting and selecting behaviour
PringlesGang Dec 17, 2024
47be246
Implemented mouse input for OptionsEntry
PringlesGang Dec 18, 2024
2828705
Implemented mouse input for OptionsSlider
PringlesGang Dec 18, 2024
a00e164
Fixed scrollbar so it no longer scrolls when hovering after clicking
PringlesGang Dec 18, 2024
3febf79
Implemented backing out with right-mouse
PringlesGang Dec 18, 2024
18f4a29
Implemented mouse input for options tabs
PringlesGang Dec 23, 2024
90eef0f
Implemented bumper tab switching for options menu
PringlesGang Dec 27, 2024
24b7aea
Added mouse highlights to option entries
PringlesGang Dec 27, 2024
905653a
Improved click button reliability
PringlesGang Dec 27, 2024
ab4dcf7
Improved page panel spritesheet location
PringlesGang Dec 27, 2024
bbeb94d
Converted two profile settings to use vec2-arrays and RectF-arrays in…
PringlesGang Dec 27, 2024
641bdc3
Fixed options menu exiting
PringlesGang Dec 27, 2024
95ab928
Implemented muting voice with mouse
PringlesGang Dec 27, 2024
0dc85ea
Added sysse to options menu
PringlesGang Dec 27, 2024
64c6d2a
Gave skip mode option 'read' and 'all' sprites
PringlesGang Dec 28, 2024
c8ba1f9
Properly enabled and disabled OptionsBinaryButton true/false buttons
PringlesGang Dec 28, 2024
97190eb
Implemented options menu fade animation
PringlesGang Dec 28, 2024
b37507e
Implemented button holding logic for options menu
PringlesGang Dec 28, 2024
1168b34
Added menu mask overlay to config menu
PringlesGang Dec 28, 2024
4e40f8b
Fixed options menu sometimes getting stuck upon quick reentry
PringlesGang Dec 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ set(Impacto_Src
src/ui/widgets/group.cpp
src/ui/widgets/carousel.cpp
src/ui/widgets/cgviewer.cpp
src/ui/widgets/clickbutton.cpp
src/ui/widgets/mo6tw/titlebutton.cpp
src/ui/widgets/mo6tw/saveentrybutton.cpp
src/ui/widgets/mo6tw/tipsentrybutton.cpp
Expand All @@ -244,6 +245,10 @@ set(Impacto_Src
src/ui/widgets/cc/backlogentry.cpp
src/ui/widgets/cc/titlebutton.cpp
src/ui/widgets/cclcc/titlebutton.cpp
src/ui/widgets/cclcc/optionsentry.cpp
src/ui/widgets/cclcc/optionsbinarybutton.cpp
src/ui/widgets/cclcc/optionsslider.cpp
src/ui/widgets/cclcc/optionsvoiceslider.cpp
src/ui/widgets/cclcc/saveentrybutton.cpp
src/ui/widgets/cclcc/sysmenubutton.cpp
src/ui/widgets/cclcc/tipsentrybutton.cpp
Expand Down Expand Up @@ -538,6 +543,7 @@ set(Impacto_Header
src/ui/widgets/group.h
src/ui/widgets/carousel.h
src/ui/widgets/cgviewer.h
src/ui/widgets/clickbutton.h
src/ui/widgets/mo6tw/titlebutton.h
src/ui/widgets/mo6tw/saveentrybutton.h
src/ui/widgets/mo6tw/tipsentrybutton.h
Expand All @@ -556,6 +562,10 @@ set(Impacto_Header
src/ui/widgets/cc/backlogentry.h
src/ui/widgets/cc/titlebutton.h
src/ui/widgets/cclcc/titlebutton.h
src/ui/widgets/cclcc/optionsentry.h
src/ui/widgets/cclcc/optionsbinarybutton.h
src/ui/widgets/cclcc/optionsslider.h
src/ui/widgets/cclcc/optionsvoiceslider.h

src/renderer/3d/camera.h
src/renderer/3d/model.h
Expand Down
273 changes: 265 additions & 8 deletions profiles/cclcc/hud/optionsmenu.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,272 @@
root.OptionsMenu = {
Type = OptionsMenuType.CCLCC,
DrawType = DrawComponentType.SystemMenu,

FadeInDuration = 0.5,
FadeOutDuration = 0.5,

HighlightColor = { X = 0.94, Y = 0.49, Z = 0.59 },

BackgroundSprite = "OptionsBackground",
FadeInDuration = 0.2,
FadeOutDuration = 0.2,
SliderTrackSprite = "OptionsBackground",
SliderFillSprite = "OptionsBackground",
SliderThumbSprite = "OptionsBackground"
BackgroundPosition = { X = 179, Y = 0 },
BackgroundFadeStartPosition = { X = 179, Y = -375 },

PointerSprite = "OptionsPointer",
PointerOffset = { X = 13, Y = 2 },

HeaderSprite = "OptionsHeader",
HeaderPosition = { X = 10, Y = 10 },
PageHeaderSprites = {},
PageHeaderPosition = { X = 696, Y = 182 },

PagePanelSprite = "OptionsPagePanel",
PagePanelPosition = { X = -114, Y = 0 },
PagePanelFadeStartPosition = { X = -464, Y = 0 },
PagePanelSprites = {},
PagePanelIconOffsets = {
{ X = 259, Y = 73 },
{ X = 235, Y = 333 },
{ X = 261, Y = 585 },
{ X = 238, Y = 831 }
},
PagePanelHoverBounds = {
{ X = 168, Y = 79, Width = 150, Height = 183 },
{ X = 147, Y = 343, Width = 154, Height = 177 },
{ X = 169, Y = 591, Width = 146, Height = 181 },
{ X = 149, Y = 837, Width = 150, Height = 179 },
},
PoleAnimation = "OptionsPoleAnimation",

SliderTrackSprite = "OptionsSliderTrack",
SliderTrackOffset = { X = 766, Y = 0 },
VoiceSliderTrackSprite = "OptionsVoiceSliderTrack",
VoiceSliderOffset = { X = 114, Y = 57 },
BinaryBoxSprite = "OptionsBinaryBox",
BinaryBoxOffset = { X = 914, Y = 0 },
SliderSpeed = 1.0,

SkipReadSprite = "OptionsSkipRead",
SkipAllSprite = "OptionsSkipAll",
OnSprite = "OptionsOn",
OffSprite = "OptionsOff",
YesSprite = "OptionsYes",
NoSprite = "OptionsNo",

GuideSprite = "OptionsGuide",
VoiceGuideSprite = "OptionsVoiceGuide",
GuidePosition = { X = 0, Y = 986 },
GuideFadeStartPosition = { X = 0, Y = 1375 },

EntriesStartPosition = { X = 419, Y = 313 },
EntriesVerticalOffset = 126,
SoundEntriesStartPosition = { X = 419, Y = 333 },
SoundEntriesVerticalOffset = 70,
VoiceEntriesOffset = { X = 408, Y = 160 },
EntryDimensions = { X = 1212, Y = 50 },
VoiceEntryDimensions = { X = 374, Y = 104 },

LabelSprites = {},
LabelOffset = { X = 102, Y = -2 },
NametagSprites = {},
NametagOffset = { X = 116, Y = 4 },
PortraitSprites = {},
PortraitOffset = { X = 3, Y = 2 },
VoicePosition = { X = 454, Y = 310 },

MinButtonHoldTime = 0.5,
ButtonHoldTimeInterval = 0.05,

MenuMask = "MenuMask",
};

root.Sprites["OptionsBackground"] = {
Sheet = "Title",
Bounds = { X = 0, Y = 0, Width = 1920, Height = 1080 }
};
Sheet = "Config",
Bounds = { X = 0, Y = 0, Width = 1571, Height = 1089 }
};

root.Sprites["OptionsSliderTrack"] = {
Sheet = "Config",
Bounds = { X = 684, Y = 1291, Width = 446, Height = 50 }
};

root.Sprites["OptionsVoiceSliderTrack"] = {
Sheet = "Config",
Bounds = { X = 951, Y = 1239, Width = 250, Height = 35 }
};

root.Sprites["OptionsBinaryBox"] = {
Sheet = "Config",
Bounds = { X = 684, Y = 1343, Width = 298, Height = 50 }
};

root.Sprites["OptionsPointer"] = {
Sheet = "Config",
Bounds = { X = 697, Y = 1241, Width = 71, Height = 45 }
};

root.Sprites["OptionsHeader"] = {
Sheet = "Config",
Bounds = { X = 5, Y = 1243, Width = 663, Height = 267 }
};

root.Sprites["OptionsPagePanel"] = {
Sheet = "Config",
Bounds = { X = 1571, Y = 0, Width = 477, Height = 1080 }
};

root.Sprites["OptionsSkipRead"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1394, Width = 148, Height = 50 }
};

root.Sprites["OptionsSkipAll"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1448, Width = 148, Height = 50 }
};

root.Sprites["OptionsOn"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1499, Width = 148, Height = 50 }
};

root.Sprites["OptionsOff"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1551, Width = 148, Height = 50 }
};

root.Sprites["OptionsYes"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1603, Width = 148, Height = 50 }
};

root.Sprites["OptionsNo"] = {
Sheet = "Config",
Bounds = { X = 952, Y = 1655, Width = 148, Height = 50 }
};

root.Sprites["OptionsGuide"] = {
Sheet = "Config",
Bounds = { X = 0, Y = 2476, Width = 1926, Height = 57 }
};

root.Sprites["OptionsVoiceGuide"] = {
Sheet = "Config",
Bounds = { X = 0, Y = 2416, Width = 1926, Height = 57 }
};

root.Sprites["MenuMask"] = {
Sheet = "MenuChip",
Bounds = { X = 154, Y = 140, Width = 1900, Height = 1061 },
};

for i = 0, 3 do
height = 80;

root.Sprites["OptionsPageHeader" .. i] = {
Sheet = "Config",
Bounds = {
X = 0,
Y = 1510 + height * i,
Width = 942,
Height = height
}
};

root.OptionsMenu.PageHeaderSprites[#root.OptionsMenu.PageHeaderSprites + 1] = "OptionsPageHeader" .. i;
end

-- Rearange the labels in the array so they're in order of appearance
labelIndices = {5, 6, 7, 1,
2, 3, 8,
9, 10, 11, 12, 13, 4, 15, 14,
16};
height = 52;
for i = 0, 15 do
offset = ((i > 11) and {104} or {0})[1];

root.Sprites["OptionsLabel" .. i] = {
Sheet = "Config",
Bounds = {
X = 1239,
Y = 1237 + height * i + offset,
Width = 809,
Height = height
}
};
root.OptionsMenu.LabelSprites[labelIndices[i + 1]] = "OptionsLabel" .. i;
end

for i = 0, 12 do
width = 218;
height = 53;

root.Sprites["OptionsNametag" .. i] = {
Sheet = "Config",
Bounds = {
X = width * (i % 6),
Y = 1863 + height * (i // 6),
Width = width,
Height = height
}
};
root.OptionsMenu.NametagSprites[#root.OptionsMenu.NametagSprites + 1] = "OptionsNametag" .. i;
end

for i = 0, 7 do
-- Interweave highlighted and non-highlighted variants
width = 224;
offset = ((i % 2 == 1) and {width * 4} or {0})[1];

-- Non-highlighted Text and Sound panels are poorly placed in the spritesheet, for some reason
if (i == 3 or i == 5) then
offset = offset - 1;
end

root.Sprites["OptionsPagePanel" .. i] = {
Sheet = "Config",
Bounds = {
X = offset + width * (i // 2),
Y = 2205,
Width = width,
Height = 195
}
};
root.OptionsMenu.PagePanelSprites[#root.OptionsMenu.PagePanelSprites + 1] = "OptionsPagePanel" .. i;
end

for i = 0, 25 do
-- Interweave on and muted variants
width = 100;

root.Sprites["OptionsPortrait" .. i] = {
Sheet = "ConfigEx",
Bounds = {
X = 768 + (width + 1) * (i // 2),
Y = ((i % 2 == 0) and {2256} or {2357})[1],
Width = width,
Height = width
}
};
root.OptionsMenu.PortraitSprites[#root.OptionsMenu.PortraitSprites + 1] = "OptionsPortrait" .. i;
end

MakeAnimation({
Name = "OptionsPoleAnimation",
Sheet = "ConfigEx",

FirstFrameX = 0,
FirstFrameY = 0,

FrameWidth = 539,
ColWidth = 539,
FrameHeight = 1080,
RowHeight = 1096,

Frames = 15,
Duration = 0.5,
Rows = 3,
Columns = 7,

PrimaryDirection = AnimationDirections.Right,
SecondaryDirection = AnimationDirections.Down
});
Loading
Loading