Big UI Update
This commit is contained in:
parent
1f41614cd3
commit
5876e44e5d
|
|
@ -0,0 +1,256 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="AppSetting.svg"
|
||||
inkscape:version="1.4.3 (0d15f75, 2025-12-25)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs8"><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient77490"><stop
|
||||
style="stop-color:#62697d;stop-opacity:0.4700855;"
|
||||
offset="0"
|
||||
id="stop77486" /><stop
|
||||
style="stop-color:#9f9f9f;stop-opacity:0.49019608;"
|
||||
offset="0.30279347"
|
||||
id="stop36247" /><stop
|
||||
style="stop-color:#444a5a;stop-opacity:0.50196078;"
|
||||
offset="0.47589374"
|
||||
id="stop36239" /><stop
|
||||
style="stop-color:#393e4d;stop-opacity:0.50980392;"
|
||||
offset="0.64751673"
|
||||
id="stop36245" /><stop
|
||||
style="stop-color:#6b7695;stop-opacity:0.52156866;"
|
||||
offset="0.76340932"
|
||||
id="stop36241" /><stop
|
||||
style="stop-color:#2e323f;stop-opacity:0.5254902;"
|
||||
offset="0.83444887"
|
||||
id="stop36243" /><stop
|
||||
style="stop-color:#252834;stop-opacity:0.54131055;"
|
||||
offset="1"
|
||||
id="stop77488" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient77204"><stop
|
||||
style="stop-color:#76768e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop77200" /><stop
|
||||
style="stop-color:#4f5162;stop-opacity:1;"
|
||||
offset="0.24739842"
|
||||
id="stop77478" /><stop
|
||||
style="stop-color:#61647b;stop-opacity:1;"
|
||||
offset="0.36760059"
|
||||
id="stop77480" /><stop
|
||||
style="stop-color:#41475c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop77202" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient73856"><stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop73852" /><stop
|
||||
style="stop-color:#f7f8f9;stop-opacity:1;"
|
||||
offset="0.15093437"
|
||||
id="stop77494" /><stop
|
||||
style="stop-color:#ccd0d6;stop-opacity:1;"
|
||||
offset="0.53578031"
|
||||
id="stop73860" /><stop
|
||||
style="stop-color:#516499;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop73854" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient60170"><stop
|
||||
style="stop-color:#78301a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop60166" /><stop
|
||||
style="stop-color:#310000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop60168" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient24591"><stop
|
||||
style="stop-color:#c1cedc;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop24587" /><stop
|
||||
style="stop-color:#67707d;stop-opacity:1;"
|
||||
offset="0.24085273"
|
||||
id="stop77482" /><stop
|
||||
style="stop-color:#07123c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop24589" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient3074"><stop
|
||||
style="stop-color:#e26708;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3070" /><stop
|
||||
style="stop-color:#bb3c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3072" /></linearGradient><radialGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="radialGradient3076"
|
||||
cx="30.688875"
|
||||
cy="30.069115"
|
||||
fx="30.688875"
|
||||
fy="30.069115"
|
||||
r="14.05412"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient45010"
|
||||
x1="-31.87768"
|
||||
y1="22.065159"
|
||||
x2="-31.87768"
|
||||
y2="48.78738"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(101.16951,-6.5921995)" /><linearGradient
|
||||
id="linearGradient45008"><stop
|
||||
style="stop-color:#e14500;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop45004" /><stop
|
||||
style="stop-color:#e17900;stop-opacity:1;"
|
||||
offset="0.59811592"
|
||||
id="stop45012" /><stop
|
||||
style="stop-color:#e19c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop45006" /></linearGradient><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient46715"
|
||||
x1="31.917692"
|
||||
y1="47.524929"
|
||||
x2="31.917692"
|
||||
y2="22.632998"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(1.7923447e-6)" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient24591"
|
||||
id="radialGradient24593"
|
||||
cx="28.537519"
|
||||
cy="30.511093"
|
||||
fx="28.537519"
|
||||
fy="30.511093"
|
||||
r="14.43763"
|
||||
gradientTransform="matrix(1.8873776,0.06374501,-0.06164875,1.8253109,-25.071074,-26.320734)"
|
||||
gradientUnits="userSpaceOnUse" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient60170"
|
||||
id="radialGradient60172"
|
||||
cx="30.161018"
|
||||
cy="31.84569"
|
||||
fx="30.161018"
|
||||
fy="31.84569"
|
||||
r="11.088487"
|
||||
gradientTransform="matrix(2.1004139,-0.05135265,0.03945865,1.6139284,-35.290433,-18.913211)"
|
||||
gradientUnits="userSpaceOnUse" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient73856"
|
||||
id="radialGradient73858"
|
||||
cx="30.094763"
|
||||
cy="30.901455"
|
||||
fx="30.094763"
|
||||
fy="30.901455"
|
||||
r="11.518468"
|
||||
gradientTransform="matrix(1.9666691,0,0,2.2620107,-29.031376,-41.255218)"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient77204"
|
||||
id="linearGradient77206"
|
||||
x1="21.036707"
|
||||
y1="18.385275"
|
||||
x2="32.959541"
|
||||
y2="54.450584"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0165267,0,0,1.0165267,-0.53079592,-0.58713419)" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient77490"
|
||||
id="linearGradient77492"
|
||||
x1="15.632637"
|
||||
y1="25.657946"
|
||||
x2="36.755505"
|
||||
y2="51.227448"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.86580682,0,0,0.86580682,4.7175006,5.0444757)" /><radialGradient
|
||||
xlink:href="#linearGradient52829"
|
||||
id="radialGradient52831"
|
||||
cx="28.653395"
|
||||
cy="30.427906"
|
||||
fx="28.653395"
|
||||
fy="30.427906"
|
||||
r="14.43763"
|
||||
gradientTransform="matrix(0.77488503,0,0,0.75944889,-16.265584,-17.889691)"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
id="linearGradient52829"><stop
|
||||
style="stop-color:#a6ff71;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52825" /><stop
|
||||
style="stop-color:#00ce3f;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52827" /></linearGradient><linearGradient
|
||||
xlink:href="#linearGradient52837"
|
||||
id="linearGradient52839"
|
||||
x1="30.535707"
|
||||
y1="49.245953"
|
||||
x2="30.584797"
|
||||
y2="23.731167"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
id="linearGradient52837"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52833" /><stop
|
||||
style="stop-color:#202020;stop-opacity:1;"
|
||||
offset="0.45217207"
|
||||
id="stop52854" /><stop
|
||||
style="stop-color:#434343;stop-opacity:1;"
|
||||
offset="0.56019127"
|
||||
id="stop52852" /><stop
|
||||
style="stop-color:#2f2f2f;stop-opacity:1;"
|
||||
offset="0.65142226"
|
||||
id="stop52850" /><stop
|
||||
style="stop-color:#494949;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52835" /></linearGradient></defs><sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
showgrid="false"
|
||||
inkscape:zoom="5.656855"
|
||||
inkscape:cx="13.523415"
|
||||
inkscape:cy="9.4575519"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" /><rect
|
||||
style="fill:url(#radialGradient52831);fill-opacity:1;stroke:none;stroke-width:1.04;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
id="rect18059"
|
||||
width="15.6875"
|
||||
height="15.374999"
|
||||
x="0.15624996"
|
||||
y="0.31249994"
|
||||
ry="1.6874999" /><g
|
||||
id="g6"
|
||||
transform="matrix(0.54328517,0,0,0.54328517,-9.4489315,-8.2907206)"><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:73.6262;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect5"
|
||||
width="24.414881"
|
||||
height="3.0589514"
|
||||
x="19.808071"
|
||||
y="28.454876"
|
||||
ry="1.5294757" /></g><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:64.3696;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect6"
|
||||
width="5.4386683"
|
||||
height="5.7523398"
|
||||
x="5.394135"
|
||||
y="5.2324848"
|
||||
ry="2.8247054" /></svg>
|
||||
|
After Width: | Height: | Size: 9.3 KiB |
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bmwow4y720y33"
|
||||
path="res://.godot/imported/AppSetting.svg-8d628f4fbcffee62d24cc3be49835a1b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/rokojori_action_library/Icons/AppSetting.svg"
|
||||
dest_files=["res://.godot/imported/AppSetting.svg-8d628f4fbcffee62d24cc3be49835a1b.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
@ -0,0 +1,288 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="AppSettingsCategory.svg"
|
||||
inkscape:version="1.4.3 (0d15f75, 2025-12-25)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs8"><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient77490"><stop
|
||||
style="stop-color:#62697d;stop-opacity:0.4700855;"
|
||||
offset="0"
|
||||
id="stop77486" /><stop
|
||||
style="stop-color:#9f9f9f;stop-opacity:0.49019608;"
|
||||
offset="0.30279347"
|
||||
id="stop36247" /><stop
|
||||
style="stop-color:#444a5a;stop-opacity:0.50196078;"
|
||||
offset="0.47589374"
|
||||
id="stop36239" /><stop
|
||||
style="stop-color:#393e4d;stop-opacity:0.50980392;"
|
||||
offset="0.64751673"
|
||||
id="stop36245" /><stop
|
||||
style="stop-color:#6b7695;stop-opacity:0.52156866;"
|
||||
offset="0.76340932"
|
||||
id="stop36241" /><stop
|
||||
style="stop-color:#2e323f;stop-opacity:0.5254902;"
|
||||
offset="0.83444887"
|
||||
id="stop36243" /><stop
|
||||
style="stop-color:#252834;stop-opacity:0.54131055;"
|
||||
offset="1"
|
||||
id="stop77488" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient77204"><stop
|
||||
style="stop-color:#76768e;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop77200" /><stop
|
||||
style="stop-color:#4f5162;stop-opacity:1;"
|
||||
offset="0.24739842"
|
||||
id="stop77478" /><stop
|
||||
style="stop-color:#61647b;stop-opacity:1;"
|
||||
offset="0.36760059"
|
||||
id="stop77480" /><stop
|
||||
style="stop-color:#41475c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop77202" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient73856"><stop
|
||||
style="stop-color:#ffffff;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop73852" /><stop
|
||||
style="stop-color:#f7f8f9;stop-opacity:1;"
|
||||
offset="0.15093437"
|
||||
id="stop77494" /><stop
|
||||
style="stop-color:#ccd0d6;stop-opacity:1;"
|
||||
offset="0.53578031"
|
||||
id="stop73860" /><stop
|
||||
style="stop-color:#516499;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop73854" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient60170"><stop
|
||||
style="stop-color:#78301a;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop60166" /><stop
|
||||
style="stop-color:#310000;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop60168" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient24591"><stop
|
||||
style="stop-color:#c1cedc;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop24587" /><stop
|
||||
style="stop-color:#67707d;stop-opacity:1;"
|
||||
offset="0.24085273"
|
||||
id="stop77482" /><stop
|
||||
style="stop-color:#07123c;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop24589" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient3074"><stop
|
||||
style="stop-color:#e26708;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3070" /><stop
|
||||
style="stop-color:#bb3c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3072" /></linearGradient><radialGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="radialGradient3076"
|
||||
cx="30.688875"
|
||||
cy="30.069115"
|
||||
fx="30.688875"
|
||||
fy="30.069115"
|
||||
r="14.05412"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient45010"
|
||||
x1="-31.87768"
|
||||
y1="22.065159"
|
||||
x2="-31.87768"
|
||||
y2="48.78738"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(101.16951,-6.5921995)" /><linearGradient
|
||||
id="linearGradient45008"><stop
|
||||
style="stop-color:#e14500;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop45004" /><stop
|
||||
style="stop-color:#e17900;stop-opacity:1;"
|
||||
offset="0.59811592"
|
||||
id="stop45012" /><stop
|
||||
style="stop-color:#e19c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop45006" /></linearGradient><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient46715"
|
||||
x1="31.917692"
|
||||
y1="47.524929"
|
||||
x2="31.917692"
|
||||
y2="22.632998"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(1.7923447e-6)" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient24591"
|
||||
id="radialGradient24593"
|
||||
cx="28.537519"
|
||||
cy="30.511093"
|
||||
fx="28.537519"
|
||||
fy="30.511093"
|
||||
r="14.43763"
|
||||
gradientTransform="matrix(1.8873776,0.06374501,-0.06164875,1.8253109,-25.071074,-26.320734)"
|
||||
gradientUnits="userSpaceOnUse" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient60170"
|
||||
id="radialGradient60172"
|
||||
cx="30.161018"
|
||||
cy="31.84569"
|
||||
fx="30.161018"
|
||||
fy="31.84569"
|
||||
r="11.088487"
|
||||
gradientTransform="matrix(2.1004139,-0.05135265,0.03945865,1.6139284,-35.290433,-18.913211)"
|
||||
gradientUnits="userSpaceOnUse" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient73856"
|
||||
id="radialGradient73858"
|
||||
cx="30.094763"
|
||||
cy="30.901455"
|
||||
fx="30.094763"
|
||||
fy="30.901455"
|
||||
r="11.518468"
|
||||
gradientTransform="matrix(1.9666691,0,0,2.2620107,-29.031376,-41.255218)"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient77204"
|
||||
id="linearGradient77206"
|
||||
x1="21.036707"
|
||||
y1="18.385275"
|
||||
x2="32.959541"
|
||||
y2="54.450584"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1.0165267,0,0,1.0165267,-0.53079592,-0.58713419)" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient77490"
|
||||
id="linearGradient77492"
|
||||
x1="15.632637"
|
||||
y1="25.657946"
|
||||
x2="36.755505"
|
||||
y2="51.227448"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.86580682,0,0,0.86580682,4.7175006,5.0444757)" /><radialGradient
|
||||
xlink:href="#linearGradient52829"
|
||||
id="radialGradient52831"
|
||||
cx="28.653395"
|
||||
cy="30.427906"
|
||||
fx="28.653395"
|
||||
fy="30.427906"
|
||||
r="14.43763"
|
||||
gradientTransform="matrix(1.4262952,0,0,1.3978826,-12.547099,-12.127595)"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
id="linearGradient52829"><stop
|
||||
style="stop-color:#a6ff71;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52825" /><stop
|
||||
style="stop-color:#00ce3f;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52827" /></linearGradient><linearGradient
|
||||
xlink:href="#linearGradient52837"
|
||||
id="linearGradient52839"
|
||||
x1="30.535707"
|
||||
y1="49.245953"
|
||||
x2="30.584797"
|
||||
y2="23.731167"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
id="linearGradient52837"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52833" /><stop
|
||||
style="stop-color:#202020;stop-opacity:1;"
|
||||
offset="0.45217207"
|
||||
id="stop52854" /><stop
|
||||
style="stop-color:#434343;stop-opacity:1;"
|
||||
offset="0.56019127"
|
||||
id="stop52852" /><stop
|
||||
style="stop-color:#2f2f2f;stop-opacity:1;"
|
||||
offset="0.65142226"
|
||||
id="stop52850" /><stop
|
||||
style="stop-color:#494949;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52835" /></linearGradient></defs><sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
showgrid="false"
|
||||
inkscape:zoom="22.62742"
|
||||
inkscape:cx="15.711027"
|
||||
inkscape:cy="5.8557273"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg4" /><g
|
||||
id="g2210"
|
||||
transform="matrix(0.54328517,0,0,0.54328517,-9.4489315,-11.300948)"><rect
|
||||
style="fill:url(#radialGradient52831);fill-opacity:1;stroke:none;stroke-width:1.91428;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
id="rect18059"
|
||||
width="28.875259"
|
||||
height="28.300053"
|
||||
x="17.679815"
|
||||
y="21.376339"
|
||||
ry="3.1061034" /><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:73.6262;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect1"
|
||||
width="24.414881"
|
||||
height="3.0589514"
|
||||
x="19.808071"
|
||||
y="25.203995"
|
||||
ry="1.5294757" /><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:72.1888;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect2"
|
||||
width="6.0993176"
|
||||
height="6.4510913"
|
||||
x="24.023951"
|
||||
y="23.41259"
|
||||
ry="3.1678295" /><g
|
||||
id="g4"
|
||||
transform="translate(0,14.207546)"><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:73.6262;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect3"
|
||||
width="24.414881"
|
||||
height="3.0589514"
|
||||
x="19.808071"
|
||||
y="28.454876"
|
||||
ry="1.5294757" /></g><g
|
||||
id="g6"
|
||||
transform="translate(0,5.6221333)"><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:73.6262;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect5"
|
||||
width="24.414881"
|
||||
height="3.0589514"
|
||||
x="19.808071"
|
||||
y="28.454876"
|
||||
ry="1.5294757" /></g></g><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:39.2191;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect6"
|
||||
width="3.3136687"
|
||||
height="3.5047822"
|
||||
x="9.1966734"
|
||||
y="6.3562636"
|
||||
ry="1.7210348" /><rect
|
||||
style="fill:#000000;fill-opacity:1;stroke-width:39.2191;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect7"
|
||||
width="3.3136687"
|
||||
height="3.5047822"
|
||||
x="6.2591739"
|
||||
y="11.012513"
|
||||
ry="1.7210348" /></svg>
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxn0doccbmdkk"
|
||||
path="res://.godot/imported/AppSettingsCategory.svg-fc090dc93be0f63fc2716bd8b27285c6.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/rokojori_action_library/Icons/AppSettingsCategory.svg"
|
||||
dest_files=["res://.godot/imported/AppSettingsCategory.svg-fc090dc93be0f63fc2716bd8b27285c6.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
height="16"
|
||||
viewBox="0 0 16 16"
|
||||
width="16"
|
||||
version="1.1"
|
||||
id="svg4"
|
||||
sodipodi:docname="UIStyle.svg"
|
||||
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs8"><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient52847"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52843" /><stop
|
||||
style="stop-color:#a6a6a6;stop-opacity:0;"
|
||||
offset="1"
|
||||
id="stop52845" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient52837"><stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52833" /><stop
|
||||
style="stop-color:#202020;stop-opacity:1;"
|
||||
offset="0.45217207"
|
||||
id="stop52854" /><stop
|
||||
style="stop-color:#434343;stop-opacity:1;"
|
||||
offset="0.56019127"
|
||||
id="stop52852" /><stop
|
||||
style="stop-color:#2f2f2f;stop-opacity:1;"
|
||||
offset="0.65142226"
|
||||
id="stop52850" /><stop
|
||||
style="stop-color:#494949;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52835" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient52829"><stop
|
||||
style="stop-color:#a6ff71;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop52825" /><stop
|
||||
style="stop-color:#00ce3f;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop52827" /></linearGradient><linearGradient
|
||||
inkscape:collect="never"
|
||||
id="linearGradient3074"><stop
|
||||
style="stop-color:#e26708;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop3070" /><stop
|
||||
style="stop-color:#bb3c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop3072" /></linearGradient><radialGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="radialGradient3076"
|
||||
cx="30.688875"
|
||||
cy="30.069115"
|
||||
fx="30.688875"
|
||||
fy="30.069115"
|
||||
r="14.05412"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient45010"
|
||||
x1="-31.87768"
|
||||
y1="22.065159"
|
||||
x2="-31.87768"
|
||||
y2="48.78738"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(101.16951,-6.5921995)" /><linearGradient
|
||||
id="linearGradient45008"><stop
|
||||
style="stop-color:#e14500;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop45004" /><stop
|
||||
style="stop-color:#e17900;stop-opacity:1;"
|
||||
offset="0.59811592"
|
||||
id="stop45012" /><stop
|
||||
style="stop-color:#e19c00;stop-opacity:1;"
|
||||
offset="1"
|
||||
id="stop45006" /></linearGradient><linearGradient
|
||||
xlink:href="#linearGradient45008"
|
||||
id="linearGradient46715"
|
||||
x1="31.917692"
|
||||
y1="47.524929"
|
||||
x2="31.917692"
|
||||
y2="22.632998"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(1.7923447e-6)" /><radialGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient52829"
|
||||
id="radialGradient52831"
|
||||
cx="28.653395"
|
||||
cy="30.427906"
|
||||
fx="28.653395"
|
||||
fy="30.427906"
|
||||
r="14.43763"
|
||||
gradientTransform="matrix(1.4262952,0,0,1.3978826,-12.547099,-12.127595)"
|
||||
gradientUnits="userSpaceOnUse" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient52837"
|
||||
id="linearGradient52839"
|
||||
x1="30.535707"
|
||||
y1="49.245953"
|
||||
x2="30.584797"
|
||||
y2="23.731167"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(0.55406055,0,0,0.55406055,14.322436,9.5153603)" /><linearGradient
|
||||
inkscape:collect="never"
|
||||
xlink:href="#linearGradient52847"
|
||||
id="linearGradient52841"
|
||||
x1="37.60751"
|
||||
y1="35.228773"
|
||||
x2="41.117046"
|
||||
y2="35.228773"
|
||||
gradientUnits="userSpaceOnUse" /></defs><sodipodi:namedview
|
||||
id="namedview6"
|
||||
pagecolor="#505050"
|
||||
bordercolor="#eeeeee"
|
||||
borderopacity="1"
|
||||
inkscape:showpageshadow="0"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#505050"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.0000002"
|
||||
inkscape:cx="-48.374998"
|
||||
inkscape:cy="-20.499999"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g2210" /><g
|
||||
id="g2210"
|
||||
transform="matrix(0.54328517,0,0,0.54328517,-9.4489315,-11.300948)"><rect
|
||||
style="fill:url(#radialGradient52831);fill-opacity:1;stroke:none;stroke-width:1.91428;stroke-linecap:round;stroke-linejoin:miter;stroke-dasharray:none;stroke-opacity:1;paint-order:markers stroke fill"
|
||||
id="rect18059"
|
||||
width="28.875259"
|
||||
height="28.300053"
|
||||
x="17.679815"
|
||||
y="21.376339"
|
||||
ry="3.1061034" /><path
|
||||
id="path52091"
|
||||
style="font-weight:bold;font-size:20.5236px;line-height:1;font-family:Jost;-inkscape-font-specification:'Jost Bold';fill:url(#linearGradient52839);fill-opacity:1;stroke-width:0.79173;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.391011;paint-order:stroke fill markers"
|
||||
d="m 27.131813,25.054052 v 5.344168 c 0,0.500338 0.07982,0.937191 0.239023,1.308654 0.159198,0.363881 0.381193,0.670071 0.669266,0.92024 0.295654,0.242588 0.637193,0.422098 1.023817,0.535812 0.386625,0.121293 0.807989,0.181259 1.262841,0.181259 0.439691,0 0.852315,-0.05997 1.238939,-0.181259 0.394205,-0.113714 0.735745,-0.293224 1.023817,-0.535812 0.295655,-0.250169 0.522019,-0.556359 0.681218,-0.92024 0.166779,-0.371463 0.250974,-0.808316 0.250974,-1.308654 v -5.344168 h -1.922147 v 5.208721 c 0,0.272912 -0.04885,0.510395 -0.147398,0.715079 -0.09097,0.197102 -0.230761,0.354374 -0.420283,0.468088 -0.181941,0.113713 -0.412676,0.169308 -0.693168,0.169308 -0.295654,0 -0.539501,-0.05559 -0.729022,-0.169308 -0.181941,-0.113714 -0.321732,-0.270986 -0.420283,-0.468088 -0.09855,-0.204684 -0.147398,-0.442167 -0.147398,-0.715079 v -5.208721 z m 8.027207,0 v 7.959484 h 1.944057 v -7.959484 z" /><rect
|
||||
style="opacity:0.460317;fill:#262626;stroke:none;stroke-width:55.2196;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect22643"
|
||||
width="1.840654"
|
||||
height="1.840654"
|
||||
x="-24.942825"
|
||||
y="-13.826168"
|
||||
ry="5.5219617" /><rect
|
||||
style="opacity:0.460317;fill:#262626;stroke:none;stroke-width:55.2196;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect25249"
|
||||
width="22.202887"
|
||||
height="2.3008175"
|
||||
x="21.18856"
|
||||
y="37.021896"
|
||||
ry="1.1504087" /><rect
|
||||
style="opacity:0.460317;fill:#262626;stroke:none;stroke-width:55.2196;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect25251"
|
||||
width="22.202887"
|
||||
height="2.3008175"
|
||||
x="21.18856"
|
||||
y="40.473122"
|
||||
ry="1.1504087" /><rect
|
||||
style="opacity:0.460317;fill:#262626;stroke:none;stroke-width:55.2196;stroke-linecap:round;stroke-linejoin:round;stroke-dashoffset:3.6;paint-order:stroke fill markers"
|
||||
id="rect25253"
|
||||
width="22.202887"
|
||||
height="2.3008175"
|
||||
x="21.18856"
|
||||
y="43.924347"
|
||||
ry="1.1504087" /></g></svg>
|
||||
|
After Width: | Height: | Size: 7.5 KiB |
|
|
@ -0,0 +1,43 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvypajorfxmwx"
|
||||
path="res://.godot/imported/UIStyle.svg-a608110861b4c944c77405733f78e151.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/rokojori_action_library/Icons/UIStyle.svg"
|
||||
dest_files=["res://.godot/imported/UIStyle.svg-a608110861b4c944c77405733f78e151.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
svg/scale=1.0
|
||||
editor/scale_with_editor_scale=false
|
||||
editor/convert_colors_with_editor_theme=false
|
||||
|
|
@ -16,6 +16,7 @@ namespace Rokojori
|
|||
public int sequencablesIndex = 0;
|
||||
bool cancelled = false;
|
||||
bool cancelledSequence = false;
|
||||
|
||||
|
||||
int _runID = -1;
|
||||
|
||||
|
|
@ -213,6 +214,7 @@ namespace Rokojori
|
|||
|
||||
// this.LogInfo( "Running" );
|
||||
|
||||
|
||||
var run = new ActionSequenceRunner();
|
||||
run.sequence = this;
|
||||
run.actions = new List<Action>( actions );
|
||||
|
|
|
|||
|
|
@ -12,12 +12,25 @@ namespace Rokojori
|
|||
[Export]
|
||||
public Action action;
|
||||
|
||||
[Export]
|
||||
public Action onCoolingDownAction;
|
||||
|
||||
[Export]
|
||||
public Duration coolDownDuration;
|
||||
|
||||
[Export]
|
||||
public bool retriggerCoolDown = false;
|
||||
|
||||
bool _isCoolingDown = false;
|
||||
int _coolDownID = -1;
|
||||
|
||||
bool _canRelease = false;
|
||||
|
||||
public bool CanRelease()
|
||||
{
|
||||
return _canRelease;
|
||||
}
|
||||
|
||||
public void RegisterCoolDown()
|
||||
{
|
||||
_isCoolingDown = coolDownDuration != null;
|
||||
|
|
@ -54,13 +67,23 @@ namespace Rokojori
|
|||
{
|
||||
if ( _isCoolingDown )
|
||||
{
|
||||
onCoolingDownAction?.Trigger();
|
||||
_canRelease = false;
|
||||
|
||||
if ( retriggerCoolDown )
|
||||
{
|
||||
RegisterCoolDown();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
_canRelease = true;
|
||||
|
||||
Trigger( action );
|
||||
RegisterCoolDown();
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
namespace Rokojori;
|
||||
|
||||
[Tool]
|
||||
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/ConditionalAction.svg")]
|
||||
public partial class CoolDownRelease : Action
|
||||
{
|
||||
[Export]
|
||||
public CoolDown coolDown;
|
||||
|
||||
[Export]
|
||||
public Action action;
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
if ( ! ( coolDown?.CanRelease() ?? true ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
action?.Trigger();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://b4ld8egl1pum
|
||||
|
|
@ -7,15 +7,32 @@ namespace Rokojori
|
|||
[Tool][GlobalClass]
|
||||
public partial class LoadScene : SequenceAction
|
||||
{
|
||||
[Export]
|
||||
[Export( PropertyHint.File )]
|
||||
public string scenePath;
|
||||
|
||||
[Export]
|
||||
public Node target;
|
||||
|
||||
[ExportGroup("Transforming")]
|
||||
[Export]
|
||||
public Node3D poseParent;
|
||||
|
||||
[Export]
|
||||
public Vector3 offsetTranslation = Vector3.Zero;
|
||||
|
||||
[Export]
|
||||
public Quaternion offsetRotation = Quaternion.Identity;
|
||||
|
||||
[Export]
|
||||
public Action onLoaded;
|
||||
|
||||
Node _loadedNode;
|
||||
|
||||
public Node GetLoadedNode()
|
||||
{
|
||||
return _loadedNode;
|
||||
}
|
||||
|
||||
bool _loading = false;
|
||||
int _id = -1;
|
||||
List<int> _cached = new List<int>();
|
||||
|
|
@ -40,6 +57,7 @@ namespace Rokojori
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public override void _Process ( double delta )
|
||||
{
|
||||
if ( ! _loading )
|
||||
|
|
@ -58,8 +76,24 @@ namespace Rokojori
|
|||
|
||||
var packedScene = (PackedScene) ResourceLoader.LoadThreadedGet( scenePath );
|
||||
var node = packedScene.Instantiate();
|
||||
target.AddChild( node );
|
||||
_loadedNode = node;
|
||||
target.AddChild( node );
|
||||
node.Owner = target.Owner;
|
||||
|
||||
if ( node is Node3D n3D )
|
||||
{
|
||||
if ( poseParent != null )
|
||||
{
|
||||
Pose.From( poseParent ).Set( n3D );
|
||||
}
|
||||
|
||||
n3D.GlobalPosition = n3D.GlobalPosition + offsetTranslation;
|
||||
n3D.SetGlobalQuaternion( n3D.GlobalQuaternion() * offsetRotation );
|
||||
}
|
||||
|
||||
Action.Trigger( onLoaded );
|
||||
|
||||
_loadedNode = null;
|
||||
DispatchEnd( _id );
|
||||
_id = -1;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,21 +7,60 @@ namespace Rokojori
|
|||
[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")]
|
||||
public partial class SetNodeState : Action
|
||||
{
|
||||
[Export]
|
||||
public Node[] enable = new Node[ 0 ];
|
||||
|
||||
|
||||
[Export]
|
||||
public Node[] disable = new Node[ 0 ];
|
||||
public Node[] enable = [];
|
||||
|
||||
[Export]
|
||||
public Node[] disable = [];
|
||||
|
||||
[ExportGroup( "Reference")]
|
||||
[Export]
|
||||
public SetNodeState reference;
|
||||
|
||||
[Export]
|
||||
public bool inverseReference = false;
|
||||
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
CallDeferred( "SetStates" );
|
||||
this.CallDeferred(
|
||||
()=>
|
||||
{
|
||||
var map = new System.Collections.Generic.HashSet<SetNodeState>();
|
||||
SetStates( map, false, inverseReference );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
void SetStates()
|
||||
public void SetStates( System.Collections.Generic.HashSet<SetNodeState> callMap, bool inverse, bool referenceInverse )
|
||||
{
|
||||
Arrays.ForEach( enable, n => NodeState.Enable( n ) );
|
||||
Arrays.ForEach( disable, n => NodeState.Disable( n ) );
|
||||
if ( callMap.Contains( this ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
callMap.Add( this );
|
||||
|
||||
if ( inverse )
|
||||
{
|
||||
Arrays.ForEach( enable, n => NodeState.Disable( n ) );
|
||||
Arrays.ForEach( disable, n => NodeState.Enable( n ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
Arrays.ForEach( enable, n => NodeState.Enable( n ) );
|
||||
Arrays.ForEach( disable, n => NodeState.Disable( n ) );
|
||||
}
|
||||
|
||||
if ( reference == null )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
reference.SetStates( callMap, referenceInverse, referenceInverse );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Rokojori
|
|||
return particles3D;
|
||||
}
|
||||
|
||||
return _pool.Find( p => ! p.Emitting );
|
||||
return _pool.Find( p => ! IsEmitting( p ) );
|
||||
}
|
||||
|
||||
GpuParticles3D DuplicateParticles()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool][GlobalClass ]
|
||||
public partial class CancelSequenceAction : Action
|
||||
{
|
||||
[Export]
|
||||
public SequenceAction sequence;
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
sequence?.CancelAllRunning();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cwbkharqngylr
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
|
|
@ -30,7 +31,8 @@ namespace Rokojori
|
|||
|
||||
[Export]
|
||||
public int[] runningSequences = [];
|
||||
|
||||
|
||||
HashSet<int> _running = new HashSet<int>();
|
||||
|
||||
int _dispatchCounter = 0;
|
||||
|
||||
|
|
@ -50,11 +52,15 @@ namespace Rokojori
|
|||
runningSequences = runningSequences.Add( _dispatchCounter );
|
||||
}
|
||||
|
||||
_running.Add( _dispatchCounter );
|
||||
|
||||
return _dispatchCounter;
|
||||
}
|
||||
|
||||
public void DispatchEnd( int id )
|
||||
{
|
||||
_running.Remove( id );
|
||||
|
||||
var ev = new SequenceActionFinishedEvent{ id = id, success = true };
|
||||
onSequenceDone.DispatchEvent( ev );
|
||||
|
||||
|
|
@ -62,10 +68,14 @@ namespace Rokojori
|
|||
{
|
||||
runningSequences = runningSequences.Remove( _dispatchCounter );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void DispatchCancelled( int id )
|
||||
{
|
||||
_running.Remove( id );
|
||||
|
||||
var ev = new SequenceActionFinishedEvent{ id = id, success = true };
|
||||
onSequenceDone.DispatchEvent( ev );
|
||||
|
||||
|
|
@ -73,6 +83,20 @@ namespace Rokojori
|
|||
{
|
||||
runningSequences = runningSequences.Remove( _dispatchCounter );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public virtual void CancelAllRunning()
|
||||
{
|
||||
var runningList = _running.ToArray();
|
||||
|
||||
runningList.ForEach(
|
||||
( id )=>
|
||||
{
|
||||
CancelAction( id );
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public virtual void CancelAction( int id )
|
||||
|
|
|
|||
|
|
@ -29,22 +29,24 @@ namespace Rokojori
|
|||
protected override void _OnTrigger()
|
||||
{
|
||||
|
||||
var currentState = GetTree().Paused;
|
||||
var isCurrentlyPaused = GetTree().Paused;
|
||||
|
||||
var nextState = Mode.Toggle == mode ? ! currentState : Mode.Pause == mode ? false : true;
|
||||
var nextIsPaused = Mode.Toggle == mode ? ! isCurrentlyPaused :
|
||||
Mode.Pause == mode ? true : false;
|
||||
|
||||
this.LogInfo( "SetPauseState", currentState, ">>", nextState );
|
||||
this.LogInfo( "SetPauseState: is paused", isCurrentlyPaused, ">> next is paused", nextIsPaused );
|
||||
|
||||
if ( currentState == nextState && onlyTriggerOnChange )
|
||||
if ( isCurrentlyPaused == nextIsPaused && onlyTriggerOnChange )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
this.LogInfo( "Setting Pause State", nextState );
|
||||
GetTree().Paused = nextState;
|
||||
this.LogInfo( "Setting Paused State", nextIsPaused );
|
||||
|
||||
GetTree().Paused = nextIsPaused;
|
||||
|
||||
if ( nextState )
|
||||
if ( nextIsPaused )
|
||||
{
|
||||
Action.Trigger( onPausing );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
using System.Linq;
|
||||
using Godot;
|
||||
|
||||
|
||||
|
|
@ -16,15 +17,27 @@ namespace Rokojori
|
|||
[Export]
|
||||
public NodeStateConfiguration muteConifiguration;
|
||||
|
||||
[Export]
|
||||
public Node[] ignore = [];
|
||||
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
var parent = soloNode.GetParent();
|
||||
|
||||
var soloConfig = soloConfiguration ?? NodeStateConfiguration.AllOn();
|
||||
var muteConfig = muteConifiguration ?? NodeStateConfiguration.AllOff();
|
||||
|
||||
|
||||
parent.ForEachDirectChild<Node>(
|
||||
n =>
|
||||
{
|
||||
var configuration = soloNode == n ? soloConfiguration : muteConifiguration;
|
||||
if ( ignore != null && ignore.Contains( n ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var configuration = soloNode == n ? soloConfig : muteConfig;
|
||||
NodeState.Configure( n, configuration );
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Rokojori
|
|||
if ( type == TimeLineSpanUpdateType.End )
|
||||
{
|
||||
DispatchEnd( sequenceID );
|
||||
// this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
|
||||
this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
|
||||
}
|
||||
},
|
||||
this
|
||||
|
|
|
|||
|
|
@ -0,0 +1,55 @@
|
|||
|
||||
using Godot;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Delay.svg")]
|
||||
public partial class DelayFrames : SequenceAction
|
||||
{
|
||||
[Export]
|
||||
public int numFrames;
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
var sequenceID = DispatchStart();
|
||||
|
||||
// this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
|
||||
|
||||
if ( Engine.IsEditorHint() )
|
||||
{
|
||||
var timeLine = TimeLineManager.Ensure( null );
|
||||
|
||||
TimeLineManager.ScheduleSpanIn( timeLine, 0, numFrames * 1f/60f ,
|
||||
( span, type )=>
|
||||
{
|
||||
if ( type == TimeLineSpanUpdateType.End )
|
||||
{
|
||||
DispatchEnd( sequenceID );
|
||||
this.LogInfo( "time:", Time.GetTicksMsec() / 1000f );
|
||||
}
|
||||
},
|
||||
this
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
runForFrames( numFrames, sequenceID );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected async Task runForFrames( int frames, int sequenceID )
|
||||
{
|
||||
while ( frames > 0 )
|
||||
{
|
||||
await this.RequestNextFrame();
|
||||
frames --;
|
||||
}
|
||||
|
||||
DispatchEnd( sequenceID );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cb4ji13qh1v3g
|
||||
|
|
@ -24,6 +24,20 @@ namespace Rokojori
|
|||
[Export]
|
||||
public Curve curve;
|
||||
|
||||
[ExportGroup( "Stop")]
|
||||
[Export]
|
||||
public bool stopAnimation = false;
|
||||
|
||||
[Export]
|
||||
public bool setStopValue = false;
|
||||
|
||||
[ExportGroup( "Animate")]
|
||||
[Export]
|
||||
public bool animateStartValue = false;
|
||||
|
||||
[Export]
|
||||
public float animationStartValue = 0f;
|
||||
|
||||
[ExportGroup( "Editor Testing")]
|
||||
[Export]
|
||||
public bool forceStartValue = false;
|
||||
|
|
@ -55,15 +69,41 @@ namespace Rokojori
|
|||
CancelAction( _actionID );
|
||||
}
|
||||
|
||||
if ( stopAnimation )
|
||||
{
|
||||
|
||||
AnimationManager.StartAnimation( this, material, propertyName );
|
||||
|
||||
if ( setStopValue )
|
||||
{
|
||||
propertyName.Set( material, endValue );
|
||||
}
|
||||
|
||||
AnimationManager.EndAnimation( this, material, propertyName );
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
_actionID = DispatchStart();
|
||||
|
||||
var startValue = propertyName.Get( material );
|
||||
|
||||
|
||||
|
||||
|
||||
if ( forceStartValue && Engine.IsEditorHint() )
|
||||
{
|
||||
startValue = forcedStartValue;
|
||||
}
|
||||
|
||||
if ( animateStartValue )
|
||||
{
|
||||
startValue = animationStartValue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
AnimationManager.StartAnimation( this, material, propertyName );
|
||||
|
||||
|
|
|
|||
|
|
@ -184,6 +184,18 @@ namespace Rokojori
|
|||
_assignedMaterial = null;
|
||||
var msc = MaterialSurfaceContainer.From( target, index );
|
||||
msc.SetMaterialInSlot( slot, toMaterial );
|
||||
|
||||
var prop = new ColorPropertyName();
|
||||
prop.propertyName = "albedo_color";
|
||||
|
||||
var info = new Color();
|
||||
|
||||
if ( toMaterial is BaseMaterial3D bm )
|
||||
{
|
||||
info = bm.AlbedoColor;
|
||||
}
|
||||
|
||||
this.LogInfo( "Setting:", slot, toMaterial, info, prop.Get( toMaterial ) );
|
||||
}
|
||||
|
||||
DispatchEnd( sequenceID );
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@ namespace Rokojori
|
|||
[Export]
|
||||
public Node3D target;
|
||||
|
||||
[Export]
|
||||
public float endScaleAll = 1f;
|
||||
|
||||
[Export]
|
||||
public Vector3 endScale = Vector3.One;
|
||||
|
||||
|
|
@ -37,7 +40,7 @@ namespace Rokojori
|
|||
var start = tl.position;
|
||||
|
||||
var fromScale = target.Scale;
|
||||
var toScale = endScale;
|
||||
var toScale = endScale * endScaleAll;
|
||||
|
||||
var sequenceID = DispatchStart();
|
||||
|
||||
|
|
@ -64,7 +67,7 @@ namespace Rokojori
|
|||
|
||||
if ( ! cacheEndPositionOnStart )
|
||||
{
|
||||
var toScale = endScale;
|
||||
var toScale = endScale * endScaleAll;
|
||||
}
|
||||
|
||||
var lerpedScale = fromScale.Lerp( toScale, state );
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ namespace Rokojori
|
|||
|
||||
RJLog.Log( "Removed animations", numRemoved );
|
||||
|
||||
Lists.RemoveRange( animations, removals );
|
||||
Lists.RemoveList( animations, removals );
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,31 @@ namespace Rokojori
|
|||
[Export]
|
||||
public AppLauncher launcher;
|
||||
|
||||
[Export]
|
||||
public AppSettings settings;
|
||||
|
||||
[Export]
|
||||
public Action onAppStart;
|
||||
|
||||
Dictionary<string,string> _settingsData = new Dictionary<string, string>();
|
||||
public Dictionary<string,string> GetAppSettingsData() =>_settingsData;
|
||||
|
||||
public string GetSetting( AppSetting appSetting )
|
||||
{
|
||||
return _settingsData.ContainsKey( appSetting.id ) ? _settingsData[ appSetting.id ] : appSetting.GetDefaultValue();
|
||||
}
|
||||
|
||||
public string GetSetting( string id )
|
||||
{
|
||||
return _settingsData.ContainsKey( id ) ? _settingsData[ id ] : null;
|
||||
}
|
||||
|
||||
public void SetSetting( string id, string value )
|
||||
{
|
||||
// this.LogInfo( "Set setting:", id, value );
|
||||
_settingsData[ id ] = value;
|
||||
}
|
||||
|
||||
int _fps = 60;
|
||||
|
||||
public int x = 0;
|
||||
|
|
@ -48,7 +73,16 @@ namespace Rokojori
|
|||
set { _fps = value; Engine.MaxFps = _fps; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if ( Engine.IsEditorHint() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
onAppStart?.Trigger();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class LoadAppSettings:Action
|
||||
{
|
||||
[Export]
|
||||
public string savePath = "";
|
||||
|
||||
[Export]
|
||||
public App app;
|
||||
|
||||
[Export]
|
||||
public bool writeDefaults = true;
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
this.LogInfo( "Loading App Settings" );
|
||||
|
||||
var data = GDFilesSync.LoadJSON<Dictionary<string,string>>( savePath );
|
||||
|
||||
this.LogInfo( "App Settings", data );
|
||||
|
||||
foreach ( var vk in data )
|
||||
{
|
||||
app.settings.ApplySetting( app, vk.Key, vk.Value );
|
||||
}
|
||||
|
||||
// var settings =
|
||||
// this.LogInfo( JSON.StringifyObject( data ) );
|
||||
|
||||
// var resolvedApp = app ?? Unique<App>.Get();
|
||||
|
||||
// var data = resolvedApp.GetAppSettingsData();
|
||||
|
||||
// var saveMap = new Dictionary<string,string>();
|
||||
|
||||
// foreach ( var kv in data ){ saveMap[ kv.Key ] = kv.Value; }
|
||||
|
||||
// if ( writeDefaults )
|
||||
// {
|
||||
// app.settings.categories.ForEach(
|
||||
// ( c )=>
|
||||
// {
|
||||
// c.settings.ForEach(
|
||||
// ( appSetting )=>
|
||||
// {
|
||||
// if ( saveMap.ContainsKey( appSetting.id ) )
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
// saveMap[ appSetting.id ] = appSetting.GetDefaultValue();
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bbm2x6as7wvc8
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class SaveAppSettings:Action
|
||||
{
|
||||
[Export]
|
||||
public string savePath = "";
|
||||
|
||||
[Export]
|
||||
public App app;
|
||||
|
||||
[Export]
|
||||
public bool writeDefaults = true;
|
||||
|
||||
protected override void _OnTrigger()
|
||||
{
|
||||
var resolvedApp = app ?? Unique<App>.Get();
|
||||
|
||||
var data = resolvedApp.GetAppSettingsData();
|
||||
|
||||
var saveMap = new Dictionary<string,string>();
|
||||
|
||||
foreach ( var kv in data ){ saveMap[ kv.Key ] = kv.Value; }
|
||||
|
||||
if ( writeDefaults )
|
||||
{
|
||||
app.settings.categories.ForEach(
|
||||
( c )=>
|
||||
{
|
||||
c.settings.ForEach(
|
||||
( appSetting )=>
|
||||
{
|
||||
if ( saveMap.ContainsKey( appSetting.id ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
saveMap[ appSetting.id ] = appSetting.GetDefaultValue();
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
GDFilesSync.SaveJSON( savePath, saveMap );
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://ctuyiqlpdd4m4
|
||||
|
|
@ -5,13 +5,25 @@ using System.Collections.Generic;
|
|||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class AppSetting:Resource
|
||||
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/AppSetting.svg")]
|
||||
public abstract partial class AppSetting:Resource
|
||||
{
|
||||
public LocaleText GetName(){ return null; }
|
||||
public LocaleText GetInfo(){ return null; }
|
||||
[Export]
|
||||
public LocalizedString title;
|
||||
|
||||
[Export]
|
||||
public LocalizedString info;
|
||||
|
||||
[Export]
|
||||
public string id = "";
|
||||
|
||||
public abstract string GetDefaultValue();
|
||||
public abstract void ApplyValue( App app );
|
||||
|
||||
public string GetValue( App app )
|
||||
{
|
||||
return app.GetSetting( id );
|
||||
}
|
||||
|
||||
public string Serialize(){ return null; }
|
||||
public void SetFromSerialized( string serializedValue ){}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class AppSettings:Resource
|
||||
{
|
||||
[Export]
|
||||
public AppSettingsCategory[] categories = [];
|
||||
|
||||
public void ApplySetting( App app, string key, string value )
|
||||
{
|
||||
app.SetSetting( key, value );
|
||||
categories.ForEach(
|
||||
( c )=>
|
||||
{
|
||||
c.settings.ForEach(
|
||||
( s)=>
|
||||
{
|
||||
if ( s.id != key )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
s.ApplyValue( app );
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://c5iowli8mkuoy
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/AppSettingsCategory.svg")]
|
||||
public partial class AppSettingsCategory:Resource
|
||||
{
|
||||
[Export]
|
||||
public LocalizedString title;
|
||||
|
||||
[Export]
|
||||
public LocalizedString info;
|
||||
|
||||
[Export]
|
||||
public Texture2D icon;
|
||||
|
||||
[Export]
|
||||
public string id = "";
|
||||
|
||||
[Export]
|
||||
public AppSetting[] settings;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://b3kfbhiwqt26o
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public abstract partial class ListAppSetting:AppSetting
|
||||
{
|
||||
[Export]
|
||||
public LocalizedString[] values = [];
|
||||
|
||||
[Export]
|
||||
public int defaultValueIndex = 0;
|
||||
|
||||
|
||||
public override string GetDefaultValue()
|
||||
{
|
||||
return JSON.StringifyObject( values[ defaultValueIndex ] );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://cgo3gvs8q2oon
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class TestingListAppSetting:NumberAppSetting
|
||||
{
|
||||
public override void ApplyValue( App app )
|
||||
{
|
||||
var stringValue = app.GetSetting( id );
|
||||
RJLog.Log( "Test value is:", stringValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://deyg247xjr2mu
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class AudioBusSetting:NumberAppSetting
|
||||
{
|
||||
[Export]
|
||||
public string busName = "";
|
||||
|
||||
public override void ApplyValue( App app )
|
||||
{
|
||||
var stringValue = app.GetSetting( id );
|
||||
var floatValue = RegexUtility.ParseFloat( stringValue );
|
||||
|
||||
var busIndex = AudioServer.GetBusIndex( busName );
|
||||
|
||||
if ( busIndex == -1 )
|
||||
{
|
||||
this.LogError( "Audio bus not found:", busName );
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
AudioServer.SetBusVolumeLinear( busIndex, NormalizeValue( floatValue ) );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://dji3qa0w7pbql
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public abstract partial class NumberAppSetting:AppSetting
|
||||
{
|
||||
[Export]
|
||||
public LocalizedString prefix;
|
||||
|
||||
[Export]
|
||||
public float min = 0;
|
||||
|
||||
[Export]
|
||||
public float max = 1;
|
||||
|
||||
[Export]
|
||||
public float defaultValue = 0.5f;
|
||||
|
||||
[Export]
|
||||
public int steps = -1;
|
||||
|
||||
[Export]
|
||||
public float stepSize = -1;
|
||||
|
||||
[Export]
|
||||
public UIFloatValueMode.DecimialPoints decimialPoints = UIFloatValueMode.DecimialPoints.Int;
|
||||
|
||||
[Export]
|
||||
public LocalizedString suffix;
|
||||
|
||||
public float NormalizeValue( float v )
|
||||
{
|
||||
return MathX.Normalize( v, min, max );
|
||||
}
|
||||
|
||||
public override string GetDefaultValue()
|
||||
{
|
||||
return JSON.StringifyObject( defaultValue );
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bowpfiftk8xyq
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class ResolutionScalingSetting:NumberAppSetting
|
||||
{
|
||||
[Export]
|
||||
public float userScaleToResolutionScale = 1f/100f;
|
||||
|
||||
public override void ApplyValue( App app )
|
||||
{
|
||||
var stringValue = app.GetSetting( id );
|
||||
var floatValue = RegexUtility.ParseFloat( stringValue );
|
||||
|
||||
var viewport = app.GetViewport();
|
||||
viewport.Scaling3DScale = floatValue * userScaleToResolutionScale;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://ck1jjpy2gvkk4
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class TestingNumberAppSetting:NumberAppSetting
|
||||
{
|
||||
public override void ApplyValue( App app )
|
||||
{
|
||||
var stringValue = app.GetSetting( id );
|
||||
RJLog.Log( "Test value is:", stringValue );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://en53sdt3fmlj
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
|
||||
using Godot;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class UIFontScaleSetting:NumberAppSetting
|
||||
{
|
||||
[Export]
|
||||
public float userScaleToFontZoom = 1f/100f;
|
||||
|
||||
public override void ApplyValue( App app )
|
||||
{
|
||||
var stringValue = app.GetSetting( id );
|
||||
var floatValue = RegexUtility.ParseFloat( stringValue );
|
||||
|
||||
var uis = Nodes.AllInScene<UI>();
|
||||
uis.ForEach(
|
||||
( ui )=>
|
||||
{
|
||||
ui.fontZoom = userScaleToFontZoom * floatValue;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://bj27trgy8poyy
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="AppSettingsCategory" load_steps=7 format=3 uid="uid://cewutd6leekw6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3kfbhiwqt26o" path="res://addons/rokojori_action_library/Runtime/App/Settings/AppSettingsCategory.cs" id="1_p3j14"]
|
||||
[ext_resource type="Resource" uid="uid://y3wia1vd1q68" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/Master AudioBus Setting.tres" id="2_1g5c8"]
|
||||
[ext_resource type="Resource" uid="uid://b24rm0ggveq8y" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/Music AudioBus Setting.tres" id="3_25bee"]
|
||||
[ext_resource type="Resource" uid="uid://da34tyk6d0l4b" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/SFX AudioBus Setting.tres" id="4_bgbml"]
|
||||
[ext_resource type="Resource" uid="uid://ckpuhu87npn2l" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/VOX AudioBus Setting.tres" id="5_pt3u0"]
|
||||
[ext_resource type="Resource" uid="uid://dn5qwc0t4llho" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/Audio Label.tres" id="6_imd2x"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_p3j14")
|
||||
title = ExtResource("6_imd2x")
|
||||
id = "audio"
|
||||
settings = [ExtResource("2_1g5c8"), ExtResource("3_25bee"), ExtResource("4_bgbml"), ExtResource("5_pt3u0")]
|
||||
metadata/_custom_type_script = "uid://b3kfbhiwqt26o"
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=2 format=3 uid="uid://dn5qwc0t4llho"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="1_i1gki"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_i1gki")
|
||||
en = "Audio"
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://ph4irn16ygj4"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_uqcpa"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_is7nr"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sjqn2"]
|
||||
script = ExtResource("1_uqcpa")
|
||||
code = 12
|
||||
content = "Gesamt Lautstärke"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_is7nr")
|
||||
en = "Main Volume"
|
||||
entries = [SubResource("Resource_sjqn2")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="AudioBusSetting" load_steps=4 format=3 uid="uid://y3wia1vd1q68"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dji3qa0w7pbql" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs" id="1_og01v"]
|
||||
[ext_resource type="Resource" uid="uid://osfjg5u2jb4f" path="res://addons/rokojori_action_library/Runtime/Localization/DataBase/Numberic/Percantage-Suffix.tres" id="2_j708b"]
|
||||
[ext_resource type="Resource" uid="uid://ph4irn16ygj4" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/Main Volume Label.tres" id="3_fm56v"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_og01v")
|
||||
busName = "Master"
|
||||
max = 100.0
|
||||
defaultValue = 50.0
|
||||
suffix = ExtResource("2_j708b")
|
||||
title = ExtResource("3_fm56v")
|
||||
id = "mainVolume"
|
||||
metadata/_custom_type_script = "uid://dji3qa0w7pbql"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="AudioBusSetting" load_steps=4 format=3 uid="uid://b24rm0ggveq8y"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dji3qa0w7pbql" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs" id="1_clrqb"]
|
||||
[ext_resource type="Resource" uid="uid://osfjg5u2jb4f" path="res://addons/rokojori_action_library/Runtime/Localization/DataBase/Numberic/Percantage-Suffix.tres" id="2_bhjsn"]
|
||||
[ext_resource type="Resource" uid="uid://dldn6o3wvxfdc" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/Music Label.tres" id="3_vjtyo"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_clrqb")
|
||||
busName = "Music"
|
||||
max = 100.0
|
||||
defaultValue = 50.0
|
||||
suffix = ExtResource("2_bhjsn")
|
||||
title = ExtResource("3_vjtyo")
|
||||
id = "musicVolume"
|
||||
metadata/_custom_type_script = "uid://dji3qa0w7pbql"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://dldn6o3wvxfdc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_1ce4q"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_dqscy"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sjqn2"]
|
||||
script = ExtResource("1_1ce4q")
|
||||
code = 12
|
||||
content = "Musik Lautstärke"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_dqscy")
|
||||
en = "Music Volume"
|
||||
entries = [SubResource("Resource_sjqn2")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="AudioBusSetting" load_steps=4 format=3 uid="uid://da34tyk6d0l4b"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dji3qa0w7pbql" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs" id="1_04sn2"]
|
||||
[ext_resource type="Resource" uid="uid://osfjg5u2jb4f" path="res://addons/rokojori_action_library/Runtime/Localization/DataBase/Numberic/Percantage-Suffix.tres" id="2_37v0c"]
|
||||
[ext_resource type="Resource" uid="uid://ccrwni0het7rl" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/SFX Label.tres" id="3_6duf0"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_04sn2")
|
||||
busName = "SFX"
|
||||
max = 100.0
|
||||
defaultValue = 50.0
|
||||
suffix = ExtResource("2_37v0c")
|
||||
title = ExtResource("3_6duf0")
|
||||
id = "sfxVolume"
|
||||
metadata/_custom_type_script = "uid://dji3qa0w7pbql"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://ccrwni0het7rl"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_3r5aw"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_voo1w"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sjqn2"]
|
||||
script = ExtResource("1_3r5aw")
|
||||
code = 12
|
||||
content = "SFX Lautstärke"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_voo1w")
|
||||
en = "SFX Volume"
|
||||
entries = [SubResource("Resource_sjqn2")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="AudioBusSetting" load_steps=4 format=3 uid="uid://ckpuhu87npn2l"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dji3qa0w7pbql" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/AudioBusSetting.cs" id="1_paelx"]
|
||||
[ext_resource type="Resource" uid="uid://osfjg5u2jb4f" path="res://addons/rokojori_action_library/Runtime/Localization/DataBase/Numberic/Percantage-Suffix.tres" id="2_s0edn"]
|
||||
[ext_resource type="Resource" uid="uid://cg2e4yctcmhgy" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Audio/VOX Label.tres" id="3_e4vca"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_paelx")
|
||||
busName = "Vox"
|
||||
max = 100.0
|
||||
defaultValue = 50.0
|
||||
suffix = ExtResource("2_s0edn")
|
||||
title = ExtResource("3_e4vca")
|
||||
id = "voxVolume"
|
||||
metadata/_custom_type_script = "uid://dji3qa0w7pbql"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://cg2e4yctcmhgy"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_jpt7d"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_xqj8d"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_sjqn2"]
|
||||
script = ExtResource("1_jpt7d")
|
||||
code = 12
|
||||
content = "Sprach Lautstärke"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_xqj8d")
|
||||
en = "Voice Volume"
|
||||
entries = [SubResource("Resource_sjqn2")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[gd_resource type="Resource" script_class="AppSettingsCategory" load_steps=5 format=3 uid="uid://4iqfk01k81nc"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b3kfbhiwqt26o" path="res://addons/rokojori_action_library/Runtime/App/Settings/AppSettingsCategory.cs" id="1_g7ii0"]
|
||||
[ext_resource type="Resource" uid="uid://0itt52s066qp" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Graphics/UI Scale Setting.tres" id="2_xi6qd"]
|
||||
[ext_resource type="Resource" uid="uid://bpfrw7y8jx2wp" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Graphics/Graphics Label.tres" id="3_g7ii0"]
|
||||
[ext_resource type="Resource" uid="uid://cec7500hcn1e0" path="res://addons/rokojori_action_library/Runtime/App/Settings/Presets/Graphics/Resolution Scale Setting.tres" id="3_xi6qd"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_g7ii0")
|
||||
title = ExtResource("3_g7ii0")
|
||||
id = "graphics"
|
||||
settings = [ExtResource("3_xi6qd"), ExtResource("2_xi6qd")]
|
||||
metadata/_custom_type_script = "uid://b3kfbhiwqt26o"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://bpfrw7y8jx2wp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_q1oe3"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_s1eae"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_133rj"]
|
||||
script = ExtResource("1_q1oe3")
|
||||
content = "Grafik"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_s1eae")
|
||||
en = "Graphics"
|
||||
entries = [SubResource("Resource_133rj")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=4 format=3 uid="uid://ckevpvf37gsu0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="1_jucsw"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_d7iky"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0xy14"]
|
||||
script = ExtResource("1_jucsw")
|
||||
code = 12
|
||||
content = "Auflösungs-Skalierung"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_d7iky")
|
||||
en = "Resolution Scale"
|
||||
entries = [SubResource("Resource_0xy14")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
[gd_resource type="Resource" script_class="ResolutionScalingSetting" load_steps=7 format=3 uid="uid://cec7500hcn1e0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ck1jjpy2gvkk4" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/ResolutionScalingSetting.cs" id="1_1x5jf"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="2_irwt0"]
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="3_831il"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4ajq1"]
|
||||
script = ExtResource("2_irwt0")
|
||||
en = "%"
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_0xy14"]
|
||||
script = ExtResource("3_831il")
|
||||
code = 12
|
||||
content = "Auflösungs-Skalierung"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7auxo"]
|
||||
script = ExtResource("2_irwt0")
|
||||
en = "Resolution Scale"
|
||||
entries = [SubResource("Resource_0xy14")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_1x5jf")
|
||||
min = 10.0
|
||||
max = 150.0
|
||||
defaultValue = 100.0
|
||||
stepSize = 5.0
|
||||
suffix = SubResource("Resource_4ajq1")
|
||||
title = SubResource("Resource_7auxo")
|
||||
id = "resolutionScale"
|
||||
metadata/_custom_type_script = "uid://ck1jjpy2gvkk4"
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
[gd_resource type="Resource" script_class="UIFontScaleSetting" load_steps=7 format=3 uid="uid://0itt52s066qp"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bj27trgy8poyy" path="res://addons/rokojori_action_library/Runtime/App/Settings/NumberSetting/UIFontScaleSetting.cs" id="1_5l5ka"]
|
||||
[ext_resource type="Resource" uid="uid://osfjg5u2jb4f" path="res://addons/rokojori_action_library/Runtime/Localization/DataBase/Numberic/Percantage-Suffix.tres" id="2_1r4kl"]
|
||||
[ext_resource type="Script" uid="uid://b584767duemqk" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleTextEntry.cs" id="3_ta5nt"]
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="4_mrecg"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_cviq7"]
|
||||
script = ExtResource("3_ta5nt")
|
||||
code = 12
|
||||
content = "UI Skalierung"
|
||||
metadata/_custom_type_script = "uid://b584767duemqk"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_avygq"]
|
||||
script = ExtResource("4_mrecg")
|
||||
en = "UI Scale"
|
||||
entries = [SubResource("Resource_cviq7")]
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5l5ka")
|
||||
min = 75.0
|
||||
max = 150.0
|
||||
defaultValue = 100.0
|
||||
suffix = ExtResource("2_1r4kl")
|
||||
title = SubResource("Resource_avygq")
|
||||
id = "uiScale"
|
||||
metadata/_custom_type_script = "uid://bj27trgy8poyy"
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
[gd_resource type="AudioBusLayout" format=3 uid="uid://b588mdjuo56ut"]
|
||||
|
||||
[resource]
|
||||
bus/1/name = &"Music"
|
||||
bus/1/solo = false
|
||||
bus/1/mute = false
|
||||
bus/1/bypass_fx = false
|
||||
bus/1/volume_db = 0.0
|
||||
bus/1/send = &"Master"
|
||||
bus/2/name = &"SFX"
|
||||
bus/2/solo = false
|
||||
bus/2/mute = false
|
||||
bus/2/bypass_fx = false
|
||||
bus/2/volume_db = 0.0
|
||||
bus/2/send = &"Master"
|
||||
bus/3/name = &"Vox"
|
||||
bus/3/solo = false
|
||||
bus/3/mute = false
|
||||
bus/3/bypass_fx = false
|
||||
bus/3/volume_db = 0.0
|
||||
bus/3/send = &"Master"
|
||||
|
|
@ -12,6 +12,12 @@ namespace Rokojori
|
|||
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/1stPersonCamera.svg") ]
|
||||
public partial class FirstPersonCamera:VirtualCamera
|
||||
{
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -21,6 +21,14 @@ namespace Rokojori
|
|||
[Export]
|
||||
public float rotationSmoothingCoefficient = 0.1f;
|
||||
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
|
||||
Smoother smoother = new Smoother();
|
||||
|
||||
public override void _Process( double delta )
|
||||
|
|
|
|||
|
|
@ -15,12 +15,21 @@ namespace Rokojori
|
|||
[Export]
|
||||
public Node3D target;
|
||||
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
|
||||
[Export]
|
||||
public Smoothing smoothing;
|
||||
|
||||
[Export]
|
||||
public TimeLine timeLine;
|
||||
|
||||
|
||||
[ExportToolButton( "Copy Camera Pose With Target")]
|
||||
public Callable copyCameraPoseWithTargetButton => Callable.From(
|
||||
()=>
|
||||
|
|
|
|||
|
|
@ -122,7 +122,15 @@ namespace Rokojori
|
|||
|
||||
[Export]
|
||||
public float zoomSmoothingCoefficient = 0.1f;
|
||||
Smoother smoother = new Smoother();
|
||||
Smoother smoother = new Smoother();
|
||||
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
|
||||
public override void _Process( double delta )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ namespace Rokojori
|
|||
|
||||
void _ProcessCamera( double gameDelta )
|
||||
{
|
||||
if ( Engine.IsEditorHint() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
// if ( Engine.IsEditorHint() )
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
|
||||
if ( target == null )
|
||||
{
|
||||
|
|
@ -93,14 +93,53 @@ namespace Rokojori
|
|||
|
||||
var smoothedPitch = Smoothing.Apply( settings.pitchSmoothing, pitch, delta );
|
||||
|
||||
var distance = settings.distanceForPitch.Sample( MathX.NormalizeClamped( pitch, settings.minPitch, settings.maxPitch ) ) * settings.distanceScale;
|
||||
var pitchState = MathX.NormalizeClamped( pitch, settings.minPitch, settings.maxPitch );
|
||||
var distance = settings.distanceForPitch.Sample( pitchState ) * settings.distanceScale;
|
||||
FOV = settings.fovOffset + ( settings.fovForPitch?.Sample( pitchState ) ?? 0f );
|
||||
|
||||
GlobalPosition = targetPosition + Math3D.YawPitchRotation( smoothedYaw, smoothedPitch ) * Vector3.Forward * distance;
|
||||
cameraPosition = targetPosition + Math3D.YawPitchRotation( smoothedYaw, smoothedPitch ) * Vector3.Forward * distance;
|
||||
|
||||
LookAt( targetPosition, Vector3.Up, true );
|
||||
cameraForward = ( targetPosition - cameraPosition ).Normalized();
|
||||
// LookAt( targetPosition, Vector3.Up, true );
|
||||
|
||||
GlobalPosition += this.GetOrientationBasedGlobalOffset( settings.offset );
|
||||
var pitchOffset = settings.offset;
|
||||
|
||||
pitchOffset.X += settings.offsetXForPitch?.Sample( pitchState ) ?? 0f;
|
||||
pitchOffset.Y += settings.offsetYForPitch?.Sample( pitchState ) ?? 0f;
|
||||
pitchOffset.Z += settings.offsetZForPitch?.Sample( pitchState ) ?? 0f;
|
||||
|
||||
var basis = Basis.LookingAt( cameraForward, Vector3.Up, true );
|
||||
cameraPosition += basis.ToGlobalDirection( pitchOffset );
|
||||
|
||||
cameraRotation = new Quaternion( basis );
|
||||
}
|
||||
|
||||
[Export,ReadOnly]
|
||||
public Vector3 cameraPosition;
|
||||
|
||||
public override Vector3 GetCameraPosition()
|
||||
{
|
||||
return cameraPosition;
|
||||
}
|
||||
|
||||
[Export,ReadOnly]
|
||||
public Vector3 cameraForward;
|
||||
|
||||
[Export,ReadOnly]
|
||||
public Quaternion cameraRotation;
|
||||
|
||||
public override Quaternion GetCameraRotation()
|
||||
{
|
||||
return cameraRotation;
|
||||
}
|
||||
|
||||
|
||||
[Export,ReadOnly]
|
||||
public float FOV;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return FOV;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ namespace Rokojori
|
|||
[Export]
|
||||
public Smoothing targetFollowSmoothing = new FrameSmoothing();
|
||||
|
||||
[Export]
|
||||
public Vector3 offset = Vector3.Zero;
|
||||
|
||||
|
||||
[Export]
|
||||
public Smoothing yawSmoothing = new FrameSmoothing();
|
||||
|
|
@ -39,12 +38,37 @@ namespace Rokojori
|
|||
|
||||
|
||||
[ExportGroup("Distance")]
|
||||
[Export]
|
||||
public Curve distanceForPitch = MathX.Curve( 1, 1 );
|
||||
|
||||
[Export]
|
||||
public float distanceScale = 1;
|
||||
|
||||
[Export]
|
||||
public Curve distanceForPitch = MathX.Curve( 1, 1 );
|
||||
|
||||
|
||||
|
||||
[ExportGroup("Offset")]
|
||||
|
||||
[Export]
|
||||
public Vector3 offset = Vector3.Zero;
|
||||
|
||||
[Export]
|
||||
public Curve offsetXForPitch = MathX.Curve( 0, 0 ).WithValueRange( -10, 10 );
|
||||
|
||||
[Export]
|
||||
public Curve offsetYForPitch = MathX.Curve( 0, 0 ).WithValueRange( -10, 10 );
|
||||
|
||||
[Export]
|
||||
public Curve offsetZForPitch = MathX.Curve( 0, 0 ).WithValueRange( -10, 10 );
|
||||
|
||||
[ExportGroup("FOV")]
|
||||
|
||||
[Export]
|
||||
public Curve fovForPitch = MathX.Curve( 0, 0 ).WithValueRange( -10, 10 );
|
||||
|
||||
[Export]
|
||||
public float fovOffset = 60;
|
||||
|
||||
|
||||
public float GetNormalizedPitch( float pitch )
|
||||
{
|
||||
|
|
@ -53,10 +77,27 @@ namespace Rokojori
|
|||
|
||||
public ThirdPersonCameraData GetActiveDeviceData()
|
||||
{
|
||||
if ( deviceData == null )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var sm = Unique<SensorManager>.Get();
|
||||
|
||||
if ( sm == null )
|
||||
{
|
||||
return deviceData[ 0 ];
|
||||
}
|
||||
|
||||
|
||||
var lastActive = sm.lastActiveDevice;
|
||||
|
||||
if ( lastActive == null )
|
||||
{
|
||||
return deviceData[ 0 ];
|
||||
}
|
||||
|
||||
|
||||
var lastActiveData = deviceData.FindNonNull( d => d.deviceSelector.Selects( lastActive ) );
|
||||
|
||||
return lastActiveData != null ? lastActiveData : deviceData[ 0 ];
|
||||
|
|
|
|||
|
|
@ -38,6 +38,13 @@ namespace Rokojori
|
|||
[Export]
|
||||
public float maxDistance = 200f;
|
||||
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
public override float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
|
||||
[Export( PropertyHint.Range, "0,600")]
|
||||
public Smoothing zoomSmoothing;
|
||||
|
|
|
|||
|
|
@ -10,10 +10,8 @@ namespace Rokojori
|
|||
{
|
||||
[Tool]
|
||||
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/VirtualCamera3D.svg") ]
|
||||
public partial class VirtualCamera:Node3D
|
||||
public abstract partial class VirtualCamera:Node3D
|
||||
{
|
||||
[Export]
|
||||
public float fov = 60;
|
||||
|
||||
[Export]
|
||||
public bool inputEnabled = true;
|
||||
|
|
@ -31,20 +29,18 @@ namespace Rokojori
|
|||
}
|
||||
);
|
||||
|
||||
public Vector3 GetCameraPosition()
|
||||
public virtual Vector3 GetCameraPosition()
|
||||
{
|
||||
return GlobalPosition;
|
||||
}
|
||||
|
||||
public Quaternion GetCameraRotation()
|
||||
public virtual Quaternion GetCameraRotation()
|
||||
{
|
||||
return GlobalBasis.GetRotationQuaternion();
|
||||
}
|
||||
|
||||
public float GetCameraFOV()
|
||||
{
|
||||
return fov;
|
||||
}
|
||||
public abstract float GetCameraFOV();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -96,7 +96,7 @@ namespace Rokojori
|
|||
|
||||
if ( _removals.Count > 0 )
|
||||
{
|
||||
Lists.RemoveRange( _actions, _removals );
|
||||
Lists.RemoveList( _actions, _removals );
|
||||
|
||||
// _removals.ForEach(
|
||||
// r =>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
|
||||
using System;
|
||||
using Godot;
|
||||
|
||||
namespace Rokojori;
|
||||
|
||||
public class GDFilesSync
|
||||
{
|
||||
public static void SaveJSON( string path, object data )
|
||||
{
|
||||
SaveUTF8( path, JSON.StringifyObject( data ) );
|
||||
}
|
||||
|
||||
public static T LoadJSON<T>( string path ) where T:new()
|
||||
{
|
||||
return JSON.ParseObject<T>( LoadUTF8( path ) );
|
||||
}
|
||||
|
||||
public static void SaveUTF8( string path, string data )
|
||||
{
|
||||
using var fileAccess = FileAccess.Open( path, FileAccess.ModeFlags.Write );
|
||||
fileAccess.StoreString( data );
|
||||
fileAccess.Close();
|
||||
}
|
||||
|
||||
public static string LoadUTF8( string path )
|
||||
{
|
||||
using var fileAccess = FileAccess.Open( path, FileAccess.ModeFlags.Read );
|
||||
return fileAccess.GetAsText( );
|
||||
}
|
||||
|
||||
public static void SaveBytes( string path, byte[] data )
|
||||
{
|
||||
using var fileAccess = FileAccess.Open( path, FileAccess.ModeFlags.Write );
|
||||
fileAccess.StoreBuffer( data );
|
||||
fileAccess.Close();
|
||||
}
|
||||
|
||||
public static byte[] LoadBytes( string path )
|
||||
{
|
||||
using var fileAccess = FileAccess.Open( path, FileAccess.ModeFlags.Read );
|
||||
return fileAccess.GetBuffer( (long) fileAccess.GetLength() );
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://d08fev7gh8nfe
|
||||
|
|
@ -7,6 +7,26 @@ namespace Rokojori
|
|||
{
|
||||
public static class BasisExtensions
|
||||
{
|
||||
public static Vector3 Forward( this Basis self )
|
||||
{
|
||||
return -self.Z;
|
||||
}
|
||||
|
||||
public static Vector3 Right( this Basis self )
|
||||
{
|
||||
return self.X;
|
||||
}
|
||||
|
||||
public static Vector3 Up( this Basis self )
|
||||
{
|
||||
return self.Y;
|
||||
}
|
||||
|
||||
public static Vector3 ToGlobalDirection( this Basis self, Vector3 direction )
|
||||
{
|
||||
return self.Right() * direction.X + self.Up() * direction.Y + self.Forward() * direction;
|
||||
}
|
||||
|
||||
public static bool IsValid( this Basis self )
|
||||
{
|
||||
return self.Row0.IsValid() && self.Row1.IsValid() && self.Row2.IsValid();
|
||||
|
|
|
|||
|
|
@ -4,12 +4,62 @@ using System.Collections.Generic;
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using System.Reflection;
|
||||
using Microsoft.VisualBasic;
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
public static class NodeExtensions
|
||||
{
|
||||
public static void CallDeferred( this Node node, System.Action action )
|
||||
{
|
||||
Callable.From( action ).CallDeferred();
|
||||
}
|
||||
|
||||
|
||||
public static int GetChildCountOfType<N>( this Node node )
|
||||
{
|
||||
var count = 0;
|
||||
|
||||
for ( int i = 0; i < node.GetChildCount(); i++ )
|
||||
{
|
||||
if ( node.GetChild( i ) is N )
|
||||
{
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
public static void EnsureChildCount<N>( this Node node, int neededChildCount, Action<N> callback = null ) where N:Node,new()
|
||||
{
|
||||
var segments = neededChildCount;
|
||||
var ownCount = node.GetChildCount();
|
||||
|
||||
if ( ownCount == segments )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ( ownCount > segments )
|
||||
{
|
||||
node.DestroyChildrenRange( segments, ownCount - segments );
|
||||
|
||||
ownCount = segments;
|
||||
}
|
||||
|
||||
for ( int i = ownCount; i < segments; i++ )
|
||||
{
|
||||
var n = node.CreateChild<N>();
|
||||
|
||||
if ( callback != null )
|
||||
{
|
||||
callback( n );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static T GetNextSiblingOrChild<T>( this Node node ) where T:Node
|
||||
{
|
||||
var index = node.GetIndex();
|
||||
|
|
|
|||
|
|
@ -7,6 +7,9 @@ namespace Rokojori
|
|||
{
|
||||
public static class QuaternionExtensions
|
||||
{
|
||||
|
||||
public static Quaternion From( Vector3 forward, Vector3 up )
|
||||
{
|
||||
return Math3D.LookRotation( forward, up );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -29,6 +29,36 @@ namespace Rokojori
|
|||
|
||||
[Export]
|
||||
public Node.ProcessModeEnum processMode;
|
||||
|
||||
|
||||
public static NodeStateConfiguration All( Trillean value )
|
||||
{
|
||||
var config = new NodeStateConfiguration();
|
||||
|
||||
config.processEnabled = value;
|
||||
config.inputEnabled = value;
|
||||
config.physicsEnabled = value;
|
||||
config.signalsEnabled = value;
|
||||
config.visible = value;
|
||||
|
||||
config.setProcessMode = true;
|
||||
|
||||
config.processMode = Trillean.True == value ? Node.ProcessModeEnum.Inherit : Node.ProcessModeEnum.Disabled;
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
public static NodeStateConfiguration AllOn()
|
||||
{
|
||||
return All( Trillean.True );
|
||||
}
|
||||
|
||||
public static NodeStateConfiguration AllOff()
|
||||
{
|
||||
return All( Trillean.False );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +371,7 @@ namespace Rokojori
|
|||
}
|
||||
|
||||
|
||||
public static T CreateChild<T>( this Node parent, PackedScene scene, string name = null ) where T:Node,new()
|
||||
public static T CreateChild<T>( this Node parent, PackedScene scene, string name = null, bool editable = true ) where T:Node,new()
|
||||
{
|
||||
var instance = scene.Instantiate<T>();
|
||||
|
||||
|
|
@ -383,6 +383,11 @@ namespace Rokojori
|
|||
instance.Name = name;
|
||||
}
|
||||
|
||||
if ( editable )
|
||||
{
|
||||
parent.SetEditableInstance( instance, true );
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
|
|
@ -673,6 +678,31 @@ namespace Rokojori
|
|||
RemoveAndDeleteChildren( parent, includeInternal );
|
||||
}
|
||||
|
||||
public static void DestroyChildAt( this Node parent, int index, bool includeInternal = false, bool queue = true )
|
||||
{
|
||||
var node = parent.GetChild( index, includeInternal );
|
||||
parent.RemoveChild( node );
|
||||
|
||||
if ( ! queue )
|
||||
{
|
||||
node.Free();
|
||||
}
|
||||
else
|
||||
{
|
||||
node.QueueFree();
|
||||
}
|
||||
}
|
||||
|
||||
public static void DestroyChildrenRange( this Node parent, int startIndex, int range, bool includeInternal = false, bool queue = true )
|
||||
{
|
||||
parent.LogInfo( startIndex, range, parent.GetChildCount() );
|
||||
for ( int i = 0; i < range; i++ )
|
||||
{
|
||||
var index = ( range - 1 ) - i;
|
||||
parent.DestroyChildAt( index, includeInternal, queue );
|
||||
}
|
||||
}
|
||||
|
||||
public static void RemoveAndDeleteChildren( Node parent, bool includeInternal = false, bool queue = true )
|
||||
{
|
||||
if ( parent == null )
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
[gd_resource type="Resource" script_class="LocaleText" load_steps=2 format=3 uid="uid://osfjg5u2jb4f"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://bvj322mokkq63" path="res://addons/rokojori_action_library/Runtime/Localization/LocaleText.cs" id="1_khv63"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_khv63")
|
||||
en = "%"
|
||||
metadata/_custom_type_script = "uid://bvj322mokkq63"
|
||||
|
|
@ -31,6 +31,12 @@ namespace Rokojori
|
|||
max += translation;
|
||||
}
|
||||
|
||||
public void Extend( float size )
|
||||
{
|
||||
min -= Vector3.One * size / 2f;
|
||||
max += Vector3.One * size / 2f;
|
||||
}
|
||||
|
||||
public static Box3 FromPositionAndScale( Vector3 position, Vector3 scale )
|
||||
{
|
||||
var max = scale * 0.5f;
|
||||
|
|
|
|||
|
|
@ -177,6 +177,24 @@ namespace Rokojori
|
|||
return p;
|
||||
}
|
||||
|
||||
public static Pose From( Vector3 position, Vector3 forward )
|
||||
{
|
||||
var p = new Pose();
|
||||
p.position = position;
|
||||
p.LookAt( forward, Vector3.Up );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public static Pose From( Vector3 position, Vector3 forward, Vector3 up )
|
||||
{
|
||||
var p = new Pose();
|
||||
p.position = position;
|
||||
p.LookAt( forward, up );
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public static Pose InverseFrom( Node3D node3D )
|
||||
{
|
||||
var p = new Pose();
|
||||
|
|
|
|||
|
|
@ -108,6 +108,11 @@ namespace Rokojori
|
|||
return new Vector2( x, y );
|
||||
}
|
||||
|
||||
public static Vector2 CircleDegrees( float degrees, float size = 1 )
|
||||
{
|
||||
return Circle( MathX.DegreesToRadians * degrees, size );
|
||||
}
|
||||
|
||||
public static Vector2 Fract( Vector2 a )
|
||||
{
|
||||
return new Vector2( MathX.Fract( a.X ), MathX.Fract( a.Y ) );
|
||||
|
|
|
|||
|
|
@ -595,14 +595,8 @@ namespace Rokojori
|
|||
{
|
||||
return Quaternion.Identity;
|
||||
}
|
||||
|
||||
var t = new Transform3D();
|
||||
t.Basis = Basis.Identity;
|
||||
t.Origin = Vector3.Zero;
|
||||
|
||||
t = t.LookingAt( direction, up, useModelFront );
|
||||
|
||||
return t.Basis.GetRotationQuaternion();
|
||||
return Basis.LookingAt( direction, up, useModelFront ).GetRotationQuaternion();
|
||||
}
|
||||
|
||||
public static Vector3 LerpComponents( Vector3 a, Vector3 b, Vector3 t )
|
||||
|
|
|
|||
|
|
@ -79,6 +79,11 @@ namespace Rokojori
|
|||
return Mathf.Lerp( bottom, top, uvw.Z );
|
||||
}
|
||||
|
||||
public static float LerpClamped( float min, float max, float value )
|
||||
{
|
||||
return Mathf.Clamp( Mathf.Lerp( min, max, value ), min, max );
|
||||
}
|
||||
|
||||
public static float Fract( float value )
|
||||
{
|
||||
return value - Mathf.Floor( value );
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
|
||||
|
||||
namespace Rokojori
|
||||
{
|
||||
[Tool]
|
||||
[GlobalClass]
|
||||
public partial class CylinderGenerator:MeshGeneratorType
|
||||
{
|
||||
[Export]
|
||||
public int vertices = 16;
|
||||
|
||||
[Export]
|
||||
public int subdivisions = 5;
|
||||
|
||||
protected override string GetCachePath()
|
||||
{
|
||||
return "CylinderGenerator-" + vertices + "-x-"+ subdivisions;
|
||||
}
|
||||
|
||||
protected override MeshGeometry _GenerateMeshGeometry()
|
||||
{
|
||||
return MeshGeometry.Cylinder( vertices, subdivisions, 0f, 1f );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
uid://8bb4srk0y7bi
|
||||
|
|
@ -873,6 +873,65 @@ namespace Rokojori
|
|||
return mg;
|
||||
}
|
||||
|
||||
public static MeshGeometry Cylinder( int vertices, int divisions, float zMin, float zMax )
|
||||
{
|
||||
var mg = new MeshGeometry();
|
||||
var normalizeDivisions = 1f / divisions;
|
||||
|
||||
for ( int d = 0; d < divisions; d++ )
|
||||
{
|
||||
var v0 = d * normalizeDivisions;
|
||||
var v1 = ( d + 1f ) * normalizeDivisions;
|
||||
|
||||
var z0 = Mathf.Lerp( zMin, zMax, v0 );
|
||||
var z1 = Mathf.Lerp( zMin, zMax, v1 );
|
||||
|
||||
var normalizeVertices = 1f / vertices;
|
||||
|
||||
for ( int i = 0; i < vertices; i++ )
|
||||
{
|
||||
var u0 = i * normalizeVertices;
|
||||
var u1 = ( i + 1 ) * normalizeVertices;
|
||||
|
||||
var angle0 = u0 * 360f;
|
||||
var angle1 = u1 * 360f;
|
||||
|
||||
var pos0 = Math2D.CircleDegrees( angle0 ).To3DXY();
|
||||
var pos1 = Math2D.CircleDegrees( angle1 ).To3DXY();
|
||||
|
||||
var pos0z0 = pos0; pos0z0.Z = z0;
|
||||
var pos0z1 = pos0; pos0z1.Z = z1;
|
||||
|
||||
var pos1z0 = pos1; pos1z0.Z = z0;
|
||||
var pos1z1 = pos1; pos1z1.Z = z1;
|
||||
|
||||
// RJLog.Log(
|
||||
// "\nPOSITIONS:",
|
||||
// pos0z0, pos1z0, pos1z1, pos0z1,
|
||||
|
||||
// "\nNORMALS:",
|
||||
// pos0, pos1, pos1, pos0,
|
||||
|
||||
// "\nUV:",
|
||||
// new Vector2( u0, v0 ), new Vector2( u1, v0 ),
|
||||
// new Vector2( u1, v1 ), new Vector2( u0, v1 )
|
||||
// );
|
||||
|
||||
mg.AddQuad(
|
||||
pos0z1, pos1z1, pos1z0, pos0z0,
|
||||
pos0, pos1, pos1, pos0,
|
||||
new Vector2( u0, v1 ), new Vector2( u1, v1 ), new Vector2( u1, v0 ), new Vector2( u0, v0 )
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return mg;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void Initialize( bool normals = true, bool uvs = true, bool colors = false, bool uvs2 = false )
|
||||
{
|
||||
this.normals = normals ? new List<Vector3>() : null;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Rokojori
|
|||
}
|
||||
|
||||
|
||||
if ( lastIterations != numIterations )
|
||||
if ( lastIterations != numIterations || numIterations != graph.processOrderSize )
|
||||
{
|
||||
lastIterations = numIterations;
|
||||
var list = new List<RGGraphProcessor>();
|
||||
|
|
|
|||
|
|
@ -51,6 +51,8 @@ namespace Rokojori
|
|||
_processOrder.AddRange( order );
|
||||
}
|
||||
|
||||
public int processOrderSize => _processOrder.Count;
|
||||
|
||||
public void AddToProcessOrder( params RGGraphProcessor[] additional )
|
||||
{
|
||||
_processOrder.AddRange( additional );
|
||||
|
|
|
|||
|
|
@ -18,6 +18,20 @@ namespace Rokojori
|
|||
[Export]
|
||||
public int numVisible = 0;
|
||||
|
||||
public override bool IsSensor( InputEvent ev )
|
||||
{
|
||||
foreach ( var s in sensors )
|
||||
{
|
||||
if ( s != null && s.IsSensor( ev ) )
|
||||
{
|
||||
// this.LogInfo( "Is from combined:", s, Sensor.GetInputEventInfo( ev ) );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
protected override void UpdateValue()
|
||||
{
|
||||
var value = 0f;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=5 format=3 uid="uid://dfvs7wbygwmhk"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_3pq7c"]
|
||||
[ext_resource type="Script" uid="uid://e7fduwypgvwr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputMapActionSensor.cs" id="2_87mft"]
|
||||
[ext_resource type="Resource" uid="uid://cvjlv07g2nkfw" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Gamepad/Buttons/Button B, PS Circle, Nin A.tres" id="3_e1dcp"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_hydin"]
|
||||
script = ExtResource("2_87mft")
|
||||
inputActionName = "ui_cancel"
|
||||
metadata/_custom_type_script = "uid://e7fduwypgvwr"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3pq7c")
|
||||
sensors = [SubResource("Resource_hydin"), ExtResource("3_e1dcp")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=5 format=3 uid="uid://ciia3k58fa5w"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_5ww7h"]
|
||||
[ext_resource type="Script" uid="uid://e7fduwypgvwr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputMapActionSensor.cs" id="2_qe2fd"]
|
||||
[ext_resource type="Resource" uid="uid://dffkdky8iowro" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Gamepad/Buttons/Button A, PS Cross, Nin B.tres" id="3_wy52s"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1dc0j"]
|
||||
script = ExtResource("2_qe2fd")
|
||||
inputActionName = "ui_accept"
|
||||
metadata/_custom_type_script = "uid://e7fduwypgvwr"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5ww7h")
|
||||
sensors = [SubResource("Resource_1dc0j"), ExtResource("3_wy52s")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=4 format=3 uid="uid://ckyf78p517ga1"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_uc4e8"]
|
||||
[ext_resource type="Script" uid="uid://e7fduwypgvwr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputMapActionSensor.cs" id="2_l2qr3"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pb2so"]
|
||||
script = ExtResource("2_l2qr3")
|
||||
inputActionName = "ui_down"
|
||||
metadata/_custom_type_script = "uid://e7fduwypgvwr"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_uc4e8")
|
||||
sensors = [SubResource("Resource_pb2so")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=4 format=3 uid="uid://cqatyb80rpor0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_u5wou"]
|
||||
[ext_resource type="Script" uid="uid://e7fduwypgvwr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputMapActionSensor.cs" id="2_ibucs"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_n3xai"]
|
||||
script = ExtResource("2_ibucs")
|
||||
inputActionName = "ui_left"
|
||||
metadata/_custom_type_script = "uid://e7fduwypgvwr"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_u5wou")
|
||||
sensors = [SubResource("Resource_n3xai")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=3 format=3 uid="uid://ccff1bj35qcl0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_8e2n5"]
|
||||
[ext_resource type="Resource" uid="uid://jbud1yjmxysm" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Gamepad/Buttons/Shoulder Right, RB, R1.tres" id="2_m7ahn"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_8e2n5")
|
||||
sensors = [ExtResource("2_m7ahn")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=3 format=3 uid="uid://dtykoghdisv37"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_r1ua5"]
|
||||
[ext_resource type="Resource" uid="uid://cituiuw6e1fho" path="res://addons/rokojori_action_library/Runtime/Sensors/Default-Sensors/Gamepad/Buttons/Shoulder Left, LB, L1.tres" id="2_in8jh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_r1ua5")
|
||||
sensors = [ExtResource("2_in8jh")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="Resource" script_class="CombineSensor" load_steps=4 format=3 uid="uid://dafu3alp6wr25"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://eid0qnlvq4n1" path="res://addons/rokojori_action_library/Runtime/Sensors/CombineSensor.cs" id="1_rqdfo"]
|
||||
[ext_resource type="Script" uid="uid://e7fduwypgvwr" path="res://addons/rokojori_action_library/Runtime/Sensors/InputMapActionSensor.cs" id="2_oj4wy"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tuqbj"]
|
||||
script = ExtResource("2_oj4wy")
|
||||
inputActionName = "ui_right"
|
||||
metadata/_custom_type_script = "uid://e7fduwypgvwr"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_rqdfo")
|
||||
sensors = [SubResource("Resource_tuqbj")]
|
||||
metadata/_custom_type_script = "uid://eid0qnlvq4n1"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue