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

zoning UI cleanup part 1 #159

Merged
merged 22 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
e36134f
feat: hide zoning button behind sv_cheats 1
PeenScreeker Sep 23, 2024
ea70b4b
feat: adjust zoning toggle alignment
PeenScreeker Sep 23, 2024
caafd13
feat: hide tab menu header while zoning
PeenScreeker Nov 23, 2024
1afcfa7
feat: move grid snap below region properties
PeenScreeker Sep 23, 2024
44c14c6
feat: lighten segment background in tracklist
PeenScreeker Sep 23, 2024
24a12e7
feat: delete button in tracklist
PeenScreeker Sep 23, 2024
fa1ce82
feat: update selection on object creation
PeenScreeker Sep 26, 2024
c83fc74
feat: initialize tracklist expanded
PeenScreeker Sep 26, 2024
53b680b
feat: move add... button to tracklist
PeenScreeker Sep 27, 2024
6bf24b5
feat: pass selection object to add end zone function
PeenScreeker Sep 30, 2024
fcbc55f
fix: defrag bonus styling
PeenScreeker Oct 2, 2024
0cf769c
refactor: add button functionality
PeenScreeker Oct 2, 2024
e13549b
feat: set region height after placing corners
PeenScreeker Oct 2, 2024
dea754d
feat: remove Add... and Delete... buttons
PeenScreeker Oct 8, 2024
b61e591
fix: delete button reference error
PeenScreeker Oct 11, 2024
198f72b
fix: tracklist hover sizing at not-1080p
PeenScreeker Oct 11, 2024
bf3c215
feat: do not create blank start zone on initial zone edit
PeenScreeker Oct 11, 2024
33aba1c
feat: draw zones while editing
PeenScreeker Sep 21, 2024
9fb0315
feat: set active zone defs when leaving edit mode
PeenScreeker Oct 16, 2024
ffacecd
feat: snap teleport dest yaw to nearest 15 degrees
PeenScreeker Oct 16, 2024
42a6770
feat: pass point placement mode to c++
PeenScreeker Oct 16, 2024
1a3bcfc
fix: move const enums to zoning.ts
PeenScreeker Nov 26, 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
6 changes: 4 additions & 2 deletions layout/hud/tab-menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,10 @@
<Panel class="hud-tab-menu__stats">
</Panel>

