Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
087c270
adding resizable support to `OverlayPanel` and refine `SystemInspecto…
Veritaris Mar 29, 2026
82d772d
updating inspector toggle shortcut to F12 and refining minimized chip…
Veritaris Mar 29, 2026
cb88ae4
removing unused variables, data classes, methods, and dropdown overla…
Veritaris Mar 29, 2026
ecca003
splitting inspector helpers into InspectorPresentationSupport and Ins…
Veritaris Mar 29, 2026
0dadaf9
separating inspector snapshot builder to another class;
Veritaris Mar 30, 2026
00897dc
adding some tests for inspector;
Veritaris Mar 30, 2026
4b85e28
renaming debug methods to overlay methods;
Veritaris Mar 30, 2026
81b7840
deleting dangling debug methods;
Veritaris Mar 30, 2026
f66cf6f
Merge branch 'master' into DSGL-15
Veritaris Apr 19, 2026
d3ba2af
wrapping inspector body in a container;
Veritaris Apr 19, 2026
2c3f75f
fixing bug with a non-smooth inspector moving;
Veritaris Apr 19, 2026
0ec17cb
extracting render flow into separate functions;
Veritaris Apr 19, 2026
c455155
extracting render flow into separate functions;
Veritaris Apr 19, 2026
11edc52
extracting some helpers into separate functions;
Veritaris Apr 19, 2026
5e5a9c4
extracting popups into separate functions;
Veritaris Apr 19, 2026
fcd7782
split popup owner logic into app and system overlays;
Veritaris Apr 20, 2026
ab07ed4
replacing manual dropdown with input select;
Veritaris Apr 20, 2026
00617f6
small clean-up;
Veritaris Apr 20, 2026
0f26ce7
fixing inspector color picker issue;
Veritaris Apr 20, 2026
5d43843
refactoring and streamlining color picker popup rendering logic;
Veritaris Apr 21, 2026
48717e6
move custom nodes into separate files;
Veritaris Apr 21, 2026
58c61a3
adding color surface dsl;
Veritaris Apr 21, 2026
bd8e606
adding due slider dsl;
Veritaris Apr 21, 2026
bec7f31
adding alpha slider dsl;
Veritaris Apr 21, 2026
5a4d21d
adding color field (2D) dsl;
Veritaris Apr 21, 2026
5a576b8
adding eyedropper dsl;
Veritaris Apr 21, 2026
16de0d8
refactoring and modularizing color picker rendering logic with dedica…
Veritaris Apr 21, 2026
cd4031b
extracting leftover rendering primitives / leafs before migrating to …
Veritaris Apr 22, 2026
869d8e8
using specific sync func for reconcilation;
Veritaris Apr 22, 2026
4988e20
modularizing and refactoring screen rendering into smaller, descripti…
Veritaris Apr 22, 2026
fe1c2ff
modularizing and refactoring input handling into smaller, descriptive…
Veritaris Apr 22, 2026
8483c25
refactoring input handling by adding `dispatchManualThenDomFallback` …
Veritaris Apr 22, 2026
d45ab8f
moving kotlin version into gradle.properties to be stored and managed…
Veritaris Apr 23, 2026
43c7e91
adding linter (ktlint) to the project;
Veritaris Apr 23, 2026
c0759d1
adding and configuring detekt to project (without code fixing for now);
Veritaris Apr 24, 2026
f01d87d
applying detekt rules with a refactoring;
Veritaris Apr 24, 2026
0a1f0c9
fixing "MaxLineLength" errors;
Veritaris Apr 25, 2026
14b32f2
adding pre-commit hook for detekt, adding baselines for all modules (…
Veritaris Apr 25, 2026
b866ca2
making debug overlay to implement OverlayHost;
Veritaris Apr 25, 2026
418b28a
changing frame input ownership;
Veritaris Apr 25, 2026
d6e3d7d
refactoring context menu handling;
Veritaris Apr 26, 2026
3b9bf3b
refactoring application select handling;
Veritaris Apr 26, 2026
2b9d2c3
reworking how system overlay ownership is taken;
Veritaris Apr 26, 2026
2b0593a
clean-up swatch render;
Veritaris Apr 26, 2026
0f1be28
preparing to unifying the color picker;
Veritaris Apr 26, 2026
008f017
moving colour picker popup to separate mount;
Veritaris Apr 26, 2026
640d92f
changing how overlay input is routed;
Veritaris Apr 26, 2026
304fdc6
unifying colour picker logic with semantic action methods;
Veritaris Apr 26, 2026
44d1f98
adding semantic actions for color picker controller;
Veritaris Apr 26, 2026
6a347c1
adding test for recent swatch preview and updating logic to prevent d…
Veritaris Apr 26, 2026
207a37a
reworking swatches rebuild;
Veritaris May 8, 2026
e0b5a70
a little workaround to ensure layout;
Veritaris May 8, 2026
327f778
adding tests for colour picker mode and RGB order interactions, and i…
Veritaris May 8, 2026
81c078e
preparing to a layered structure rework - introducing domains and sur…
Veritaris May 9, 2026
94b715f
introducing portal host contracts and adding tests for overlay intera…
Veritaris May 9, 2026
bf69ec2
wiring orchestrator with screenhost;
Veritaris May 9, 2026
616d08f
wiring application overlay host with portals host as temporary adapter;
Veritaris May 9, 2026
2291b2f
wiring select with a portalHost;
Veritaris May 10, 2026
6a2478d
wiring color picker with portalHost;
Veritaris May 10, 2026
95a41f2
wiring Inspector with portalHost;
Veritaris May 10, 2026
cdc5b1d
wiring modal portal with portalHost and integrating application overl…
Veritaris May 11, 2026
5c8e74a
wiring debug scope and overlay debug control with portalHost;
Veritaris May 11, 2026
db50661
removing migrated runtime facades; adding follow-up cleanup task;
Veritaris May 11, 2026
c1e208a
partially moving from layers and many-hosts to a domain model + porta…
Veritaris May 11, 2026
86d8c4e
migrating overlay layers and hosts to ScreenDomainSurfaces;
Veritaris May 27, 2026
8984c59
adding new domain surface handlers and updating tests for fallthrough…
Veritaris May 27, 2026
aa495eb
adding portal lifecycle, dismiss, and backdrop policies;
Veritaris May 27, 2026
e9b8124
updating modal portal policies;
Veritaris May 27, 2026
232a752
updating focus behaviour, interaction handling, and portal dismissal …
Veritaris May 28, 2026
1843938
removing OverlayDebugControlHost, migrating functionality to DebugDom…
Veritaris May 28, 2026
b13ebde
removing SystemOverlayPanelDemoNode and associated tests;
Veritaris May 28, 2026
a730a7a
intermediate commit to track changes;
Veritaris Jun 1, 2026
0db3d7c
fixing modals issue;
Veritaris Jun 2, 2026
8e1861d
removing fix leftovers;
Veritaris Jun 2, 2026
756cec5
migrating drag handling logic to PointerCaptureSession for streamline…
Veritaris Jun 3, 2026
e950e95
adding DnD ghost portal logic and integration;
Veritaris Jun 3, 2026
87d628a
removing old overlay mentions in the code;
Veritaris Jun 3, 2026
09aea7a
updating docs according to a new changes;
Veritaris Jun 4, 2026
6a68b60
reducing GC pressure by optimizing small objects allocation in affine…
Veritaris Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 45 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
root = true


[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 4
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true


[*.md]
trim_trailing_whitespace = false


[*.{yml,yaml,toml,json}]
indent_size = 2


[*.{kt,kts}]
max_line_length = 120
ktlint_code_style = ktlint_official
ktlint_experimental = disabled
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 4
ktlint_function_signature_body_expression_wrapping = multiline
ktlint_class_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 1
ktlint_chain_method_rule_force_multiline_when_chain_operator_count_greater_or_equal_than = 3
ktlint_function_naming_ignore_when_annotated_with = Composable,DsglDsl
ktlint_ignore_back_ticked_identifier = true

ij_kotlin_imports_layout = *,java.**,javax.**,kotlin.**,^
ij_kotlin_packages_to_use_import_on_demand = org.dreamfinity.dsgl.core.animation.*,org.dreamfinity.dsgl.core.colorpicker.*,org.dreamfinity.dsgl.core.dnd.*,org.dreamfinity.dsgl.core.dom.elements.*,org.dreamfinity.dsgl.core.dom.elements.support.*,org.dreamfinity.dsgl.core.dom.layout.*,org.dreamfinity.dsgl.core.dsl.*,org.dreamfinity.dsgl.core.event.*,org.dreamfinity.dsgl.core.font.*,org.dreamfinity.dsgl.core.inspector.*,org.dreamfinity.dsgl.core.style.*,org.dreamfinity.dsgl.core.text.*,org.lwjgl.opengl.*
ij_kotlin_allow_trailing_comma = true
# ij_kotlin_allow_trailing_comma_on_call_site = true # disabled due to breaking DSL callsite by IDE code linter
ij_kotlin_indent_before_arrow_on_new_line = false
ij_formatter_tags_enabled = true
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on

[**/src/test/kotlin/**/*.kt]
max_line_length = 160
ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 4
ij_kotlin_packages_to_use_import_on_demand = kotlin.test.*,org.dreamfinity.dsgl.core.colorpicker.*,org.dreamfinity.dsgl.core.dnd.*,org.dreamfinity.dsgl.core.event.*
46 changes: 46 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh
# Runs ktlintFormat and detektAll on staged Kotlin files before commit.
# ktlint auto-correctable violations are fixed and re-staged automatically.
# Non-auto-correctable ktlint violations or detekt violations abort the commit.

exec 1>&2

STAGED_KT=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '\.(kt|kts)$')

if [ -z "$STAGED_KT" ]; then
exit 0
fi

echo "[pre-commit] Running ktlintFormat..."

./gradlew ktlintFormat
STATUS=$?

# Re-stage any files that ktlint auto-corrected (only from the originally staged set)
echo "$STAGED_KT" | tr ' ' '\n' | while IFS= read -r file; do
[ -f "$file" ] && git add "$file"
done

if [ $STATUS -ne 0 ]; then
echo ""
echo "[pre-commit] ktlintFormat found violations that cannot be auto-corrected."
echo "[pre-commit] Fix them manually, then re-run git commit."
exit 1
fi

echo "[pre-commit] ktlintFormat passed."

echo "[pre-commit] Running detektAll..."

./gradlew detektAll
STATUS=$?

if [ $STATUS -ne 0 ]; then
echo ""
echo "[pre-commit] detektAll found violations."
echo "[pre-commit] Fix them manually or update the baseline, then re-run git commit."
exit 1
fi

echo "[pre-commit] detektAll passed."
exit 0
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ build

# docs generated folder
/site/
# Added by code-review-graph
.code-review-graph/
10 changes: 8 additions & 2 deletions adapters/mc-forge-1-7-10/adapter-build-logic/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.gradle.kotlin.dsl.maven

pluginManagement {
includeBuild("../../../build-logic")
repositories {
Expand All @@ -8,3 +6,11 @@ pluginManagement {
maven("https://maven.minecraftforge.net")
}
}

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../../../gradle/libs.versions.toml"))
}
}
}
9 changes: 6 additions & 3 deletions adapters/mc-forge-1-7-10/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@ plugins {
id("dsgl-mc-adapter.conventions")
id("dsgl-mc-forge-1-7-10.conventions")
id("dsgl-releaseable-module.conventions")
id("dsgl-linter.conventions")
id("dsgl-static-analysis.conventions")
}

dsglRelease {
syncKeys.add("modVersion")
}

dependencies {
val coreProject = findProject(":core")
?: findProject(":dsgl:core")
?: error("DSGL core project not found (expected :core or :dsgl:core).")
val coreProject =
findProject(":core")
?: findProject(":dsgl:core")
?: error("DSGL core project not found (expected :core or :dsgl:core).")
implementation(coreProject)
testImplementation(kotlin("test-junit"))
testImplementation(kotlin("test"))
Expand Down
98 changes: 58 additions & 40 deletions adapters/mc-forge-1-7-10/demo/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
plugins {
id("dsgl-mc-adapter.conventions")
id("dsgl-mc-forge-1-7-10.conventions")
id("dsgl-linter.conventions")
id("dsgl-static-analysis.conventions")
}

val modId: String by project
Expand All @@ -19,20 +21,22 @@ val msdfDebugDecorations: String by project
val msdfDebugPerformance: String by project
val rebuildTrace: String by project
val perfDebug: String by project
val dsglOverlayDebug: String by project
val dsglOverlayControls: String by project
val dsglDomainDebug: String by project
val dsglDomainControls: String by project
val dsglColorPickerDebugCounters: String by project
val hotReloadAgentLibraryName: String? by project

val baseModMetadataTokens = mapOf(
"modId" to modId,
"modGroup" to modGroup,
"modName" to modName,
"modAuthor" to modAuthor,
"modDescription" to modDescription,
"modCredits" to modCredits,
"modIcon" to modIcon,
"gameVersion" to gameVersion
)
val baseModMetadataTokens =
mapOf(
"modId" to modId,
"modGroup" to modGroup,
"modName" to modName,
"modAuthor" to modAuthor,
"modDescription" to modDescription,
"modCredits" to modCredits,
"modIcon" to modIcon,
"gameVersion" to gameVersion,
)

fun currentModVersion(): String {
val dynamic = (findProperty("modVersion") as? String)?.trim()
Expand All @@ -41,25 +45,24 @@ fun currentModVersion(): String {
throw GradleException("Missing required property 'modVersion' for mc-forge-1-7-10-demo module.")
}

fun currentModMetadataTokens(): Map<String, String> {
return baseModMetadataTokens + ("modVersion" to currentModVersion())
}
fun currentModMetadataTokens(): Map<String, String> = baseModMetadataTokens + ("modVersion" to currentModVersion())

fun hotReloadAgentLibraryFile(): File {
val explicitLibraryName = hotReloadAgentLibraryName?.trim()?.takeIf { it.isNotEmpty() }
val osName = System.getProperty("os.name")?.lowercase()
val libraryName = explicitLibraryName ?: when {
osName == null -> throw GradleException(
"Unable to determine current operating system for DSGL hot-reload agent, and 'hotReloadAgentLibraryName' is not set."
)

osName.startsWith("windows") -> "dsgl_hot_reload_agent.dll"
osName.startsWith("linux") -> "libdsgl_hot_reload_agent.so"
osName.startsWith("mac") || osName.startsWith("darwin") -> "libdsgl_hot_reload_agent.dylib"
else -> throw GradleException(
"Unsupported operating system for DSGL hot-reload agent: $osName, and 'hotReloadAgentLibraryName' is not set."
)
}
val libraryName =
explicitLibraryName ?: when {
osName == null -> throw GradleException(
"Unable to determine current operating system for DSGL hot-reload agent, and 'hotReloadAgentLibraryName' is not set.",
)

osName.startsWith("windows") -> "dsgl_hot_reload_agent.dll"
osName.startsWith("linux") -> "libdsgl_hot_reload_agent.so"
osName.startsWith("mac") || osName.startsWith("darwin") -> "libdsgl_hot_reload_agent.dylib"
else -> throw GradleException(
"Unsupported operating system for DSGL hot-reload agent: $osName, and 'hotReloadAgentLibraryName' is not set.",
)
}

return project.rootDir.resolve("dsgl-hot-reload-agent/target/release/$libraryName")
}
Expand Down Expand Up @@ -93,22 +96,24 @@ val generateModMetadata by tasks.registering {
const val MOD_CREDITS: String = "${tokens["modCredits"]}"
const val MOD_ICON: String = "${tokens["modIcon"]}"
}
""".trimIndent()
""".trimIndent() + System.lineSeparator(),
)
}
}

tasks {
runClient {
var jvmArgs = listOf(
"-Ddsgl.msdf.debug=$msdfDebug",
"-Ddsgl.msdf.debug.decorations=$msdfDebugDecorations",
"-Ddsgl.msdf.debug.performance=$msdfDebugPerformance",
"-Ddsgl.rebuild.trace=$rebuildTrace",
"-Ddsgl.perf.debug=$perfDebug",
"-Ddsgl.overlay.debug=$dsglOverlayDebug",
"-Ddsgl.overlay.controls=$dsglOverlayControls",
)
var jvmArgs =
listOf(
"-Ddsgl.msdf.debug=$msdfDebug",
"-Ddsgl.msdf.debug.decorations=$msdfDebugDecorations",
"-Ddsgl.msdf.debug.performance=$msdfDebugPerformance",
"-Ddsgl.rebuild.trace=$rebuildTrace",
"-Ddsgl.perf.debug=$perfDebug",
"-Ddsgl.domain.debug=$dsglDomainDebug",
"-Ddsgl.domain.controls=$dsglDomainControls",
"-Ddsgl.colorPicker.debugCounters=$dsglColorPickerDebugCounters",
)

if (hotReload.toBoolean()) {
jvmArgs = jvmArgs + listOf("-agentpath:${hotReloadAgentLibraryFile().absolutePath}")
Expand All @@ -131,7 +136,10 @@ tasks {
}

kotlin {
sourceSets.getByName("main").kotlin.srcDir(generatedModMetadataDir)
sourceSets
.getByName("main")
.kotlin
.srcDir(generatedModMetadataDir)
}

tasks.named("compileKotlin") {
Expand All @@ -150,6 +158,10 @@ tasks.named("dokkaGeneratePublicationHtml") {
dependsOn(generateModMetadata)
}

tasks.matching { it.name.startsWith("runKtlintCheckOver") || it.name.startsWith("runKtlintFormatOver") }.configureEach {
dependsOn(generateModMetadata)
}

tasks.named<ProcessResources>("processResources") {
inputs.properties(baseModMetadataTokens)
inputs.property("modVersion", providers.provider { currentModVersion() })
Expand Down Expand Up @@ -182,6 +194,10 @@ listOf(
}
}

tasks.named<Test>("test") {
mustRunAfter(":adapters:mc-forge-1-7-10:reobf")
}

tasks.withType<PublishToMavenLocal>().configureEach {
enabled = false
}
Expand All @@ -203,8 +219,10 @@ repositories {
}

dependencies {
implementation("org.dreamfinity:dsgl-core:0.0.1")
implementation("org.dreamfinity:dsgl-mc-forge-1-7-10:0.0.1:dev")
implementation(project(":core"))
implementation(project(":adapters:mc-forge-1-7-10"))
// implementation("org.dreamfinity:dsgl-core:0.0.1")
// implementation("org.dreamfinity:dsgl-mc-forge-1-7-10:0.0.1:dev")
testImplementation(kotlin("test-junit"))
testImplementation(kotlin("test"))
}
Loading