mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-01 09:17:15 -04:00
Resolve RmlUi deprecation warning, add L1/R1 tabbing to MenuBar
This commit is contained in:
+4
-4
@@ -343,7 +343,7 @@ icon.celebration {
|
||||
color: rgba(224, 219, 200, 45%);
|
||||
}
|
||||
|
||||
progressbar {
|
||||
progress {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 6dp;
|
||||
@@ -352,12 +352,12 @@ progressbar {
|
||||
margin: 6dp 0 2dp 0;
|
||||
}
|
||||
|
||||
progressbar.progress-done fill {
|
||||
progress.progress-done fill {
|
||||
background-color: #44aa22;
|
||||
border-radius: 3dp;
|
||||
}
|
||||
|
||||
progressbar.progress-ongoing fill {
|
||||
progress.progress-ongoing fill {
|
||||
background-color: #2255bb;
|
||||
border-radius: 3dp;
|
||||
}
|
||||
@@ -460,7 +460,7 @@ window.modal.danger .modal-header icon {
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
progressbar.verification-progress-bar {
|
||||
progress.verification-progress-bar {
|
||||
height: 8dp;
|
||||
margin: 2dp 0 0 0;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ Rml::String build_achievement_info_rml(const Achievement& a) {
|
||||
if (a.isCounter) {
|
||||
float fraction = a.goal > 0 ? float(a.progress) / float(a.goal) : 1.0f;
|
||||
s += fmt::format(
|
||||
R"(<progressbar value="{:.3f}" class="{}"/>)"
|
||||
R"(<progress value="{:.3f}" class="{}"/>)"
|
||||
R"(<span class="achievement-progress">{} / {}</span>)",
|
||||
fraction,
|
||||
a.unlocked ? "progress-done" : "progress-ongoing",
|
||||
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
mFileName = append(content, "div");
|
||||
mFileName->SetClass("verification-file", true);
|
||||
|
||||
mProgress = append(content, "progressbar");
|
||||
mProgress = append(content, "progress");
|
||||
mProgress->SetClass("progress-ongoing", true);
|
||||
mProgress->SetClass("verification-progress-bar", true);
|
||||
mProgress->SetAttribute("value", 0.f);
|
||||
|
||||
+11
-1
@@ -212,6 +212,15 @@ bool TabBar::handle_nav_command(Rml::Event& event, NavCommand cmd) {
|
||||
if (activeTab != -1) {
|
||||
currentComponent = activeTab;
|
||||
}
|
||||
} else {
|
||||
int activeTab = tab_containing(event.GetTargetElement());
|
||||
if (activeTab != -1) {
|
||||
currentComponent = activeTab;
|
||||
} else if (mLastFocusedTabIndex >= 0 &&
|
||||
mLastFocusedTabIndex < static_cast<int>(mTabs.size()))
|
||||
{
|
||||
currentComponent = mLastFocusedTabIndex;
|
||||
}
|
||||
}
|
||||
int direction = isNext ? 1 : -1;
|
||||
if (currentComponent == -1) {
|
||||
@@ -221,8 +230,9 @@ bool TabBar::handle_nav_command(Rml::Event& event, NavCommand cmd) {
|
||||
return false;
|
||||
}
|
||||
currentComponent = -1;
|
||||
} else if (cmd == NavCommand::Next) {
|
||||
currentComponent = -1;
|
||||
} else {
|
||||
// Next/Previous require a currently selected tab to navigate from
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user