<Panel class="hud-tab-menu__enable-cursor">
<ToggleButton id="ZoningToggle" class="button h-align-left hud-tab-menu__zoning-button" convar="mom_zone_edit" />
<Panel id="TabMenuFooter" class="hud-tab-menu__footer">
<ConVarEnabler convar="sv_cheats" class="v-align-center" togglevisibility="true">
<ToggleButton id="ZoningToggle" class="button hud-tab-menu__zoning-button" convar="mom_zone_edit" />
</ConVarEnabler>
<Label class="hud-tab-menu__enable-cursor-tip" text="#HudTabMenu_EnableCursorTip"/>
</Panel>
</Panel>
Expand Down
64 changes: 40 additions & 24 deletions layout/pages/zoning/zoning.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,66 @@
<Panel class="zoning__tracklist-track">
<Panel id="Entry" class="zoning__tracklist-course-entry">
<Button id="CollapseButton" class="zoning__collapse-button">
<Image id="TracklistCollapseIcon" class="button__icon zoning__collapse-icon zoning__icon-green" src="file://{images}/add.svg" />
<Image id="TracklistExpandIcon" class="button__icon zoning__collapse-icon zoning__icon-red hide" src="file://{images}/subtract.svg" />
<Image id="TracklistCollapseIcon" class="button__icon zoning__collapse-icon zoning__icon-green hide" src="file://{images}/add.svg" />
<Image id="TracklistExpandIcon" class="button__icon zoning__collapse-icon zoning__icon-red" src="file://{images}/subtract.svg" />
</Button>
<RadioButton id="SelectButton" class="zoning__tracklist-button" group="tracklist">
<Label id="Name" class="zoning__tracklist-label" />
</RadioButton>
<Button id="DeleteButton" class="zoning__tracklist-delete hide">
<Image class="zoning__tracklist-delete__icon" src="file://{images}/close-box-outline.svg" textureheight="24" />
</Button>
</Panel>
<Panel id="ChildContainer" class="w-full flow-down">
<Panel id="SegmentContainer" class="zoning__list-container" />
<Panel id="EndZoneContainer" class="zoning__list-container" />
<Panel id="ChildContainer" class="zoning__list-container">
<Panel id="SegmentContainer" class="w-full flow-down" />
<Button id="AddSegmentButton" class="zoning__add-button">
<Label class="zoning__tracklist-label zoning__tracklist-label--add" text="#Zoning_NewSegment" />
</Button>
<Panel id="EndZoneContainer" class="w-full flow-down" />
<Button id="AddEndZoneButton" class="zoning__add-button">
<Label class="zoning__tracklist-label zoning__tracklist-label--add" text="#Zoning_NewEndZone" />
</Button>
</Panel>
<Button id="AddBonusButton" class="zoning__add-button hide" onactivate="ZoneMenuHandler.addBonus()">
<Label class="zoning__tracklist-label zoning__tracklist-label--add" text="#Zoning_NewBonus" />
</Button>
</Panel>
</snippet>
<snippet name="tracklist-segment">
<Panel class="zoning__tracklist-segment">
<Panel class="w-full flow-down">
<Panel id="Entry" class="zoning__tracklist-course-entry">
<Button id="CollapseButton" class="zoning__collapse-button">
<Image id="TracklistCollapseIcon" class="button__icon zoning__collapse-icon zoning__icon-green" src="file://{images}/add.svg" />
<Image id="TracklistExpandIcon" class="button__icon zoning__collapse-icon zoning__icon-red hide" src="file://{images}/subtract.svg" />
<Image id="TracklistCollapseIcon" class="button__icon zoning__collapse-icon zoning__icon-green hide" src="file://{images}/add.svg" />
<Image id="TracklistExpandIcon" class="button__icon zoning__collapse-icon zoning__icon-red" src="file://{images}/subtract.svg" />
</Button>
<RadioButton id="SelectButton" class="zoning__tracklist-button" group="tracklist">
<Label id="Name" class="zoning__tracklist-label" />
</RadioButton>
<Button id="DeleteButton" class="zoning__tracklist-delete hide">
<Image class="zoning__tracklist-delete__icon" src="file://{images}/close-box-outline.svg" textureheight="24" />
</Button>
</Panel>
<Panel id="ChildContainer" class="w-full flow-down">
<Panel id="CheckpointContainer" class="zoning__list-container" />
<Panel id="CancelContainer" class="zoning__list-container" />
<Panel id="ChildContainer" class="zoning__list-container">
<Panel id="CheckpointContainer" class="zoning__tracklist-checkpoint" />
<Button id="AddCheckpointButton" class="zoning__add-button">
<Label class="zoning__tracklist-label zoning__tracklist-label--add" text="#Zoning_NewCheckpoint" />
</Button>
<Panel id="CancelContainer" class="zoning__tracklist-checkpoint" />
<Button id="AddCancelZoneButton" class="zoning__add-button">
<Label class="zoning__tracklist-label zoning__tracklist-label--add" text="#Zoning_NewCancelZone" />
</Button>
</Panel>
</Panel>
</snippet>
<snippet name="tracklist-checkpoint">
<Panel class="zoning__tracklist-checkpoint">
<Panel class="w-full flow-down">
<Panel id="Entry" class="zoning__tracklist-course-entry">
<RadioButton id="SelectButton" class="zoning__tracklist-button" group="tracklist">
<Label id="Name" class="zoning__tracklist-label" />
</RadioButton>
<Button id="DeleteButton" class="zoning__tracklist-delete hide">
<Image class="zoning__tracklist-delete__icon" src="file://{images}/close-box-outline.svg" textureheight="24" />
</Button>
</Panel>
</Panel>
</snippet>
Expand All @@ -70,14 +94,6 @@
<!-- Populated in js -->
</Panel>
</Panel>
<Panel class="zoning__button-box">
<Button id="NewZoneButton" class="button button--blue ml-2 h-align-right" onactivate="ZoneMenuHandler.showAddMenu()">
<Label class="button__text" text="#Zoning_New" />
</Button>
<Button class="button button--red ml-2 h-align-right" onactivate="ZoneMenuHandler.showDeletePopup()">
<Label class="button__text" text="#Zoning_Delete" />
</Button>
</Panel>
<Label id="PropertiesLabel" class="zoning__header" text="#Zoning_PropertiesLabel" />
<Panel id="PropertiesContainer" class="zoning__menu-section">
<Panel id="TrackProperties" class="zoning__property-container">
Expand Down Expand Up @@ -146,9 +162,6 @@
</DropDown>
</Panel>
</Panel>
<Panel id="GridSlider" class="zoning__property">
<SettingsSlider text="#Zoning_GridSnapSize" class="zoning__slider" min="1" max="64" percentage="false" convar="mom_zone_grid" />
</Panel>
<Panel id="PropertyTabs" class="tabs">
<RadioButton group="ZoningRegion" class="tabs__tab" value="Points" selected="true" onactivate="ZoneMenuHandler.showRegionMenu('Points')" onmouseover="UiToolkitAPI.ShowTextTooltip('PropertyTabs', '#Zoning_RegionPoints_Tooltip');" onmouseout="UiToolkitAPI.HideTextTooltip();">
<Image src="file://{images}/vector-square-close.svg" class="tabs__icon" textureheight="48" />
Expand Down Expand Up @@ -235,14 +248,17 @@
</Panel>
</Panel>
</Panel>
<Panel id="GridSlider" class="zoning__property">
<SettingsSlider text="#Zoning_GridSnapSize" class="zoning__slider" min="1" max="64" percentage="false" convar="mom_zone_grid" />
</Panel>
</Panel>
</Panel>
<Panel class="zoning__button-box">
<Button class="button button--blue ml-2 h-align-right" onactivate="ZoneMenuHandler.saveZones()">
<Label class="button__text" text="#Zoning_Save" />
</Button>
<Button class="button ml-2 h-align-right" onactivate="ZoneMenuHandler.cancelEdit()">
<Label class="button__text" text="#Zoning_CancelEdit" />
<Label class="button__text" text="#Zoning_Discard" />
</Button>
</Panel>
</ZoneMenu>
Expand Down
Loading