Add custom cursor assets and deploy step
Add F4MouseCursor.png and F4MouseCursor.svg assets and wire up a CSS variable (--co-cursor) to use the custom cursor in the browser. Update styles.css to apply the cursor variable to body and interactive elements. Modify deploy-all.bat to create %PRISMA_ROOT%\misc and copy the PNG to %PRISMA_ROOT%\misc\cursor.png at deploy time, with a warning if the file is missing. This enables a consistent custom cursor for the PrismaUI_F4 runtime (runtime reads misc\cursor.png) while still providing a browser CSS fallback.
This commit is contained in:
@@ -45,6 +45,7 @@ if not exist "%PLUGINS_DIR%" mkdir "%PLUGINS_DIR%"
|
|||||||
if not exist "%VIEWS_DIR%" mkdir "%VIEWS_DIR%"
|
if not exist "%VIEWS_DIR%" mkdir "%VIEWS_DIR%"
|
||||||
if not exist "%LIBS_DIR%" mkdir "%LIBS_DIR%"
|
if not exist "%LIBS_DIR%" mkdir "%LIBS_DIR%"
|
||||||
if not exist "%RES_DIR%" mkdir "%RES_DIR%"
|
if not exist "%RES_DIR%" mkdir "%RES_DIR%"
|
||||||
|
if not exist "%PRISMA_ROOT%\misc" mkdir "%PRISMA_ROOT%\misc"
|
||||||
|
|
||||||
echo Deploying PrismaUI_F4 runtime...
|
echo Deploying PrismaUI_F4 runtime...
|
||||||
copy /Y "%PRISMA_DLL%" "%PLUGINS_DIR%\PrismaUI_F4.dll"
|
copy /Y "%PRISMA_DLL%" "%PLUGINS_DIR%\PrismaUI_F4.dll"
|
||||||
@@ -61,6 +62,13 @@ copy /Y "%CO_DLL%" "%PLUGINS_DIR%\CommonwealthOnline.dll"
|
|||||||
echo Deploying HTML views...
|
echo Deploying HTML views...
|
||||||
xcopy /Y /E /I "%SCRIPT_DIR%ui\views\*" "%VIEWS_DIR%\"
|
xcopy /Y /E /I "%SCRIPT_DIR%ui\views\*" "%VIEWS_DIR%\"
|
||||||
|
|
||||||
|
echo Deploying PrismaUI cursor...
|
||||||
|
if exist "%SCRIPT_DIR%ui\views\CommonwealthOnline\browser\assets\F4MouseCursor.png" (
|
||||||
|
copy /Y "%SCRIPT_DIR%ui\views\CommonwealthOnline\browser\assets\F4MouseCursor.png" "%PRISMA_ROOT%\misc\cursor.png"
|
||||||
|
) else (
|
||||||
|
echo WARNING: F4MouseCursor.png not found — PrismaUI will use no custom cursor.
|
||||||
|
)
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo Deployment complete.
|
echo Deployment complete.
|
||||||
echo %PLUGINS_DIR%\PrismaUI_F4.dll
|
echo %PLUGINS_DIR%\PrismaUI_F4.dll
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,14 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<svg id="Layer_2" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32.3 31.24">
|
||||||
|
<!-- Generator: Adobe Illustrator 30.5.1, SVG Export Plug-In . SVG Version: 2.1.4 Build 3) -->
|
||||||
|
<defs>
|
||||||
|
<style>
|
||||||
|
.st0 {
|
||||||
|
fill: #fff;
|
||||||
|
stroke: #000;
|
||||||
|
stroke-miterlimit: 10;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</defs>
|
||||||
|
<polygon class="st0" points="17.4 30.41 31.46 15.9 1.2 1.14 17.4 30.41"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 450 B |
@@ -42,6 +42,11 @@
|
|||||||
--co-font-md: clamp(13px, 1.05vw, 16px);
|
--co-font-md: clamp(13px, 1.05vw, 16px);
|
||||||
--co-font-lg: clamp(16px, 1.3vw, 20px);
|
--co-font-lg: clamp(16px, 1.3vw, 20px);
|
||||||
--co-nav-width: clamp(152px, 14vw, 196px);
|
--co-nav-width: clamp(152px, 14vw, 196px);
|
||||||
|
/*
|
||||||
|
* In-game cursor is rendered by PrismaUI_F4 from Data/PrismaUI_F4/misc/cursor.png
|
||||||
|
* (deployed from assets/F4MouseCursor.png). CSS cursor only applies in a browser.
|
||||||
|
*/
|
||||||
|
--co-cursor: url("./assets/F4MouseCursor.png") 1 1, default;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
@@ -61,6 +66,7 @@ body {
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
|
cursor: var(--co-cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.co-root {
|
.co-root {
|
||||||
@@ -151,7 +157,7 @@ body {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
cursor: pointer;
|
cursor: var(--co-cursor);
|
||||||
transition: background var(--co-transition), color var(--co-transition);
|
transition: background var(--co-transition), color var(--co-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,6 +357,7 @@ body {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
cursor: var(--co-cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.co-filter-input::placeholder {
|
.co-filter-input::placeholder {
|
||||||
@@ -371,7 +378,7 @@ body {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: var(--co-cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
.co-checkbox {
|
.co-checkbox {
|
||||||
@@ -404,7 +411,7 @@ body {
|
|||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
cursor: pointer;
|
cursor: var(--co-cursor);
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
transition: background var(--co-transition);
|
transition: background var(--co-transition);
|
||||||
@@ -456,7 +463,7 @@ body {
|
|||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
font-size: var(--co-font-md);
|
font-size: var(--co-font-md);
|
||||||
line-height: 1.2;
|
line-height: 1.2;
|
||||||
cursor: pointer;
|
cursor: var(--co-cursor);
|
||||||
transition: background var(--co-transition);
|
transition: background var(--co-transition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user