Skip to content

Commit

Permalink
feat: style two-click mode togglebutton
Browse files Browse the repository at this point in the history
  • Loading branch information
PeenScreeker committed Aug 27, 2024
1 parent 8900aef commit 6a3b981
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions images/vector-polyline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions images/vector-two-click.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions layout/pages/zoning/zoning.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,12 @@
</Panel>
<Panel id="PointsSection" class="zoning__region-details">
<Panel id="RegionPoints" class="zoning__property">
<Button class="button zoning__property-button" onactivate="ZoneMenu.pickCorners();">
<Label class="button__text" text="#Zoning_EditPoints" />
</Button>
<Panel class="zoning__region-property-container">
<ToggleButton id="TwoClickMode" class="zoning__two-click-button" convar="mom_zone_two_click" onmouseover="UiToolkitAPI.ShowTextTooltip('TwoClickMode', '#Zoning_TwoClickTogle_Tooltip');" onmouseout="UiToolkitAPI.HideTextTooltip();" />
<Button class="button zoning__property-button" onactivate="ZoneMenu.pickCorners();">
<Label class="button__text" text="#Zoning_EditPoints" />
</Button>
</Panel>
</Panel>
<Panel id="PointsList" class="zoning__region-points-list">
<!-- Populated in JS -->
Expand Down
19 changes: 19 additions & 0 deletions styles/pages/zoning/zoning.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,25 @@ $medium: 28px;
}
}

&__two-click-button {
height: $button-height;
width: height-percentage(100%);
background-position: center;
background-repeat: no-repeat;
background-image: url('file://{images}/vector-polyline.svg');
wash-color: $red;
tooltip-position: top;

&:selected {
background-image: url('file://{images}/vector-two-click.svg');
wash-color: $blue;
}

&:hover {
wash-color: $white;
}
}

&__dropdown {
width: 180px;
}
Expand Down

0 comments on commit 6a3b981

Please sign in to comment.