-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Current next map theme update (#253)
Co-authored-by: snixtho <snixtho@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
173 additions
and
314 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
src/Modules/CurrentMapModule/Config/ICurrentMapSettings.cs
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,18 @@ | ||
using System.ComponentModel; | ||
using Config.Net; | ||
using EvoSC.Modules.Attributes; | ||
|
||
namespace EvoSC.Modules.Official.CurrentMapModule.Config; | ||
|
||
[Settings] | ||
public interface ICurrentMapSettings | ||
{ | ||
[Option(DefaultValue = 80.0), Description("Specifies the Y position of the widget.")] | ||
public double Y { get; set; } | ||
|
||
[Option(DefaultValue = 36.0), Description("Specifies the width of the widget.")] | ||
public double Width { get; set; } | ||
|
||
[Option(DefaultValue = "right"), Description("Specifies on which side the widget is displayed.")] | ||
public string Position { get; set; } | ||
} |
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
137 changes: 25 additions & 112 deletions
137
src/Modules/CurrentMapModule/Templates/CurrentMapWidget.mt
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 |
---|---|---|
@@ -1,123 +1,36 @@ | ||
<component> | ||
<using namespace="EvoSC.Common.Interfaces.Models"/> | ||
<using namespace="EvoSC.Modules.Official.WorldRecordModule.Models"/> | ||
<using namespace="EvoSC.Modules.Official.CurrentMapModule.Config"/> | ||
|
||
<property type="IMap?" name="map" default="null" /> | ||
<property type="string" name="mapauthor" default="null" /> | ||
<property type="WorldRecord?" name="record" default="null" /> | ||
<import component="EvoSC.Containers.Widget" as="Widget"/> | ||
<import component="EvoSC.Style.UIStyle" as="UIStyle"/> | ||
|
||
<property type="double" name="scale" default="0.9" /> | ||
<property type="double" name="w" default="68.0" /> | ||
<property type="double" name="y" default="85.0" /> | ||
<property type="double" name="headerHeight" default="8.0" /> | ||
<property type="double" name="bodyHeight" default="22.0" /> | ||
<property type="ICurrentMapSettings" name="settings"/> | ||
<property type="IMap?" name="map" default="null"/> | ||
<property type="string" name="mapAuthor" default="null"/> | ||
|
||
<template> | ||
<frame pos="{{ 160.0 - w * scale }} {{ y }}" scale="{{ scale }}" z-index="100"> | ||
<frame> | ||
<frame size="{{ w }} {{ headerHeight - 0.1 }}"> | ||
<!-- HEADER --> | ||
<quad pos="-0.15 0" | ||
size="{{ w + 20.1 }} {{ headerHeight + 0.3 }}" | ||
style="UICommon64_1" | ||
substyle="BgFrame1" | ||
colorize="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_BgHeaderGrad1 }}" | ||
<UIStyle/> | ||
<Widget header="current map" height="10" position="{{ settings.Position }}" y="{{ settings.Y }}"> | ||
<template slot="body"> | ||
<frame pos='{{ settings.Position=="right" ? settings.Width-2.0 : 0 }} 0'> | ||
<label text="{{ map?.Name }}" | ||
class="text-primary" | ||
pos="0 -3" | ||
valign="center" | ||
halign="right" | ||
size="{{ settings.Width-2 }} 5" | ||
/> | ||
|
||
<!-- GRADIENT --> | ||
<quad pos="{{ w }} {{ -headerHeight }}" | ||
size="{{ w }} {{ headerHeight - 0.1 }}" | ||
image="file://Media/Painter/Stencils/15-Stripes/_Stripe0Grad/Brush.tga" | ||
modulatecolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_BgHeaderGrad2 }}" | ||
rot="180" | ||
/> | ||
|
||
<!-- LABEL --> | ||
<label pos="2 {{ headerHeight / -2.0 - 0.4 }}" | ||
text="Current Map" | ||
valign="center2" | ||
textfont="{{ Font.Bold }}" | ||
textprefix="$i$t" | ||
textsize="2" | ||
textcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Text }}" | ||
/> | ||
|
||
<!-- LOGO --> | ||
<quad if='Theme.CurrentMapModule_CurrentMapWidget_Default_Logo != ""' | ||
pos="{{ w - 3.0 }} {{ headerHeight / -2.0 }}" | ||
size="20 3.2" | ||
valign="center" | ||
halign="right" | ||
keepratio="Fit" | ||
image="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Logo }}" | ||
opacity="0.75" | ||
/> | ||
</frame> | ||
|
||
<!-- BACKGROUND --> | ||
<quad pos="0 {{ -headerHeight + 0.1 }}" | ||
size="{{ w }} {{ bodyHeight }}" | ||
bgcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_BgContent }}" | ||
opacity="0.9" | ||
/> | ||
</frame> | ||
|
||
<framemodel id="gradient_box"> | ||
<frame size="0.95 8"> | ||
<quad pos="0 0.2" | ||
size="2 8.4" | ||
style="UICommon64_1" | ||
substyle="BgFrame2" | ||
colorize="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_BgRow }}" | ||
opacity="0.75" | ||
/> | ||
</frame> | ||
|
||
<!-- GRADIENT --> | ||
<quad pos="1 0" | ||
size="{{ w - 10.0 }} 8" | ||
image="file://Media/Painter/Stencils/15-Stripes/_Stripe0Grad/Brush.tga" | ||
modulatecolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_BgRow }}" | ||
opacity="0.75" | ||
/> | ||
</framemodel> | ||
|
||
<!-- CONTENT --> | ||
<frame pos="2 {{ -headerHeight - 2.0 }}" size="{{ w }} 999" z-index="10"> | ||
<frameinstance modelid="gradient_box" /> | ||
<frame pos="-0.2 -1"> | ||
<label pos="2 0" | ||
text='{{ map?.Name ?? "loading..." }}' | ||
textsize="1.4" | ||
textfont="{{ Font.Regular }}" | ||
textcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Text }}" | ||
/> | ||
<label pos="2 -3.2" | ||
text='by {{ mapauthor ?? "loading..." }}' | ||
textsize="1.1" | ||
textfont="{{ Font.Thin }}" | ||
textcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Text }}" | ||
<label text="$<$tby {{ mapAuthor }}$>" | ||
class="text-primary" | ||
textsize="0.75" | ||
pos="0 -6.5" | ||
valign="center" | ||
halign="right" | ||
size="{{ settings.Width-2 }} 5" | ||
/> | ||
</frame> | ||
|
||
<frame v-if="record != null"> | ||
<frameinstance modelid="gradient_box" pos="0 -9" /> | ||
<frame pos="-0.2 -10"> | ||
<label pos="2 0" | ||
text="Record: {{ record?.Time.ToString() }} [{{ record?.Source }}]" | ||
textsize="1.4" | ||
textfont="{{ Font.Regular }}" | ||
textcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Text }}" | ||
/> | ||
<label pos="2 -3.2" | ||
text="by {{ record?.PlayerName }}" | ||
textsize="1.1" | ||
textfont="{{ Font.Thin }}" | ||
textcolor="{{ Theme.CurrentMapModule_CurrentMapWidget_Default_Text }}" | ||
/> | ||
</frame> | ||
</frame> | ||
</frame> | ||
</frame> | ||
</template> | ||
</Widget> | ||
</template> | ||
</component> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.ComponentModel; | ||
using Config.Net; | ||
using EvoSC.Modules.Attributes; | ||
|
||
namespace EvoSC.Modules.Official.NextMapModule.Config; | ||
|
||
[Settings] | ||
public interface INextMapSettings | ||
{ | ||
[Option(DefaultValue = 80.0), Description("Specifies the Y position of the widget.")] | ||
public double Y { get; set; } | ||
|
||
[Option(DefaultValue = 36.0), Description("Specifies the width of the widget.")] | ||
public double Width { get; set; } | ||
|
||
[Option(DefaultValue = "right"), Description("Specifies on which side the widget is displayed.")] | ||
public string Position { get; set; } | ||
} |
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
Oops, something went wrong.