diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..317022b9 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +ko_fi: marcusaga diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 064e41af..8339effb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,7 +48,5 @@ jobs: run: scripts/doc-links.py - name: pass-span-lint run: scripts/pass-span-lint.py - - name: player-build - run: cargo build -p benilla --no-default-features - name: player-tests run: cargo test -p benilla-formats -p benilla-app --no-default-features --lib diff --git a/Cargo.lock b/Cargo.lock index aba3867d..7afa1b73 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -546,6 +546,7 @@ dependencies = [ "toml", "wgpu", "windows-sys 0.59.0", + "winit", ] [[package]] @@ -3048,15 +3049,6 @@ dependencies = [ "syn", ] -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - [[package]] name = "epaint" version = "0.33.3" @@ -4120,7 +4112,7 @@ checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" [[package]] name = "kira" -version = "0.12.1" +version = "0.12.4" dependencies = [ "atomic-arena", "glam 0.33.2", @@ -5664,6 +5656,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cab834c73d247e67f4fae452806d17d3c7501756d98c8808d7c9c7aa7d18f973" + [[package]] name = "regex-syntax" version = "0.8.10" @@ -6181,9 +6179,9 @@ dependencies = [ [[package]] name = "symphonia" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5773a4c030a19d9bfaa090f49746ff35c75dfddfa700df7a5939d5e076a57039" +checksum = "a7edef6a96b696d4e0cab5ee9ebb7ca155ed95f30a6b45bbb8b97d2727f02424" dependencies = [ "lazy_static", "symphonia-bundle-mp3", @@ -6196,21 +6194,20 @@ dependencies = [ [[package]] name = "symphonia-bundle-mp3" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4872dd6bb56bf5eac799e3e957aa1981086c3e613b27e0ac23b176054f7c57ed" +checksum = "98ea5ffc8716bff677dfb3b01b420c7b758de901a72b8c330bf2040ab74b4add" dependencies = [ "lazy_static", "log", "symphonia-core", - "symphonia-metadata", ] [[package]] name = "symphonia-codec-adpcm" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dddc50e2bbea4cfe027441eece77c46b9f319748605ab8f3443350129ddd07f" +checksum = "445932ecb0c59362fde9c082dd63a75380650c5077fdb8b80b8cac850442a74c" dependencies = [ "log", "symphonia-core", @@ -6218,9 +6215,9 @@ dependencies = [ [[package]] name = "symphonia-codec-pcm" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e89d716c01541ad3ebe7c91ce4c8d38a7cf266a3f7b2f090b108fb0cb031d95" +checksum = "e04ba75686acbe43542fdd374571195f0530c0b7785ca25cc6840e9c6c4b6eea" dependencies = [ "log", "symphonia-core", @@ -6228,22 +6225,23 @@ dependencies = [ [[package]] name = "symphonia-core" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea00cc4f79b7f6bb7ff87eddc065a1066f3a43fe1875979056672c9ef948c2af" +checksum = "01c412864d599d4750d0c3d684d7e093ec05e5309681ef5252cc1096a437f6e0" dependencies = [ - "arrayvec", - "bitflags 1.3.2", + "bitflags 2.11.1", "bytemuck", "lazy_static", "log", + "num-complex", + "smallvec", ] [[package]] name = "symphonia-format-riff" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2d7c3df0e7d94efb68401d81906eae73c02b40d5ec1a141962c592d0f11a96f" +checksum = "1ff70929083a8c1a5f6cd7c904b6071c7914ad04739b510c2f7239dfc9b7dabe" dependencies = [ "extended", "log", @@ -6253,13 +6251,14 @@ dependencies = [ [[package]] name = "symphonia-metadata" -version = "0.5.5" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36306ff42b9ffe6e5afc99d49e121e0bd62fe79b9db7b9681d48e29fa19e6b16" +checksum = "83713a97705d77bdef7cdbc0768fd6e5a54e4cd7e48d60a806ae85639e2c87c6" dependencies = [ - "encoding_rs", "lazy_static", "log", + "regex-lite", + "smallvec", "symphonia-core", ] diff --git a/Cargo.toml b/Cargo.toml index d21c0339..aa2440d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,7 +39,7 @@ sha1 = "0.10.6" # the hunks and the command that checks them: `third_party/lua-src/BENILLA.md`. [patch.crates-io] lua-src = { path = "third_party/lua-src" } -# kira 0.12.1, patched to compute spatial gains and the volume tween per output chunk and +# kira 0.12.4, patched to compute spatial gains and the volume tween per output chunk and # interpolate them, not per sample frame (`third_party/kira/BENILLA.md`). kira = { path = "third_party/kira" } diff --git a/LIGHTING.md b/LIGHTING.md index 7671e51a..0fa9df0d 100644 --- a/LIGHTING.md +++ b/LIGHTING.md @@ -12,33 +12,33 @@ behind each constant. ## What it does -| Lane | What you see | Main switch | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Sun shadows, characters | real silhouettes for units instead of the oval blob | `characterShadows` | -| Sun shadows, world | trees, buildings and alpha-tested foliage cast; baked terrain shadows step aside; the static caster cache also refreshes when streamed geometry arrives, so a standing camera picks up late trees (`world_shadow.rs::refresh_streamed_shadows`, independent of volumetric fog) | `worldShadows` | -| Dynamic interiors | WMO rooms are lit per fragment by their own fixtures with a soft falloff, gated per room so light does not leak through walls | `interiorLight`, `interiorRoomGate` | -| Synthesised lights | torches, braziers, lanterns, campfires and lampposts emit a light in the colour of their flame, with flicker | `fireLightGain`, `fireFlicker` | -| Torch shadows | cube-map shadows from point lights onto buildings, models and terrain, with a contact-hardening penumbra and a shadow floor | `interiorShadows`, `exteriorShadows`, `torchShadowStrength`, `interiorShadowSoft` | -| Daylight and doorways | calibrated fixtures at doors, windows and open boundaries carry daylight into a room, and doorways between rooms bleed light | `interiorDaylight`, env `WOW_DAYLIGHT`, `WOW_BLEED` | -| Terrain in torch shadows | the ground casts into an outdoor fire's cube map, so a hill or bank blocks the fire (settled exterior slots only; `torch_terrain.rs` gathers the resident MCNK chunks inside the cube's 48 yd; the gather and the ground receiver both work, but stock Elwynn lamps/campfires show no visible change: the terrain-blocked ground is grazing (N·L ≈ 0, inside the 0.15 yd normal offset) or at the pool rim, below one 8-bit step — measured by the `lamp_terrain_occlusion_scan` census) | `torchTerrainShadows` (default 0, High 1), env `WOW_TORCH_TERRAIN=0\|1` | -| City day floor | `interiorDaylight`'s room floor also reaches Stormwind/Ironforge rooms that the portal graph connects to the sky (an exterior-facing portal, or one hop from one; `district_sky_rooms` in `daylight.rs`); before this no city room could take it | `interiorDaylight` (default 0, suggested High 0.10) | -| Spell and firework lights | fire, holy and fel effects light their surroundings for their lifetime; frost, nature, arcane and shadow do not | `spellLightGain`, env `WOW_SPELL_LIGHT=0` | -| Moon shadows | at night the same shadow rig re-aims at the moon and casts a faint shadow; dims only the night sky term, never point lights | `moonShadowStrength` | -| Moonlight | GFX (moonlight): the moon as a light. The stock 1.12 night (Light.dbc night colours on the never-setting lighting sun) stays the base; a cool (0.62, 0.74, 1.0), dim directional term from the visible white moon (`daynight::moon_direction`, the disc the sky draws) is ADDED per fragment with a soft-wrapped N·L on terrain, models, WMO exteriors and retained doodads, shadowed by the moon's own map (`shadow_hook::realtime_shadow_moonlit` `.z`, faded in with the rig's hand-over ramp). It ramps with the moon's elevation (0-12°) and out with the sun, dims under storms, and never reaches interiors or the glue booth. Packed as MonkeyFrame row 16 (`moon`: direction + intensity, base 0.16 gamma at `moonLight 1`) and `misc.w` (hand-over confidence); the per-frame blob is 8800 B (`lighting/moonlight.rs`, `moonlight_hook.wgsl`) | Advanced Graphics → Moonlight, cvar `moonLight` 0..2 (0 = the reference night, bit for bit; Graphics preset Low..Ultra = 1) | -| Ground-effect spells | Flamestrike, Rain of Fire, Consecration, Flare and fire traps light the ground for their duration; frost and nature areas stay dark | `spellLightGain` | -| Volumetric fog | near-field haze that converges on the zone fog colour (clear within 10 yd, full by 150 yd; mistier at dawn and in bad weather, faint indoors; the dawn curve follows the rendered clock, so a manual or capture time sets it; over an ocean a point below sea level is hazed at the sea surface, since water writes no depth) and daytime sun shafts through gaps beyond 10 yd, sampled from the shadow map (never moon shafts: they are gated by daylight; retired while Volumetric Light is on); own fullscreen pass after the main pass (`benilla-app/src/volumetric_fog.rs`) | Advanced Graphics → Volumetric Fog (Off/Low/High), cvar `volumetricFog`, env `WOW_VOLFOG=0\|1\|2` | -| Volumetric light | GFX (volumetric light): shadow-mapped sun and moon shafts. The directional light the shadow rig holds (sun by day, moon at night) is ray-marched along each view ray at HALF resolution: 16 (Medium) or 32 (High) samples, quadratic spacing from 0.35 yd (dense near the eye), a per-pixel interleaved-gradient-noise offset, cascade lookups with the covered-sample mean past the cascades, air thinning with height above the eye (10 yd e-fold, so shafts live under canopies and between buildings rather than in the open sky), a Henyey-Greenstein g = 0.6 phase with a quarter isotropic. A depth-aware 4x4 half-res blur removes the jitter and a depth-aware 2x2 upsample composites it with the fog pass's soft screen curve. Extinction = the volumetric fog density law (dawn mist, weather) x the zone's fog end (350 yd reference, x0.7-2.5); colour = sun diffuse (or the moon tint x moonlight intensity, faint) leaned 35 % toward the zone fog hue. No shafts in WMO interiors. While it is on, the volumetric fog pass retires its own midpoint shafts and keeps only its haze and lamp halos. Three passes after the fog node (`benilla-app/src/volumetric_light.rs` + `.wgsl`); no temporal history. Dev capture levers `WOW_VOLLIGHT_DENSITY/_HEIGHT/_GAIN/_DEBUG` (1 = the in-scatter alone) | Advanced Graphics → Volumetric Light (Off/Medium/High) + Volumetric Light Strength 0..2, cvars `volumetricLight`, `volumetricLightStrength`, env `WOW_VOLLIGHT=0\|1\|2`; Graphics preset Medium = 1, High/Ultra = 2 | -| Sky dithering | a faint screen-space dither in the FFXGlow combine so smooth sky and fog gradients do not band (MONKEY p0; was env-only) | Advanced Graphics → Sky Dithering, cvar `skyDither` 0/1 (default 0, Graphics preset High = 1), env `WOW_DITHER=1` still forces it on; bridge in `benilla-app/src/monkey_gfx.rs` | -| HDR emission and bloom | lit WMO windows, additive models/particles and magma can exceed display white; a soft-capped fullscreen halo is added before the faithful FFX clamp | Advanced Graphics → Bloom (Off/Low/High), cvar `bloom`; Off is the unchanged reference image, suggested High preset value 2 | -| Sky quality | Enhanced: the five Light.dbc sky stops through a smooth monotone curve in linear light (no bands at the rings), a soft sun glow tinted by sun and fog colour (fades at night and under cloud), a procedural star field with twinkle and a faint Milky Way over the stock `Stars.m2`. High adds domain-warped cloud detail and sun-lit clouds (self-shadow, silver lining; technique from WarcraftXL, see `THIRD-PARTY.md`). Classic is the reference sky unchanged | Advanced Graphics → Sky Quality, cvar `skyQuality` 0 Classic / 1 Enhanced / 2 High, env `WOW_SKY_QUALITY` | -| Modern fog | MONKEY (fog): radial distance fog with a gradual exponential curve, a daylight sun lobe, and an end colour shared by the world, WDL hull, sky horizon and volumetric haze. Each zone keeps its authored fog end up to the reference view-distance limit; optional `LightFogBand.dbc` rows provide height, sun and end-fog controls. Interior WMO fog stays classic | Advanced Graphics → Modern Fog, cvar `fogModel` 0 Classic (default) / 1 Modern (High = 1), env `WOW_FOGMODEL=0\|1`; `fog_hook.wgsl`, `lighting/fog_model.rs`, `light/fog_band.rs` | -| Rain on surfaces | MONKEY (wet): rain gradually darkens and saturates exposed terrain and models, adds puddles and a sky/sun sheen, and produces rings on exterior Enhanced water. Wetness rises over roughly 90 seconds and dries over roughly four minutes; MONKEY (rainshelter): a camera-centred rain-occlusion map (128² cells of 0.75 yd, filled by vertical collision rays) keeps ground, walls and water under roofs, porches and bridges dry, with a ~1.5 yd drip margin and a soft edge; tree canopies without colliders do not shelter | Advanced Graphics → Wet Surfaces in Rain, cvar `rainSurfaces` 0/1 (default and High 1), env `WOW_RAIN_SURFACES`, `WOW_WETNESS`, `WOW_WET_T`; `weather/wetness.rs`, `weather/shelter.rs`, `wet_hook.wgsl` | -| Foliage wind | one weather-fed gust/veer field drives grass and classified tree/bush foliage; grass also parts around the player and nearby units | Advanced Graphics → Foliage Wind, cvar `foliageWind` 0 Off / 1 Grass / 2 Grass + Trees (High = 2), plus the slider Foliage Wind Strength, cvar `foliageWindStrength` 0.25..3 (default 1, not on the preset ladder; a gain on the sway, not the parting; a storm adds up to +60 %). Tuning at 1 (fix-wind): grass tips about ±0.2-0.3 yd on a 2.5 s wave with 1.1 s cross flutter, gust bands 55 yd wide rolling downwind; tree crowns about ±0.3 yd (lever-arm weight grows with height to 1.3x at 8.5 yd) on a 4 s sway, 5.5 s side wave, 0.8 s leaf flutter; bent tips dip slightly. capture override `WOW_FOLIAGE_WIND` (dev build + `WOW_CAPTURE` only); field and benders in `benilla-world/src/wind/`. The wave phase is the CPU-integrated travel (speed integrated over time, wrapped seamlessly), and the waves' spatial term uses the fixed profile heading; the veer turns only the bend. Tree exile copies sway through material marker bit 14 (`FOLIAGE_WIND_MARKER`). Capture offset `WOW_CAPTURE_WIND_T` (s). Known: shadow casters (world-shadow proxies, `torch_depth.wgsl`) do not apply the sway, so leaves sample a static shadow; a future world-camera DepthPrepass must call the same offsets | -| Ambient occlusion | soft contact shadows under props, in wall-floor corners and around feet; depth-only SSAO at half resolution (depth-reconstructed normals, 6/12 spiral taps, 4x4 depth-aware blur, bilateral upsample) multiplied into the opaque scene after the opaque pass and before the water copy, so water, particles and UI are untouched; fades out 45-90 yd (Low) / 60-120 yd (High), spares sky and bright pixels; on alpha-tested foliage (a dense window of two-sided depth spikes) the blur widens its depth tolerance and the AO drops 40 %, which removes the leaf grain while planes, silhouettes and contact creases keep full AO (`benilla-app/src/ssao.rs`, `benilla-app/src/shaders/ssao.wgsl`) | Advanced Graphics → Ambient Occlusion (Off/Low/High; default Off, High preset 2), cvar `ambientOcclusion`, env `WOW_AO=0\|1\|2`, `WOW_AO_DEBUG=1..5` diagnostic views (factor, protection, distance, raw occlusion, foliage mask), `WOW_AO_GAIN`/`_RADIUS`/`_BIAS`/`_STRENGTH` tuning | -| Lamp fog | MONKEY (lampfog): the fog fullscreen pass selects the nearest resolved exterior and interior point-table sources and analytically integrates their softened inverse-square light over the camera-to-scene-depth ray. A near-field haze floor makes lamps visible inside the ordinary volumetric haze's 10 yd clear zone; it is zero by day, stronger in rain/fog, and deliberately unshadowed. The table colour already includes intensity, flame flicker and `fireLightGain`. Halo output uses destination headroom and stays below 1.0, so a later bloom pass cannot blow it out | Advanced Graphics → Lamp Fog, cvar `lampFog` 0 Off (default, unchanged) / 1 Low (16 lamps) / 2 High (32 lamps; Graphics preset High = 2), env `WOW_LAMPFOG=0\|1\|2`; `benilla-app/src/volumetric_fog.rs` | -| City window daylight | MONKEY (fix-daylight/integration): a district WMO's oversized window batch (e.g. the Cathedral of Light's stained-glass walls) is split into window-sized daylight apertures, so the nave takes daylight pane by pane. Applies to WMOs loaded after a change | Advanced Graphics → City Window Daylight, cvar `daylightWindowSplit` 0/1 (default 1, the merged behaviour); `benilla-world/src/lighting/daylight.rs` (`set_window_split`), bridge `benilla-app/src/dynamic_interior.rs` | -| Zone skyboxes | the painted sky a zone's `LightParams` names (clear-weather slot, storm slot lerped by the storm blend) for the living, fading in by the Light sphere falloff with the modern client's crossfade (ghost > WMO > zone); extended `LightSkybox.dbc` flags `0x1` day cycle, `0x2` keep sun/moon/stars/clouds, `0x4` fog-colour horizon cone, `0x8` forces the screen-space sun shafts through a low or just-set sun (the sky's weight lifts their daylight fade; `post/sun_shafts.rs`), `0x10` fades the Modern fog's sun-colour lobe out by the sky's weight (`lighting/fog_model.rs`), plus a celestial second model; every skybox now plays its bones, texture transforms, colour and alpha tracks (`benilla-world/src/skybox.rs`, `skybox_anim.rs`, `benilla-formats/src/light/skybox.rs`) | Advanced Graphics → Zone Skyboxes, cvar `zoneSkyboxes` (0 Off default, 1 On; High = 1), env `WOW_ZONE_SKYBOXES=0\|1` | -| Night and interior level | global dimming of the night sky term and of interior ambient | `nightGain`, `interiorGain`, `interiorBakeFloor` | +| Lane | What you see | Main switch | +|---|---|---| +| Sun shadows, characters | real silhouettes for units instead of the oval blob | `characterShadows` | +| Sun shadows, world | trees, buildings and alpha-tested foliage cast; baked terrain shadows step aside, and so does the MCSH 0.5 sun dim on models standing on them (`wow_model.wgsl` / `static_gx.wgsl`, terrain's gate and dusk weight); the static caster cache also refreshes when streamed geometry arrives, so a standing camera picks up late trees (`world_shadow.rs::refresh_streamed_shadows`, independent of volumetric fog) | `worldShadows` | +| Dynamic interiors | WMO rooms are lit per fragment by their own fixtures with a soft falloff, gated per room so light does not leak through walls | `interiorLight`, `interiorRoomGate` | +| Synthesised lights | torches, braziers, lanterns, campfires and lampposts emit a light in the colour of their flame, with flicker | `fireLightGain`, `fireFlicker` | +| Torch shadows | cube-map shadows from point lights onto buildings, models and terrain, with a contact-hardening penumbra and a shadow floor | `interiorShadows`, `exteriorShadows`, `torchShadowStrength`, `interiorShadowSoft` | +| Daylight and doorways | calibrated fixtures at doors, windows and open boundaries carry daylight into a room, and doorways between rooms bleed light | `interiorDaylight`, env `WOW_DAYLIGHT`, `WOW_BLEED` | +| Terrain in torch shadows | the ground casts into an outdoor fire's cube map, so a hill or bank blocks the fire (settled exterior slots only; `torch_terrain.rs` gathers the resident MCNK chunks inside the cube's 48 yd; the gather and the ground receiver both work, but stock Elwynn lamps/campfires show no visible change: the terrain-blocked ground is grazing (N·L ≈ 0, inside the 0.15 yd normal offset) or at the pool rim, below one 8-bit step — measured by the `lamp_terrain_occlusion_scan` census) | `torchTerrainShadows` (default 0, High 1), env `WOW_TORCH_TERRAIN=0\|1` | +| City day floor | `interiorDaylight`'s room floor also reaches Stormwind/Ironforge rooms that the portal graph connects to the sky (an exterior-facing portal, or one hop from one; `district_sky_rooms` in `daylight.rs`); before this no city room could take it | `interiorDaylight` (default 0, suggested High 0.10) | +| Spell and firework lights | fire, holy and fel effects light their surroundings for their lifetime; frost, nature, arcane and shadow do not | `spellLightGain`, env `WOW_SPELL_LIGHT=0` | +| Moon shadows | at night the same shadow rig re-aims at the moon and casts a faint shadow; dims only the night sky term, never point lights | `moonShadowStrength` | +| Moonlight | GFX (moonlight): the moon as a light. The stock 1.12 night (Light.dbc night colours on the never-setting lighting sun) stays the base; a cool (0.62, 0.74, 1.0), dim directional term from the visible white moon (`daynight::moon_direction`, the disc the sky draws) is ADDED per fragment with a soft-wrapped N·L on terrain, models, WMO exteriors and retained doodads, shadowed by the moon's own map (`shadow_hook::realtime_shadow_moonlit` `.z`, faded in with the rig's hand-over ramp). It ramps with the moon's elevation (0-12°) and out with the sun, dims under storms, and never reaches interiors or the glue booth. Packed as MonkeyFrame row 16 (`moon`: direction + intensity, base 0.16 gamma at `moonLight 1`) and `misc.w` (hand-over confidence); the per-frame blob is 8800 B (`lighting/moonlight.rs`, `moonlight_hook.wgsl`) | Advanced Graphics → Moonlight, cvar `moonLight` 0..2 (0 = the reference night, bit for bit; Graphics preset Low..Ultra = 1) | +| Ground-effect spells | Flamestrike, Rain of Fire, Consecration, Flare and fire traps light the ground for their duration; frost and nature areas stay dark | `spellLightGain` | +| Volumetric fog | near-field haze that converges on the zone fog colour (clear within 10 yd, full by 150 yd; mistier at dawn and in bad weather, faint indoors; the dawn curve follows the rendered clock, so a manual or capture time sets it; over an ocean a point below sea level is hazed at the sea surface, since water writes no depth) and daytime sun shafts through gaps beyond 10 yd, sampled from the shadow map (never moon shafts: they are gated by daylight; retired while Volumetric Light is on); own fullscreen pass after the main pass (`benilla-app/src/volumetric_fog.rs`) | Advanced Graphics → Volumetric Fog (Off/Low/High), cvar `volumetricFog`, env `WOW_VOLFOG=0\|1\|2` | +| Volumetric light | GFX (volumetric light): shadow-mapped sun and moon shafts. The directional light the shadow rig holds (sun by day, moon at night) is ray-marched along each view ray at HALF resolution: 16 (Medium) or 32 (High) samples, quadratic spacing from 0.35 yd (dense near the eye), a per-pixel interleaved-gradient-noise offset, cascade lookups with the covered-sample mean past the cascades, air thinning with height above the eye (10 yd e-fold, so shafts live under canopies and between buildings rather than in the open sky), a Henyey-Greenstein g = 0.6 phase with a quarter isotropic. A depth-aware 4x4 half-res blur removes the jitter and a depth-aware 2x2 upsample composites it with the fog pass's soft screen curve. Extinction = the volumetric fog density law (dawn mist, weather) x the zone's fog end (350 yd reference, x0.7-2.5); colour = sun diffuse (or the moon tint x moonlight intensity, faint) leaned 35 % toward the zone fog hue. No shafts in WMO interiors. While it is on, the volumetric fog pass retires its own midpoint shafts and keeps only its haze and lamp halos. Three passes after the fog node (`benilla-app/src/volumetric_light.rs` + `.wgsl`); no temporal history. Dev capture levers `WOW_VOLLIGHT_DENSITY/_HEIGHT/_GAIN/_DEBUG` (1 = the in-scatter alone) | Advanced Graphics → Volumetric Light (Off/Medium/High) + Volumetric Light Strength 0..2, cvars `volumetricLight`, `volumetricLightStrength`, env `WOW_VOLLIGHT=0\|1\|2`; Graphics preset Medium = 1, High/Ultra = 2 | +| Sky dithering | a faint screen-space dither in the FFXGlow combine so smooth sky and fog gradients do not band (MONKEY p0; was env-only) | Advanced Graphics → Sky Dithering, cvar `skyDither` 0/1 (default 0, Graphics preset High = 1), env `WOW_DITHER=1` still forces it on; bridge in `benilla-app/src/monkey_gfx.rs` | +| HDR emission and bloom | lit WMO windows, additive models/particles and magma can exceed display white; a soft-capped fullscreen halo is added before the faithful FFX clamp | Advanced Graphics → Bloom (Off/Low/High), cvar `bloom`; Off is the unchanged reference image, suggested High preset value 2 | +| Sky quality | Enhanced: the five Light.dbc sky stops through a smooth monotone curve in linear light (no bands at the rings), a soft sun glow tinted by sun and fog colour (fades at night and under cloud), a procedural star field with twinkle and a faint Milky Way over the stock `Stars.m2`. High adds domain-warped cloud detail and sun-lit clouds (self-shadow, silver lining; technique from WarcraftXL, see `THIRD-PARTY.md`). Classic is the reference sky unchanged | Advanced Graphics → Sky Quality, cvar `skyQuality` 0 Classic / 1 Enhanced / 2 High, env `WOW_SKY_QUALITY` | +| Modern fog | MONKEY (fog): radial distance fog with a gradual exponential curve, a daylight sun lobe, and an end colour shared by the world, WDL hull, sky horizon and volumetric haze. Each zone keeps its authored fog end up to the reference view-distance limit; optional `LightFogBand.dbc` rows provide height, sun and end-fog controls. Interior WMO fog stays classic | Advanced Graphics → Modern Fog, cvar `fogModel` 0 Classic (default) / 1 Modern (High = 1), env `WOW_FOGMODEL=0\|1`; `fog_hook.wgsl`, `lighting/fog_model.rs`, `light/fog_band.rs` | +| Rain on surfaces | MONKEY (wet): rain gradually darkens and saturates exposed terrain and models, adds puddles and a sky/sun sheen, and produces rings on exterior Enhanced water. Wetness rises over roughly 90 seconds and dries over roughly four minutes; MONKEY (rainshelter): a camera-centred rain-occlusion map (128² cells of 0.75 yd, filled by vertical collision rays) keeps ground, walls and water under roofs, porches and bridges dry, with a ~1.5 yd drip margin and a soft edge; tree canopies without colliders do not shelter | Advanced Graphics → Wet Surfaces in Rain, cvar `rainSurfaces` 0/1 (default and High 1), env `WOW_RAIN_SURFACES`, `WOW_WETNESS`, `WOW_WET_T`; `weather/wetness.rs`, `weather/shelter.rs`, `wet_hook.wgsl` | +| Foliage wind | one weather-fed gust/veer field drives grass and classified tree/bush foliage; grass also parts around the player and nearby units | Advanced Graphics → Foliage Wind, cvar `foliageWind` 0 Off / 1 Grass / 2 Grass + Trees (High = 2), plus the slider Foliage Wind Strength, cvar `foliageWindStrength` 0.25..3 (default 1, not on the preset ladder; a gain on the sway, not the parting; a storm adds up to +60 %). Tuning at 1 (fix-wind): grass tips about ±0.2-0.3 yd on a 2.5 s wave with 1.1 s cross flutter, gust bands 55 yd wide rolling downwind; tree crowns about ±0.3 yd (lever-arm weight grows with height to 1.3x at 8.5 yd) on a 4 s sway, 5.5 s side wave, 0.8 s leaf flutter; bent tips dip slightly. capture override `WOW_FOLIAGE_WIND` (dev build + `WOW_CAPTURE` only); field and benders in `benilla-world/src/wind/`. The wave phase is the CPU-integrated travel (speed integrated over time, wrapped seamlessly), and the waves' spatial term uses the fixed profile heading; the veer turns only the bend. Tree exile copies sway through material marker bit 14 (`FOLIAGE_WIND_MARKER`). Capture offset `WOW_CAPTURE_WIND_T` (s). Known: shadow casters (world-shadow proxies, `torch_depth.wgsl`) do not apply the sway, so leaves sample a static shadow; a future world-camera DepthPrepass must call the same offsets | +| Ambient occlusion | soft contact shadows under props, in wall-floor corners and around feet; depth-only SSAO at half resolution (depth-reconstructed normals, 6/12 spiral taps, 4x4 depth-aware blur, bilateral upsample) multiplied into the opaque scene after the opaque pass and before the water copy, so water, particles and UI are untouched; fades out 45-90 yd (Low) / 60-120 yd (High), spares sky and bright pixels; on alpha-tested foliage (a dense window of two-sided depth spikes) the blur widens its depth tolerance and the AO drops 40 %, which removes the leaf grain while planes, silhouettes and contact creases keep full AO (`benilla-app/src/ssao.rs`, `benilla-app/src/shaders/ssao.wgsl`) | Advanced Graphics → Ambient Occlusion (Off/Low/High; default Off, High preset 2), cvar `ambientOcclusion`, env `WOW_AO=0\|1\|2`, `WOW_AO_DEBUG=1..5` diagnostic views (factor, protection, distance, raw occlusion, foliage mask), `WOW_AO_GAIN`/`_RADIUS`/`_BIAS`/`_STRENGTH` tuning | +| Lamp fog | MONKEY (lampfog): the fog fullscreen pass selects the nearest resolved exterior and interior point-table sources and analytically integrates their softened inverse-square light over the camera-to-scene-depth ray. A near-field haze floor makes lamps visible inside the ordinary volumetric haze's 10 yd clear zone; it is zero by day, stronger in rain/fog, and deliberately unshadowed. The table colour already includes intensity, flame flicker and `fireLightGain`. Halo output uses destination headroom and stays below 1.0, so a later bloom pass cannot blow it out | Advanced Graphics → Lamp Fog, cvar `lampFog` 0 Off (default, unchanged) / 1 Low (16 lamps) / 2 High (32 lamps; Graphics preset High = 2), env `WOW_LAMPFOG=0\|1\|2`; `benilla-app/src/volumetric_fog.rs` | +| City window daylight | MONKEY (fix-daylight/integration): a district WMO's oversized window batch (e.g. the Cathedral of Light's stained-glass walls) is split into window-sized daylight apertures, so the nave takes daylight pane by pane. Applies to WMOs loaded after a change | Advanced Graphics → City Window Daylight, cvar `daylightWindowSplit` 0/1 (default 1, the merged behaviour); `benilla-world/src/lighting/daylight.rs` (`set_window_split`), bridge `benilla-app/src/dynamic_interior.rs` | +| Zone skyboxes | the painted sky a zone's `LightParams` names (clear-weather slot, storm slot lerped by the storm blend) for the living, fading in by the Light sphere falloff with the modern client's crossfade (ghost > WMO > zone); extended `LightSkybox.dbc` flags `0x1` day cycle, `0x2` keep sun/moon/stars/clouds, `0x4` fog-colour horizon cone, `0x8` forces the screen-space sun shafts through a low or just-set sun (the sky's weight lifts their daylight fade; `post/sun_shafts.rs`), `0x10` fades the Modern fog's sun-colour lobe out by the sky's weight (`lighting/fog_model.rs`), plus a celestial second model; every skybox now plays its bones, texture transforms, colour and alpha tracks (`benilla-world/src/skybox.rs`, `skybox_anim.rs`, `benilla-formats/src/light/skybox.rs`) | Advanced Graphics → Zone Skyboxes, cvar `zoneSkyboxes` (0 Off default, 1 On; High = 1), env `WOW_ZONE_SKYBOXES=0\|1` | +| Night and interior level | global dimming of the night sky term and of interior ambient | `nightGain`, `interiorGain`, `interiorBakeFloor` | `zoneSkyboxes = 0` disables only the added living-player zone slot. WMO and ghost skyboxes are the reference 1.12 slots, so their fidelity fixes remain active in Classic: authored colour and diff --git a/WATER.md b/WATER.md index 94f74014..ae0f54a9 100644 --- a/WATER.md +++ b/WATER.md @@ -27,32 +27,33 @@ technique is listed in the table below, and the file is listed in [`THIRD-PARTY.md`](THIRD-PARTY.md), the one table of every WarcraftXL-derived file across the fork. Do not remove any of them. -| Technique | Status here | From WarcraftXL | -| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -| Visual-only wave riding for swimmers (authoritative position never moves) | shipped (`water_fx/bob.rs`) | same principle as `world/Ride.cpp`, implemented independently | -| Shore surf limited by the TERRAIN column, so objects in the water never foam | shipped (authored depth gate, `on_bed`) | principle from `sea/Shore.hpp` | -| Per-channel extinction + scene-copy refraction | shipped (`enhanced_water.wgsl` DEPTH LOOK; bent samples landing on anything in front of the water are refused via the scene depth) | ported from `shaders/Surface.ps.hlsl`, `render/Refraction.cpp` | -| Caustics, two layers at incommensurate scales/rates | shipped (floor web; built from animated cell edges, not value noise) | ported from `shaders/Surface.ps.hlsl`, `render/Noise.cpp` | -| Screen-space reflection of the scenery | shipped on `High` (a bisected march against the scene depth, not WXL's single probe) | principle from `shaders/Surface.ps.hlsl` | -| Gerstner trains + breaker index, crest-fold foam | planned | `sea/Spectrum.*`, `sea/Shore.hpp`, `shaders/Wave.hlsli` | -| Specular lobe widened by the normal's screen derivative, distance glints | shipped / planned | `shaders/Surface.ps.hlsl` | +| Technique | Status here | From WarcraftXL | +|---|---|---| +| Visual-only wave riding for swimmers (authoritative position never moves) | shipped (`water_fx/bob.rs`) | same principle as `world/Ride.cpp`, implemented independently | +| Shore surf limited by the TERRAIN column, so objects in the water never foam | shipped (authored depth gate, `on_bed`) | principle from `sea/Shore.hpp` | +| Per-channel extinction + scene-copy refraction | shipped (`enhanced_water.wgsl` DEPTH LOOK; bent samples landing on anything in front of the water are refused via the scene depth) | ported from `shaders/Surface.ps.hlsl`, `render/Refraction.cpp` | +| Caustics, two layers at incommensurate scales/rates | shipped (floor web; built from animated cell edges, not value noise) | ported from `shaders/Surface.ps.hlsl`, `render/Noise.cpp` | +| Screen-space reflection of the scenery | the planar mirror's fallback for water at another height than the mirror plane (a bisected march against the scene depth, not WXL's single probe; a bisected hit still deep behind the depth is a ray passing behind an occluder and marches on) | principle from `shaders/Surface.ps.hlsl` | +| Gerstner trains + breaker index, crest-fold foam | planned | `sea/Spectrum.*`, `sea/Shore.hpp`, `shaders/Wave.hlsli` | +| Specular lobe widened by the normal's screen derivative, distance glints | shipped / planned | `shaders/Surface.ps.hlsl` | ## What it does -| Lane | What you see | Main switch | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------- | -| Quality tiers | `Classic` = the reference water, `Enhanced`, `High` (= Enhanced + scenery reflections) | Video options → Water Quality, cvar `waterQuality`, env `WOW_WATER=0\|1\|2` | -| Procedural waves | multi-band analytic waves with exact normals; the long swell moves ocean vertices | tier | -| Open-sea whitecaps | High adds Gerstner crest gathering and fold-thresholded foam; calm canals remain clear. The fold mask adds the next two wave bands, a slow domain-warped gust field moves the break threshold and calms patches, and ~6 yd segments break each crest into short runs, so the caps do not form a lattice (`whitecap_fold`, `enhanced_water.wgsl`) | tier | -| Near mesh refinement | High builds a transient 4x liquid lattice within 64 yd, with an 80 yd release ring | tier | -| Ocean / inland profiles | the sea and lakes/rivers have their own colour, energy and reflectivity | tier | -| WMO pools | exterior canals use a calm drifting profile with outdoor glints; interiors use their authored MOMT colour and room-fog reflection | tier | -| Depth look | light fades per channel over the real path through the water; the bed is seen through it, bent by the waves; sunlit shallows carry a caustic web | tier | -| Reflection and glints | Fresnel sky reflection from the zone's sky rows, sun path, moon path, point-light glints | tier | -| Beach surf | a travelling wave front, a lace of foam that dissolves behind it, a swash sheet on the sand | tier | -| Swimmers | wake foam, treading rings and a visual-only bob with the swell | tier | -| Lava glow | magma surfaces emit warm point lights through the lighting module | Advanced Graphics → Lava Glow, `lavaLightGain` | -| Lava HDR | magma partially resists distance fog and feeds the screen-space halo | Advanced Graphics → Bloom, `bloom` (Off/Low/High) | +| Lane | What you see | Main switch | +|---|---|---| +| Quality tiers | `Classic` = the reference water, `Enhanced`, `High` (= Enhanced + scenery reflections) | Video options → Water Quality, cvar `waterQuality`, env `WOW_WATER=0\|1\|2` | +| Planar reflections | High only: the scene drawn a second time from the eye mirrored in the water plane the view looks at (half resolution, clipped at the plane by an oblique near plane, no water, no sun shadow cascades), so docks reflect their undersides and anything above the frame reflects; water at another height falls back to the screen-space march. About +1 ms CPU per frame, GPU about even (the march is skipped where the mirror covers). It REPLACES screen-space reflections on High; there is no player option | tier; dev env `WOW_WATER_REFLECT=0\|1` (0 = screen-space only, for A/B) | +| Procedural waves | multi-band analytic waves with exact normals; the long swell moves ocean vertices | tier | +| Open-sea whitecaps | High adds Gerstner crest gathering and fold-thresholded foam; calm canals remain clear. The fold mask adds the next two wave bands, a slow domain-warped gust field moves the break threshold and calms patches, and ~6 yd segments break each crest into short runs, so the caps do not form a lattice (`whitecap_fold`, `enhanced_water.wgsl`) | tier | +| Near mesh refinement | High builds a transient 4x liquid lattice within 64 yd, with an 80 yd release ring | tier | +| Ocean / inland profiles | the sea and lakes/rivers have their own colour, energy and reflectivity | tier | +| WMO pools | exterior canals use a calm drifting profile with outdoor glints; interiors use their authored MOMT colour and room-fog reflection | tier | +| Depth look | light fades per channel over the real path through the water; the bed is seen through it, bent by the waves; sunlit shallows carry a caustic web | tier | +| Reflection and glints | Fresnel sky reflection from the zone's sky rows, sun path, moon path, point-light glints | tier | +| Beach surf | a travelling wave front, a lace of foam that dissolves behind it, a swash sheet on the sand | tier | +| Swimmers | wake foam, treading rings and a visual-only bob with the swell | tier | +| Lava glow | magma surfaces emit warm point lights through the lighting module | Advanced Graphics → Lava Glow, `lavaLightGain` | +| Lava HDR | magma partially resists distance fog and feeds the screen-space halo | Advanced Graphics → Bloom, `bloom` (Off/Low/High) | Rivers deliberately have NO flow effect: a derived current was tried and removed at the owner's request. If it ever returns it should read the authored MCLQ flow records, not derive one. @@ -62,15 +63,17 @@ request. If it ever returns it should read the authored MCLQ flow records, not d - **Shader**: `crates/benilla-assets/src/shaders/enhanced_water.wgsl` - the whole module on the GPU side, an importable library (`benilla::enhanced_water`) with its own bindings: 103 scene depth, 104 `WaterParams` (`benilla_assets::WaterUniform`), 105 the shared light buffer (a second - read-only view of upstream's binding 90), 106 the scene colour (for refraction and reflection). Upstream's `liquid.wgsl` carries three hooks only: the + read-only view of upstream's binding 90), 106 the scene colour (for refraction and reflection), 107 the planar mirror (`liquid/mirror.rs`). Upstream's `liquid.wgsl` carries three hooks only: the `#import`, `water_swell` in its vertex stage, and the `water_active()` branch at the top of its fragment stage, which returns the module's result as-is (the module fogs its own surface terms only: the scene it refracts and reflects is already fogged). Keep it that way: new water code goes in the module, not in `liquid.wgsl`. - **Assets** (`crates/benilla-assets/src`): `water_depth.rs` (`WaterUniform`, the scene-depth image), - `materials.rs` (`LiquidExt` fields 103-106, shader registration), `lib.rs` (`WaterQuality`). + `materials.rs` (`LiquidExt` fields 103-107, shader registration), `lib.rs` (`WaterQuality`, + `WaterReflections`). - **World** (`crates/benilla-world/src`): `liquid/scene_depth.rs` (copies the opaque depth AND colour after - the main opaque pass), `liquid/waves.rs` (the CPU mirror of the vertex swell), `liquid/surface.rs` + the main opaque pass), `liquid/mirror.rs` (the planar mirror camera, its plane vote and binding 107), + `liquid/waves.rs` (the CPU mirror of the vertex swell), `liquid/surface.rs` (per-kind material parameters and the opt-in `WOW_WATER_PROBE` WMO classification/depth log), `liquid/lod.rs` (High-only 4x near-grid swap), `water_fx/bob.rs` (swimmer bob), `lighting/lava_light.rs`. @@ -90,3 +93,8 @@ request. If it ever returns it should read the authored MCLQ flow records, not d - The temporary water wind is `WATER_WIND_DIR`; all wind-aligned shader terms derive from it until the weather lane supplies shared wind. - Run one GPU capture at a time, and run `cargo test` in a shell WITHOUT `WOW_DATA` exported. +- The planar mirror is read at the water pixel's own screen position, flipped vertically: the mirror + camera is the reflected eye rolled half a turn (a proper rotation, so culling and winding stay as they + are). It must keep the world camera's view key (HDR, MSAA, perspective, shadow filter) or every + pipeline compiles a second time; it never draws water (`drop_water_from_mirror`). +- `WOW_WATER_MIRROR_LOG=1` prints the mirror's verdict once a second (plane, votes, active). diff --git a/crates/benilla-app/Cargo.toml b/crates/benilla-app/Cargo.toml index 329aed29..4d658f21 100644 --- a/crates/benilla-app/Cargo.toml +++ b/crates/benilla-app/Cargo.toml @@ -37,7 +37,8 @@ half = "2" include_dir = "0.7" # The 1.12 chat filters (`text_filter`), with one `RegexSet` for the any-match pass per line. regex = "1" -# `getrusage` for perf CPU time; the audio clock and render thread's realtime policy on macOS. +# `getrusage` for perf CPU time; `localtime_r` for the log stamp; the audio clock and render +# thread's realtime policy on macOS. libc = "0.2" # PNG encoding only: the macOS cursor's NSImage data and screenshots. image = { version = "0.25", default-features = false, features = ["png"] } @@ -54,6 +55,9 @@ toml = "0.8" avian3d = "0.6" # Shapes and rasterizes `FontString` text standalone (`ui_text`), at bevy_text's own 0.16. cosmic-text = "0.16" +# The layout's unshifted character per key (`KeyEventExtModifierSupplement`), which bevy's +# `KeyboardInput` drops; bevy_winit's own 0.30, whose features it sets. +winit = { version = "0.30", default-features = false } # `cosmic-text`'s font database, named by `ui_text`; must stay the version it depends on. fontdb = "0.23" # The mixer. Its `cpal` backend stays off on every target: `sound::output` is our own backend. @@ -66,7 +70,7 @@ kira = { version = "0.12", default-features = false, features = [ # Aborts a debug build on an allocation in the audio IO callback or render pass; off in release. assert_no_alloc = "1.1" # `MediaSource`: our source raises kira's decode thread's QoS; must stay kira's version. -symphonia = { version = "0.5", default-features = false } +symphonia = { version = "0.6", default-features = false } # The audio threads' lock-free SPSC rings (output, mix tap); kira's version, so the graph has one. rtrb = "0.3" mint = "0.5" @@ -116,11 +120,14 @@ objc2-foundation = { version = "0.2", features = [ [target.'cfg(not(target_os = "macos"))'.dependencies] cpal = "0.17" -# Windows CPU clocks for `perf::clock`. +# Windows CPU clocks for `perf::clock`; `GetLocalTime` for the log stamp (`ui_chat::logging`); the +# layout's virtual keys for `bindings::layout`. [target.'cfg(windows)'.dependencies] windows-sys = { version = "0.59", features = [ "Win32_Foundation", + "Win32_System_SystemInformation", "Win32_System_Threading", + "Win32_UI_Input_KeyboardAndMouse", ] } # The login cycle's fake realmd runs the server half of SRP6 (`net::io::cycle_tests`). diff --git a/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml b/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml index 26466581..dbf4261d 100644 --- a/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml +++ b/crates/benilla-app/assets/ui/ContainerFrameAdapters.xml @@ -1,54 +1,18 @@ diff --git a/crates/benilla-app/assets/ui/FrameXMLFixes.xml b/crates/benilla-app/assets/ui/FrameXMLFixes.xml new file mode 100644 index 00000000..461e6f9a --- /dev/null +++ b/crates/benilla-app/assets/ui/FrameXMLFixes.xml @@ -0,0 +1,51 @@ + + + + diff --git a/crates/benilla-app/assets/ui/GameMenuAdapters.xml b/crates/benilla-app/assets/ui/GameMenuAdapters.xml new file mode 100644 index 00000000..43cf5fea --- /dev/null +++ b/crates/benilla-app/assets/ui/GameMenuAdapters.xml @@ -0,0 +1,132 @@ + + + + + + + + + + diff --git a/crates/benilla-app/assets/ui/GameMenuFrame.xml b/crates/benilla-app/assets/ui/GameMenuFrame.xml deleted file mode 100644 index 955fa369..00000000 --- a/crates/benilla-app/assets/ui/GameMenuFrame.xml +++ /dev/null @@ -1,216 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- ERA_WINDOW_SCALE (OptionsFrame.xml) stands in for the era's UIParent scale. A - -- second OnShow on this frame would replace this one. - this:SetScale(ERA_WINDOW_SCALE or 1) - if UpdateMicroButtons then UpdateMicroButtons() end - if Disable_BagButtons then Disable_BagButtons() end - - - if UpdateMicroButtons then UpdateMicroButtons() end - if Enable_BagButtons then Enable_BagButtons() end - - - - diff --git a/crates/benilla-app/assets/ui/KeyBindingsPage.xml b/crates/benilla-app/assets/ui/KeyBindingsPage.xml index a89fa332..03d4de7e 100644 --- a/crates/benilla-app/assets/ui/KeyBindingsPage.xml +++ b/crates/benilla-app/assets/ui/KeyBindingsPage.xml @@ -4,14 +4,16 @@ OptionsFrame.xml, which loads after. Only commands the engine dispatches appear. Deviation: the layout is the era Settings panel's Keybindings page (collapsible category sections), because 1.12's settings screens are much worse to use. Capture follows 1.12's - Blizzard_BindingUI: the next key or mouse 3/4/5 press binds, left and right clicks only - select, and ESC while armed binds Escape (its OnKeyDown has no ESCAPE filter). + Blizzard_BindingUI: while a capsule is selected the window is keyboard-enabled, so the + next key binds through its OnKeyDown, and a mouse 3/4/5 click or a wheel notch binds; + left and right clicks only select, and ESC while armed binds Escape (its OnKeyDown has no + ESCAPE filter). Deviation: every bind, unbind and reset saves at once, as the era panel commits, where 1.12 had Okay and Cancel; only Reset To Default and leaving the character set confirm. --> - - - + @@ -61,13 +63,13 @@ - KeyBindings_ToggleSection(this.sectionIndex) + BenillaKeyBindings_ToggleSection(this.sectionIndex) - - @@ -75,7 +77,7 @@ - - - + - + @@ -1862,7 +1869,7 @@ - - + @@ -1926,21 +1933,21 @@ - OptionsCheckbox_OnClick(this) - OptionsRow_Hover(this:GetParent(), 1) - OptionsRow_Hover(this:GetParent(), nil) + BenillaOptionsCheckbox_OnClick(this) + BenillaOptionsRow_Hover(this:GetParent(), 1) + BenillaOptionsRow_Hover(this:GetParent(), nil) - OptionsRow_Hover(this, 1) - OptionsRow_Hover(this, nil) + BenillaOptionsRow_Hover(this, 1) + BenillaOptionsRow_Hover(this, nil) - + @@ -2002,22 +2009,22 @@ - OptionsSlider_OnValueChanged(this, arg1) - OptionsRow_Hover(this:GetParent():GetParent(), 1) - OptionsRow_Hover(this:GetParent():GetParent(), nil) + BenillaOptionsSlider_OnValueChanged(this, arg1) + BenillaOptionsRow_Hover(this:GetParent():GetParent(), 1) + BenillaOptionsRow_Hover(this:GetParent():GetParent(), nil) - OptionsRow_Hover(this, 1) - OptionsRow_Hover(this, nil) + BenillaOptionsRow_Hover(this, 1) + BenillaOptionsRow_Hover(this, nil) - + @@ -2051,8 +2058,8 @@ - OptionsRow_Hover(this, 1) - OptionsRow_Hover(this, nil) + BenillaOptionsRow_Hover(this, 1) + BenillaOptionsRow_Hover(this, nil) @@ -2086,7 +2093,7 @@ - + @@ -2156,9 +2163,6 @@ - - OptionsTab_FitWidth(self) - @@ -2199,64 +2203,64 @@ - + - getglobal(self:GetName() .. "Label"):SetText("Gameplay") + getglobal(this:GetName() .. "Label"):SetText("Gameplay") - - - - - - - - + - getglobal(self:GetName() .. "Label"):SetText("System") + getglobal(this:GetName() .. "Label"):SetText("System") - - - - @@ -2327,9 +2331,16 @@ - self:SetScrollChild(BenillaOptionsFrameContainerBody) - OptionsScroll_Fit() - BenillaScroll_OnMouseWheel(this, arg1) + this:SetScrollChild(BenillaOptionsFrameContainerBody) + BenillaOptionsScroll_Fit() + + + if BenillaKeyBindingsPage.selected then + BenillaKeyBindings_OnMouseWheel(arg1) + else + BenillaScroll_OnMouseWheel(this, arg1) + end + BenillaScroll_SyncBar(this) BenillaScroll_SyncBar(this) @@ -2337,7 +2348,7 @@ + BenillaOptionsScroll_Fit sizes it. --> @@ -2357,185 +2368,194 @@ - + - OptionsRow_OnLoad(self, "deselectOnClick", "Sticky Targeting", + BenillaOptionsRow_OnLoad(this, "deselectOnClick", "Sticky Targeting", "OPTION_TOOLTIP_GAMEFIELD_DESELECT") - self.invert = 1 + this.invert = 1 - + - OptionsRow_OnLoad(self, "assistAttack", "Attack on assist", + BenillaOptionsRow_OnLoad(this, "assistAttack", "Attack on assist", "OPTION_TOOLTIP_ASSIST_ATTACK") - + - OptionsRow_OnLoad(self, "autoClearAFK", "Auto Clear AFK", + BenillaOptionsRow_OnLoad(this, "autoClearAFK", "Auto Clear AFK", "OPTION_TOOLTIP_CLEAR_AFK") - + - OptionsRow_OnLoad(self, "BlockTrades", "Block Trades", + BenillaOptionsRow_OnLoad(this, "BlockTrades", "Block Trades", "OPTION_TOOLTIP_BLOCK_TRADES") - + - OptionsRow_OnLoad(self, "autoSelfCast", "Auto Self Cast", + BenillaOptionsRow_OnLoad(this, "autoSelfCast", "Auto Self Cast", "OPTION_TOOLTIP_AUTO_SELF_CAST") - + - OptionsRow_OnLoad(self, "autoLootDefault", "Auto Loot") + BenillaOptionsRow_OnLoad(this, "autoLootDefault", "Auto Loot") - + - OptionsRow_OnLoad(self, "mouseInvertPitch", "Invert Mouse", + BenillaOptionsRow_OnLoad(this, "mouseInvertPitch", "Invert Mouse", "OPTION_TOOLTIP_INVERT_MOUSE") - + - OptionsRow_OnLoad(self, "mousespeed", "Mouse Sensitivity", + BenillaOptionsRow_OnLoad(this, "mousespeed", "Mouse Sensitivity", "OPTION_TOOLTIP_MOUSE_SENSITIVITY") - OptionsSliderRow_Setup(self, 0.5, 1.5, 0.05) + BenillaOptionsSliderRow_Setup(this, 0.5, 1.5, 0.05) - - + + + BenillaOptionsRow_OnLoad(this, "autointeract", "Click-to-Move", + "OPTION_TOOLTIP_CLICK_TO_MOVE") + + + + + + + - OptionsRow_OnLoad(self, "cameraSmoothStyle", + BenillaOptionsRow_OnLoad(this, "cameraSmoothStyle", "Camera Following Style", "OPTION_TOOLTIP_CAMERA1") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = "Smart", value = "1", tip = "OPTION_TOOLTIP_CAMERA1" }, { text = "Always", value = "2", tip = "OPTION_TOOLTIP_CAMERA2" }, { text = "Never", value = "0", alt = "3", tip = "OPTION_TOOLTIP_CAMERA3" }, }) - + - OptionsRow_OnLoad(self, "cameraTerrainTilt", "Follow Terrain", + BenillaOptionsRow_OnLoad(this, "cameraTerrainTilt", "Follow Terrain", "OPTION_TOOLTIP_FOLLOW_TERRAIN") - + - OptionsRow_OnLoad(self, "cameraBobbing", "Head Bob", + BenillaOptionsRow_OnLoad(this, "cameraBobbing", "Head Bob", "OPTION_TOOLTIP_HEAD_BOB") - + - OptionsRow_OnLoad(self, "cameraYawSmoothSpeed", "Auto-Follow Speed", + BenillaOptionsRow_OnLoad(this, "cameraYawSmoothSpeed", "Auto-Follow Speed", "OPTION_TOOLTIP_AUTO_FOLLOW_SPEED") - OptionsSliderRow_Setup(self, 90, 270, 10, "raw") + BenillaOptionsSliderRow_Setup(this, 90, 270, 10, "raw") - + - OptionsRow_OnLoad(self, "cameraWaterCollision", "Water Collision", + BenillaOptionsRow_OnLoad(this, "cameraWaterCollision", "Water Collision", "OPTION_TOOLTIP_WATER_COLLISION") - + - OptionsRow_OnLoad(self, "cameraPivot", "Smart Pivot", + BenillaOptionsRow_OnLoad(this, "cameraPivot", "Smart Pivot", "OPTION_TOOLTIP_SMART_PIVOT") - + - OptionsRow_OnLoad(self, "cameraYawMoveSpeed", "Mouse Look Speed", + BenillaOptionsRow_OnLoad(this, "cameraYawMoveSpeed", "Mouse Look Speed", "OPTION_TOOLTIP_MOUSE_LOOK_SPEED") - OptionsSliderRow_Setup(self, 90, 270, 10, "raw") - self.partner = { cvar = "cameraPitchMoveSpeed", scale = 0.5 } + BenillaOptionsSliderRow_Setup(this, 90, 270, 10, "raw") + this.partner = { cvar = "cameraPitchMoveSpeed", scale = 0.5 } - + - OptionsRow_OnLoad(self, "cameraDistanceMaxFactor", + BenillaOptionsRow_OnLoad(this, "cameraDistanceMaxFactor", "Max Camera Distance", "OPTION_TOOLTIP_MAX_FOLLOW_DIST") - OptionsSliderRow_Setup(self, 1.0, 2.0, 0.1, "yards") + BenillaOptionsSliderRow_Setup(this, 1.0, 2.0, 0.1, "yards") @@ -2547,104 +2567,104 @@ - + - OptionsRow_OnLoad(self, "MasterSoundEffects", "Enable All Sound", + BenillaOptionsRow_OnLoad(this, "MasterSoundEffects", "Enable All Sound", "OPTION_TOOLTIP_ENABLE_ALL_SOUND") - self.soundQuirk = 1 + this.soundQuirk = 1 - + - OptionsRow_OnLoad(self, "MasterVolume", "Master Volume", + BenillaOptionsRow_OnLoad(this, "MasterVolume", "Master Volume", "OPTION_TOOLTIP_MASTER_VOLUME") - + - OptionsRow_OnLoad(self, "SoundVolume", "Sound Volume", + BenillaOptionsRow_OnLoad(this, "SoundVolume", "Sound Volume", "OPTION_TOOLTIP_SOUND_VOLUME", 1) - self.parentRow = "RowMaster" + this.parentRow = "RowMaster" - + - OptionsRow_OnLoad(self, "MusicVolume", "Music Volume", + BenillaOptionsRow_OnLoad(this, "MusicVolume", "Music Volume", "OPTION_TOOLTIP_MUSIC_VOLUME", 1) - self.parentRow = "RowMaster" + this.parentRow = "RowMaster" - + - OptionsRow_OnLoad(self, "AmbienceVolume", "Ambience Volume", + BenillaOptionsRow_OnLoad(this, "AmbienceVolume", "Ambience Volume", "OPTION_TOOLTIP_AMBIENCE_VOLUME", 1) - self.parentRow = "RowMaster" + this.parentRow = "RowMaster" - + - OptionsRow_OnLoad(self, "EnableMusic", "Enable Music", + BenillaOptionsRow_OnLoad(this, "EnableMusic", "Enable Music", "OPTION_TOOLTIP_ENABLE_MUSIC") - self.soundQuirk = 1 + this.soundQuirk = 1 - + - OptionsRow_OnLoad(self, "EnableAmbience", "Enable Ambience", + BenillaOptionsRow_OnLoad(this, "EnableAmbience", "Enable Ambience", "OPTION_TOOLTIP_ENABLE_AMBIENCE") - self.soundQuirk = 1 + this.soundQuirk = 1 - + - OptionsRow_OnLoad(self, "EnableErrorSpeech", "Enable Error Speech", + BenillaOptionsRow_OnLoad(this, "EnableErrorSpeech", "Enable Error Speech", "OPTION_TOOLTIP_ENABLE_ERROR_SPEECH") - self.soundQuirk = 1 + this.soundQuirk = 1 - + - OptionsRow_OnLoad(self, "Sound_EnableSoundWhenGameIsInBG", + BenillaOptionsRow_OnLoad(this, "Sound_EnableSoundWhenGameIsInBG", "Enable Sound in Background", "BENILLA_TOOLTIP_BACKGROUND_SOUND") - self.soundQuirk = 1 + this.soundQuirk = 1 @@ -2667,88 +2687,106 @@ - + - OptionsRow_OnLoad(self, "uiScale", "UI Scale", + BenillaOptionsRow_OnLoad(this, "uiScale", "UI Scale", "OPTION_TOOLTIP_UI_SCALE") - OptionsSliderRow_Setup(self, OptionsFrameSliders[1].minValue, + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[1].minValue, OptionsFrameSliders[1].maxValue, OptionsFrameSliders[1].valueStep) -- A live write would rescale the slider mid-drag. - self.deferred = 1 + this.deferred = 1 - + - OptionsRow_OnLoad(self, "farclip", "Terrain Distance", + BenillaOptionsRow_OnLoad(this, "farclip", "Terrain Distance", "OPTION_TOOLTIP_FARCLIP") - OptionsSliderRow_Setup(self, OptionsFrameSliders[2].minValue, + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[2].minValue, OptionsFrameSliders[2].maxValue, OptionsFrameSliders[2].valueStep, "raw") - + - OptionsRow_OnLoad(self, "WorldDetail", "Environment Detail", + BenillaOptionsRow_OnLoad(this, "WorldDetail", "Environment Detail", "OPTION_TOOLTIP_ENVIRONMENT_DETAIL") -- Stop names from the era quality ladder. - OptionsSliderRow_Setup(self, OptionsFrameSliders[3].minValue, + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[3].minValue, OptionsFrameSliders[3].maxValue, OptionsFrameSliders[3].valueStep, nil, { "Low", "Medium", "High" }) + + + + + + + + BenillaOptionsRow_OnLoad(this, "spellEffectLevel", SPELL_DETAIL, + "OPTION_TOOLTIP_SPELL_DETAIL") + -- Our names for the handler's emission scalars + -- 0.33, 0.66 and 1.0 (`0x689510`). + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[8].minValue, + OptionsFrameSliders[8].maxValue, + OptionsFrameSliders[8].valueStep, nil, + { "Low", "Medium", "High" }) + + - + - - + + -- OptionsFrame_SetDefaults' default (l.444-445); -- `or 1` covers a VM with no CVars. local gd = tonumber(GetCVarDefault("gamma")) or 1 - OptionsNumFuncRow_OnLoad(self, GetGamma, SetGamma, + BenillaOptionsNumFuncRow_OnLoad(this, GetGamma, SetGamma, tostring(1 - gd), "Brightness", "BENILLA_TOOLTIP_BRIGHTNESS") - OptionsSliderRow_Setup(self, OptionsFrameSliders[6].minValue, + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[6].minValue, OptionsFrameSliders[6].maxValue, OptionsFrameSliders[6].valueStep, "travel") - + - OptionsRow_OnLoad(self, "weatherDensity", "Weather Intensity", + BenillaOptionsRow_OnLoad(this, "weatherDensity", "Weather Intensity", "OPTION_TOOLTIP_WEATHER_DETAIL") -- Our names for `0x67b870`'s spawn-rate gains -- `{0.1, 0.33, 0.66, 1.0}` (`[0x8680ec]`). - OptionsSliderRow_Setup(self, OptionsFrameSliders[9].minValue, + BenillaOptionsSliderRow_Setup(this, OptionsFrameSliders[9].minValue, OptionsFrameSliders[9].maxValue, OptionsFrameSliders[9].valueStep, nil, { "Minimal", "Low", "Medium", "Full" }) - + @@ -2757,15 +2795,15 @@ -- Deviation: modern Classic's two-entry Display -- Mode, as there is no exclusive fullscreen; -- gxWindow "0" is the borderless window. - OptionsRow_OnLoad(self, "gxWindow", "Display Mode", + BenillaOptionsRow_OnLoad(this, "gxWindow", "Display Mode", "BENILLA_TOOLTIP_DISPLAY_MODE") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = "Windowed (Fullscreen)", value = "0" }, { text = "Windowed", value = "1" }, }) - + @@ -2773,7 +2811,7 @@ -- Not deferred despite gxRestart: vsync changes -- live. - OptionsRow_OnLoad(self, "gxVSync", "Vertical Sync", + BenillaOptionsRow_OnLoad(this, "gxVSync", "Vertical Sync", "OPTION_TOOLTIP_VERTICAL_SYNC") @@ -2784,7 +2822,7 @@ labels, same descriptions, same deferred commit on the slider — because they are three rows of one rig whose other fifteen a player could not reach at all. --> - + @@ -2794,10 +2832,10 @@ -- the backbuffer), and no Multisampling, which -- misses alpha-tested cutouts. Deferred: a write -- rebuilds the render target. - OptionsRow_OnLoad(self, "renderScale", "Render Scale", + BenillaOptionsRow_OnLoad(this, "renderScale", "Render Scale", "BENILLA_TOOLTIP_RENDER_SCALE") - OptionsSliderRow_Setup(self, 0.5, 2.0, 0.05) - self.deferred = 1 + BenillaOptionsSliderRow_Setup(this, 0.5, 2.0, 0.05) + this.deferred = 1 @@ -2809,7 +2847,7 @@ local info = OptionsFrameSliders[i] local row = getglobal(this:GetName() .. name) if ( info and row ) then - OptionsSliderRow_Setup(row, info.minValue, info.maxValue, + BenillaOptionsSliderRow_Setup(row, info.minValue, info.maxValue, info.valueStep, row.fmt, row.stops) end end @@ -2845,17 +2883,17 @@ Quality below it, ONE CVar: the host's `cvars::GRAPHICS_PRESETS` writes the rows and re-derives this one every frame. --> - + - OptionsRow_OnLoad(self, "graphicsQuality", + BenillaOptionsRow_OnLoad(this, "graphicsQuality", BENILLA_ADVGFX.graphicsQuality, "BENILLA_TOOLTIP_GRAPHICS_QUALITY") - self.preset = 1 - OptionsDropdownRow_Setup(self, { + this.preset = 1 + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.pClassic, value = "Classic" }, { text = BENILLA_ADVGFX.qLow, value = "Low" }, { text = BENILLA_ADVGFX.qMedium, value = "Medium" }, @@ -2869,19 +2907,19 @@ Distance, on the extended range (`view::FARCLIP_RANGE`, 177..1497 on the 1.12 grid of 60). Live like its Graphics twin; both read the one CVar. --> - + - OptionsRow_OnLoad(self, "farclip", + BenillaOptionsRow_OnLoad(this, "farclip", BENILLA_ADVGFX.renderDistance, "BENILLA_TOOLTIP_RENDER_DISTANCE") - OptionsSliderRow_Setup(self, 177, 1497, 60, "yd") + BenillaOptionsSliderRow_Setup(this, 177, 1497, 60, "yd") - + @@ -2902,10 +2940,10 @@ -- would be a copy the other three cannot see. -- The page's OnUpdate poll is what brings the -- member rows' new values back onto the screen. - OptionsRow_OnLoad(self, "lightingQuality", + BenillaOptionsRow_OnLoad(this, "lightingQuality", BENILLA_ADVGFX.lightingQuality, "BENILLA_TOOLTIP_LIGHTING_QUALITY") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.qOff, value = "Off" }, { text = BENILLA_ADVGFX.qLow, value = "Low" }, { text = BENILLA_ADVGFX.qMedium, value = "Medium" }, @@ -2915,16 +2953,16 @@ }) - + - OptionsRow_OnLoad(self, "waterQuality", + BenillaOptionsRow_OnLoad(this, "waterQuality", BENILLA_ADVGFX.waterQuality, "BENILLA_TOOLTIP_WATER_QUALITY") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.waterClassic, value = "0" }, { text = BENILLA_ADVGFX.waterEnhanced, value = "1" }, { text = BENILLA_ADVGFX.waterHigh, value = "2" }, @@ -2932,15 +2970,15 @@ - + - OptionsRow_OnLoad(self, "volumetricFog", BENILLA_ADVGFX.volumetricFog, + BenillaOptionsRow_OnLoad(this, "volumetricFog", BENILLA_ADVGFX.volumetricFog, "BENILLA_TOOLTIP_VOLUMETRIC_FOG") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.fogOff, value = "0" }, { text = BENILLA_ADVGFX.qLow, value = "1" }, { text = BENILLA_ADVGFX.qHigh, value = "2" }, @@ -2948,15 +2986,15 @@ - + - OptionsRow_OnLoad(self, "skyQuality", BENILLA_ADVGFX.skyQuality, + BenillaOptionsRow_OnLoad(this, "skyQuality", BENILLA_ADVGFX.skyQuality, "BENILLA_TOOLTIP_SKY_QUALITY") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.waterClassic, value = "0" }, { text = BENILLA_ADVGFX.waterEnhanced, value = "1" }, { text = BENILLA_ADVGFX.waterHigh, value = "2" }, @@ -2964,15 +3002,15 @@ - + - OptionsRow_OnLoad(self, "bloom", BENILLA_ADVGFX.bloom, + BenillaOptionsRow_OnLoad(this, "bloom", BENILLA_ADVGFX.bloom, "BENILLA_TOOLTIP_BLOOM") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.fogOff, value = "0" }, { text = BENILLA_ADVGFX.qLow, value = "1" }, { text = BENILLA_ADVGFX.qHigh, value = "2" }, @@ -2980,51 +3018,51 @@ - + - OptionsRow_OnLoad(self, "sunShafts", BENILLA_ADVGFX.sunShafts, + BenillaOptionsRow_OnLoad(this, "sunShafts", BENILLA_ADVGFX.sunShafts, "BENILLA_TOOLTIP_SUN_SHAFTS") - + - OptionsRow_OnLoad(self, "colorGrading", BENILLA_ADVGFX.colorGrading, + BenillaOptionsRow_OnLoad(this, "colorGrading", BENILLA_ADVGFX.colorGrading, "BENILLA_TOOLTIP_COLOR_GRADING") - + - OptionsRow_OnLoad(self, "characterShadows", + BenillaOptionsRow_OnLoad(this, "characterShadows", BENILLA_ADVGFX.characterShadows, "BENILLA_TOOLTIP_CHARACTER_SHADOWS") - + - OptionsRow_OnLoad(self, "worldShadows", + BenillaOptionsRow_OnLoad(this, "worldShadows", BENILLA_ADVGFX.worldShadows, "BENILLA_TOOLTIP_WORLD_SHADOWS") - + @@ -3035,7 +3073,7 @@ -- own clamp (SHADOW_DISTANCE_RANGE). DEFERRED to -- Apply so a drag doesn't re-fit the cascade + recollect -- casters on every tick (one rebuild on commit instead). - OptionsRow_OnLoad(self, "shadowDistance", + BenillaOptionsRow_OnLoad(this, "shadowDistance", BENILLA_ADVGFX.shadowDistance, "BENILLA_TOOLTIP_SHADOW_DISTANCE") -- `"yd"`, not `"yards"`: the value is already a @@ -3044,11 +3082,11 @@ -- This row rode the wrong one from the day it was -- seated and printed "1200 yd" for an 80 yd -- cascade. - OptionsSliderRow_Setup(self, 40, 200, 10, "yd") - self.deferred = 1 + BenillaOptionsSliderRow_Setup(this, 40, 200, 10, "yd") + this.deferred = 1 - + @@ -3061,17 +3099,17 @@ -- rounds UP into a bigger and slower map than the -- one that was asked for. The entry texts are the -- numbers themselves — nothing to translate. - OptionsRow_OnLoad(self, "shadowMapSize", + BenillaOptionsRow_OnLoad(this, "shadowMapSize", BENILLA_ADVGFX.shadowResolution, "BENILLA_TOOLTIP_SHADOW_RESOLUTION") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = "1024", value = "1024" }, { text = "2048", value = "2048" }, { text = "4096", value = "4096" }, }) - + @@ -3082,58 +3120,58 @@ -- on it, so the left end of this groove is the -- night the client rendered before the moon lane -- existed. - OptionsRow_OnLoad(self, "moonShadowStrength", + BenillaOptionsRow_OnLoad(this, "moonShadowStrength", BENILLA_ADVGFX.moonShadows, "BENILLA_TOOLTIP_MOON_SHADOWS") - OptionsSliderRow_Setup(self, 0, 1, 0.05) + BenillaOptionsSliderRow_Setup(this, 0, 1, 0.05) - + - OptionsRow_OnLoad(self, "interiorLight", + BenillaOptionsRow_OnLoad(this, "interiorLight", BENILLA_ADVGFX.interiorLight, "BENILLA_TOOLTIP_INTERIOR_LIGHT") - + - OptionsRow_OnLoad(self, "interiorShadows", + BenillaOptionsRow_OnLoad(this, "interiorShadows", BENILLA_ADVGFX.interiorShadows, "BENILLA_TOOLTIP_INTERIOR_SHADOWS") - + - OptionsRow_OnLoad(self, "exteriorShadows", + BenillaOptionsRow_OnLoad(this, "exteriorShadows", BENILLA_ADVGFX.exteriorShadows, "BENILLA_TOOLTIP_EXTERIOR_SHADOWS") - + - OptionsRow_OnLoad(self, "torchTerrainShadows", + BenillaOptionsRow_OnLoad(this, "torchTerrainShadows", BENILLA_ADVGFX.torchTerrainShadows, "BENILLA_TOOLTIP_TORCH_TERRAIN_SHADOWS") - + @@ -3143,26 +3181,26 @@ -- SCALE on the PCF tap radius at a contact, so the -- readout is a percentage of the shipped radius -- and 100% is what the lane was tuned at. - OptionsRow_OnLoad(self, "interiorShadowSoft", + BenillaOptionsRow_OnLoad(this, "interiorShadowSoft", BENILLA_ADVGFX.torchSoft, "BENILLA_TOOLTIP_TORCH_SOFT") - OptionsSliderRow_Setup(self, 0.5, 3, 0.1) + BenillaOptionsSliderRow_Setup(this, 0.5, 3, 0.1) - + -- Full 0..4 registry range, in five-percent steps. - OptionsRow_OnLoad(self, "fireLightGain", + BenillaOptionsRow_OnLoad(this, "fireLightGain", BENILLA_ADVGFX.fireLight, "BENILLA_TOOLTIP_FIRE_LIGHT") - OptionsSliderRow_Setup(self, 0, 4, 0.05) + BenillaOptionsSliderRow_Setup(this, 0, 4, 0.05) - + @@ -3171,38 +3209,38 @@ -- 0..2, the CVar's own clamp verbatim: the -- amplitudes are authored at 100%, and 200% is the -- deliberate over-drive for judging the shape. - OptionsRow_OnLoad(self, "fireFlicker", + BenillaOptionsRow_OnLoad(this, "fireFlicker", BENILLA_ADVGFX.fireFlicker, "BENILLA_TOOLTIP_FIRE_FLICKER") - OptionsSliderRow_Setup(self, 0, 2, 0.05) + BenillaOptionsSliderRow_Setup(this, 0, 2, 0.05) - + -- Full 0..4 registry range, in five-percent steps. - OptionsRow_OnLoad(self, "spellLightGain", + BenillaOptionsRow_OnLoad(this, "spellLightGain", BENILLA_ADVGFX.spellLights, "BENILLA_TOOLTIP_SPELL_LIGHTS") - OptionsSliderRow_Setup(self, 0, 4, 0.05) + BenillaOptionsSliderRow_Setup(this, 0, 4, 0.05) - + - OptionsRow_OnLoad(self, "lavaLightGain", + BenillaOptionsRow_OnLoad(this, "lavaLightGain", BENILLA_ADVGFX.lavaGlow, "BENILLA_TOOLTIP_LAVA_GLOW") - OptionsSliderRow_Setup(self, 0, 4, 0.05) + BenillaOptionsSliderRow_Setup(this, 0, 4, 0.05) - + @@ -3219,13 +3257,13 @@ -- the row is named for the darkness: left is -- darker, and this is what makes the number say so -- too. The store keeps the gain, untouched. - OptionsRow_OnLoad(self, "nightGain", + BenillaOptionsRow_OnLoad(this, "nightGain", BENILLA_ADVGFX.nightDarkness, "BENILLA_TOOLTIP_NIGHT_DARKNESS") - OptionsSliderRow_Setup(self, 0.2, 1.5, 0.05, "darkness") + BenillaOptionsSliderRow_Setup(this, 0.2, 1.5, 0.05, "darkness") - + @@ -3233,59 +3271,59 @@ -- The room lane's own dim dial, same clamp and same -- backwards readout as the night one above it. - OptionsRow_OnLoad(self, "interiorGain", + BenillaOptionsRow_OnLoad(this, "interiorGain", BENILLA_ADVGFX.interiorDarkness, "BENILLA_TOOLTIP_INTERIOR_DARKNESS") - OptionsSliderRow_Setup(self, 0.2, 1.5, 0.05, "darkness") + BenillaOptionsSliderRow_Setup(this, 0.2, 1.5, 0.05, "darkness") - + - OptionsRow_OnLoad(self, "skyDither", + BenillaOptionsRow_OnLoad(this, "skyDither", BENILLA_ADVGFX.skyDither, "BENILLA_TOOLTIP_SKY_DITHER") - + - OptionsRow_OnLoad(self, "fogModel", + BenillaOptionsRow_OnLoad(this, "fogModel", BENILLA_ADVGFX.fogModel, "BENILLA_TOOLTIP_FOG_MODEL") - + - OptionsRow_OnLoad(self, "rainSurfaces", + BenillaOptionsRow_OnLoad(this, "rainSurfaces", BENILLA_ADVGFX.rainSurfaces, "BENILLA_TOOLTIP_RAIN_SURFACES") - + - OptionsRow_OnLoad(self, "foliageWind", + BenillaOptionsRow_OnLoad(this, "foliageWind", BENILLA_ADVGFX.foliageWind, "BENILLA_TOOLTIP_FOLIAGE_WIND") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.qOff, value = "0" }, { text = BENILLA_ADVGFX.windGrass, value = "1" }, { text = BENILLA_ADVGFX.windTrees, value = "2" }, @@ -3293,28 +3331,28 @@ - + - OptionsRow_OnLoad(self, "foliageWindStrength", + BenillaOptionsRow_OnLoad(this, "foliageWindStrength", BENILLA_ADVGFX.foliageWindStrength, "BENILLA_TOOLTIP_FOLIAGE_WIND_STRENGTH") - OptionsSliderRow_Setup(self, 0.25, 3, 0.25) + BenillaOptionsSliderRow_Setup(this, 0.25, 3, 0.25) - + - OptionsRow_OnLoad(self, "ambientOcclusion", BENILLA_ADVGFX.ambientOcclusion, + BenillaOptionsRow_OnLoad(this, "ambientOcclusion", BENILLA_ADVGFX.ambientOcclusion, "BENILLA_TOOLTIP_AMBIENT_OCCLUSION") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.fogOff, value = "0" }, { text = BENILLA_ADVGFX.qLow, value = "1" }, { text = BENILLA_ADVGFX.qHigh, value = "2" }, @@ -3322,15 +3360,15 @@ - + - OptionsRow_OnLoad(self, "lampFog", BENILLA_ADVGFX.lampFog, + BenillaOptionsRow_OnLoad(this, "lampFog", BENILLA_ADVGFX.lampFog, "BENILLA_TOOLTIP_LAMP_FOG") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.fogOff, value = "0" }, { text = BENILLA_ADVGFX.qLow, value = "1" }, { text = BENILLA_ADVGFX.qHigh, value = "2" }, @@ -3338,39 +3376,39 @@ - + - OptionsRow_OnLoad(self, "daylightWindowSplit", + BenillaOptionsRow_OnLoad(this, "daylightWindowSplit", BENILLA_ADVGFX.daylightWindowSplit, "BENILLA_TOOLTIP_DAYLIGHT_WINDOW_SPLIT") - + - OptionsRow_OnLoad(self, "zoneSkyboxes", + BenillaOptionsRow_OnLoad(this, "zoneSkyboxes", BENILLA_ADVGFX.zoneSkyboxes, "BENILLA_TOOLTIP_ZONE_SKYBOXES") - + - OptionsRow_OnLoad(self, "volumetricLight", BENILLA_ADVGFX.volumetricLight, + BenillaOptionsRow_OnLoad(this, "volumetricLight", BENILLA_ADVGFX.volumetricLight, "BENILLA_TOOLTIP_VOLUMETRIC_LIGHT") - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = BENILLA_ADVGFX.fogOff, value = "0" }, { text = BENILLA_ADVGFX.qMedium, value = "1" }, { text = BENILLA_ADVGFX.qHigh, value = "2" }, @@ -3378,28 +3416,28 @@ - + - OptionsRow_OnLoad(self, "volumetricLightStrength", + BenillaOptionsRow_OnLoad(this, "volumetricLightStrength", BENILLA_ADVGFX.volumetricLightStrength, "BENILLA_TOOLTIP_VOLUMETRIC_LIGHT_STRENGTH") - OptionsSliderRow_Setup(self, 0, 2, 0.25) + BenillaOptionsSliderRow_Setup(this, 0, 2, 0.25) - + - OptionsRow_OnLoad(self, "moonLight", BENILLA_ADVGFX.moonLight, + BenillaOptionsRow_OnLoad(this, "moonLight", BENILLA_ADVGFX.moonLight, "BENILLA_TOOLTIP_MOONLIGHT") - OptionsSliderRow_Setup(self, 0, 2, 0.25) + BenillaOptionsSliderRow_Setup(this, 0, 2, 0.25) @@ -3420,227 +3458,227 @@ - + - OptionsGlobalRow_OnLoad(self, "SHOW_COMBAT_TEXT", + BenillaOptionsGlobalRow_OnLoad(this, "SHOW_COMBAT_TEXT", "Enable Floating Combat Text", "OPTION_TOOLTIP_SHOW_COMBAT_TEXT") - self.applyFunc = "CombatText_UpdateOrLoad" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_FLOAT_MODE", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_FLOAT_MODE", "Combat Text Float Mode", "OPTION_TOOLTIP_COMBAT_TEXT_MODE", 1) - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = "Scroll Up", value = "1" }, { text = "Scroll Down", value = "2" }, { text = "Arc", value = "3" }, }) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_LOW_HEALTH_MANA", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_LOW_HEALTH_MANA", "Show Low Mana and Health", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_LOW_HEALTH_MANA", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_AURAS", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_AURAS", "Show Auras", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_AURAS", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_AURA_FADE", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_AURA_FADE", "Show Fading Auras", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_AURA_FADE", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_COMBAT_STATE", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_COMBAT_STATE", "Show Combat State", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_COMBAT_STATE", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_DODGE_PARRY_MISS", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_DODGE_PARRY_MISS", "Show Dodge/Parries/Misses", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_DODGE_PARRY_MISS", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_RESISTANCES", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_RESISTANCES", "Show Damage Reduction", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_RESISTANCES", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_REPUTATION", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_REPUTATION", "Show Reputation", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_REPUTATION", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_REACTIVES", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_REACTIVES", "Show Reactive Spells and Abilities", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_REACTIVES", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_FRIENDLY_NAMES", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_FRIENDLY_NAMES", "Show Friendly Healer Names", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_FRIENDLY_NAMES", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_COMBO_POINTS", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_COMBO_POINTS", "Show Combo Points", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_COMBO_POINTS", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_MANA", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_MANA", "Show Energy Gains", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_MANA", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsGlobalRow_OnLoad(self, "COMBAT_TEXT_SHOW_HONOR_GAINED", + BenillaOptionsGlobalRow_OnLoad(this, "COMBAT_TEXT_SHOW_HONOR_GAINED", "Show Honor Gained", "OPTION_TOOLTIP_COMBAT_TEXT_SHOW_HONOR_GAINED", 1) - self.parentRow = "RowCombatText" - self.applyFunc = "CombatText_UpdateOrLoad" + this.parentRow = "RowCombatText" + this.applyFunc = "BenillaCombatText_UpdateOrLoad" - + - OptionsRow_OnLoad(self, "CombatDamage", "Show Target Damage", + BenillaOptionsRow_OnLoad(this, "CombatDamage", "Show Target Damage", "OPTION_TOOLTIP_SHOW_DAMAGE") - + - OptionsRow_OnLoad(self, "CombatLogPeriodicSpells", "Periodic Damage", + BenillaOptionsRow_OnLoad(this, "CombatLogPeriodicSpells", "Periodic Damage", "OPTION_TOOLTIP_LOG_PERIODIC_EFFECTS", 1) - self.parentRow = "RowShowDamage" + this.parentRow = "RowShowDamage" - + - OptionsRow_OnLoad(self, "PetMeleeDamage", "Pet Damage", + BenillaOptionsRow_OnLoad(this, "PetMeleeDamage", "Pet Damage", "OPTION_TOOLTIP_SHOW_PET_MELEE_DAMAGE", 1) - self.parentRow = "RowShowDamage" - self.partner = { cvar = "PetSpellDamage" } + this.parentRow = "RowShowDamage" + this.partner = { cvar = "PetSpellDamage" } @@ -3654,13 +3692,13 @@ - + - OptionsFuncRow_OnLoad(self, + BenillaOptionsFuncRow_OnLoad(this, function() return SHOW_MULTI_ACTIONBAR_1 end, function(value) local on @@ -3674,13 +3712,13 @@ "0", "Show Bottom Left ActionBar", "OPTION_TOOLTIP_SHOW_MULTIBAR1") - + - OptionsFuncRow_OnLoad(self, + BenillaOptionsFuncRow_OnLoad(this, function() return SHOW_MULTI_ACTIONBAR_2 end, function(value) local on @@ -3694,13 +3732,13 @@ "0", "Show Bottom Right ActionBar", "OPTION_TOOLTIP_SHOW_MULTIBAR2") - + - OptionsFuncRow_OnLoad(self, + BenillaOptionsFuncRow_OnLoad(this, function() return SHOW_MULTI_ACTIONBAR_3 end, function(value) local on @@ -3715,13 +3753,13 @@ - + - OptionsFuncRow_OnLoad(self, + BenillaOptionsFuncRow_OnLoad(this, function() return SHOW_MULTI_ACTIONBAR_4 end, function(value) local on @@ -3735,25 +3773,25 @@ "0", "Show Right ActionBar 2", "OPTION_TOOLTIP_SHOW_MULTIBAR4", 1) - + - OptionsGlobalRow_OnLoad(self, "ALWAYS_SHOW_MULTIBARS", + BenillaOptionsGlobalRow_OnLoad(this, "ALWAYS_SHOW_MULTIBARS", "Always Show ActionBars", "OPTION_TOOLTIP_ALWAYS_SHOW_MULTIBARS") -- UIOptionsFrame.xml:680-683's click arm. - self.applyFunc = "MultiActionBar_UpdateGridVisibility" + this.applyFunc = "MultiActionBar_UpdateGridVisibility" - + - OptionsGlobalRow_OnLoad(self, "LOCK_ACTIONBAR", + BenillaOptionsGlobalRow_OnLoad(this, "LOCK_ACTIONBAR", "Lock ActionBars", "OPTION_TOOLTIP_LOCK_ACTIONBAR") @@ -3768,153 +3806,153 @@ - + - OptionsRow_OnLoad(self, "UberTooltips", "Enhanced Tooltips", + BenillaOptionsRow_OnLoad(this, "UberTooltips", "Enhanced Tooltips", "OPTION_TOOLTIP_USE_UBERTOOLTIPS") - + - OptionsRow_OnLoad(self, "statusBarText", + BenillaOptionsRow_OnLoad(this, "statusBarText", "Status Bar Text", "OPTION_TOOLTIP_STATUS_BAR") - self.cvarEvent = "STATUS_BAR_TEXT" + this.cvarEvent = "STATUS_BAR_TEXT" - + - OptionsGlobalRow_OnLoad(self, "SHOW_TARGET_OF_TARGET", + BenillaOptionsGlobalRow_OnLoad(this, "SHOW_TARGET_OF_TARGET", "Show Target of Target", "OPTION_TOOLTIP_SHOW_TARGET_OF_TARGET") - self.applyFunc = "TargetofTarget_Update" + this.applyFunc = "TargetofTarget_Update" - + - OptionsGlobalRow_OnLoad(self, "SHOW_TARGET_OF_TARGET_STATE", + BenillaOptionsGlobalRow_OnLoad(this, "SHOW_TARGET_OF_TARGET_STATE", "Show When", "OPTION_TOOLTIP_TARGETOFTARGET5", 1) - OptionsDropdownRow_Setup(self, { + BenillaOptionsDropdownRow_Setup(this, { { text = "Raid", value = "1", tip = "OPTION_TOOLTIP_TARGETOFTARGET1" }, { text = "Party", value = "2", tip = "OPTION_TOOLTIP_TARGETOFTARGET2" }, { text = "Solo", value = "3", tip = "OPTION_TOOLTIP_TARGETOFTARGET3" }, { text = "Party or Raid", value = "4", tip = "OPTION_TOOLTIP_TARGETOFTARGET4" }, { text = "Always", value = "5", tip = "OPTION_TOOLTIP_TARGETOFTARGET5" }, }) - self.applyFunc = "TargetofTarget_Update" + this.applyFunc = "TargetofTarget_Update" - + - OptionsFuncRow_OnLoad(self, ShowingCloak, ShowCloak, "1", + BenillaOptionsFuncRow_OnLoad(this, ShowingCloak, ShowCloak, "1", "Show Cloak", "OPTION_TOOLTIP_SHOW_CLOAK") - + - OptionsFuncRow_OnLoad(self, ShowingHelm, ShowHelm, "1", + BenillaOptionsFuncRow_OnLoad(this, ShowingHelm, ShowHelm, "1", "Show Helm", "OPTION_TOOLTIP_SHOW_HELM") - + - OptionsGlobalRow_OnLoad(self, "QUEST_FADING_DISABLE", + BenillaOptionsGlobalRow_OnLoad(this, "QUEST_FADING_DISABLE", "Instant Quest Text", "OPTION_TOOLTIP_SHOW_QUEST_FADING") - + - OptionsGlobalRow_OnLoad(self, "SHOW_BUFF_DURATIONS", + BenillaOptionsGlobalRow_OnLoad(this, "SHOW_BUFF_DURATIONS", "Buff Durations", "OPTION_TOOLTIP_SHOW_BUFF_DURATION") - self.applyFunc = "BuffButtons_UpdatePositions" + this.applyFunc = "BuffButtons_UpdatePositions" - + - OptionsGlobalRow_OnLoad(self, "AUTO_QUEST_WATCH", + BenillaOptionsGlobalRow_OnLoad(this, "AUTO_QUEST_WATCH", "Automatic Quest Tracking", "OPTION_TOOLTIP_AUTO_QUEST_WATCH") - + - OptionsRow_OnLoad(self, "profanityFilter", "Profanity Filter", + BenillaOptionsRow_OnLoad(this, "profanityFilter", "Profanity Filter", "OPTION_TOOLTIP_PROFANITY_FILTER") - + - OptionsFuncRow_OnLoad(self, TutorialsEnabled, + BenillaOptionsFuncRow_OnLoad(this, TutorialsEnabled, BenillaOptionsFrame_SetTutorialsEnabled, "1", "Show Tutorials", "OPTION_TOOLTIP_SHOW_TUTORIALS") - + - OptionsRow_OnLoad(self, "showGameTips", + BenillaOptionsRow_OnLoad(this, "showGameTips", "Show Loading Screen Tips", "OPTION_TOOLTIP_SHOW_TIPOFTHEDAY") - + - OptionsGlobalRow_OnLoad(self, "SHOW_NEWBIE_TIPS", + BenillaOptionsGlobalRow_OnLoad(this, "SHOW_NEWBIE_TIPS", "Show Detailed Tooltips", "OPTION_TOOLTIP_SHOW_NEWBIE_TIPS") @@ -3928,19 +3966,19 @@ - + - OptionsRow_OnLoad(self, "guildMemberNotify", + BenillaOptionsRow_OnLoad(this, "guildMemberNotify", "Guild Member Alert", "OPTION_TOOLTIP_GUILDMEMBER_ALERT") - + @@ -3948,41 +3986,41 @@ - OptionsGlobalRow_OnLoad(self, "REMOVE_CHAT_DELAY", + BenillaOptionsGlobalRow_OnLoad(this, "REMOVE_CHAT_DELAY", "Remove Chat Hover Delay", "OPTION_TOOLTIP_REMOVE_CHAT_DELAY") - self.applyFunc = "ChatFrame_ApplyMouseOverDelay" + this.applyFunc = "BenillaChatFrame_ApplyMouseOverDelay" - + - OptionsRow_OnLoad(self, "ChatBubbles", + BenillaOptionsRow_OnLoad(this, "ChatBubbles", "Show Chat Bubbles", "OPTION_TOOLTIP_CHAT_BUBBLES") - + - OptionsRow_OnLoad(self, "showLootSpam", + BenillaOptionsRow_OnLoad(this, "showLootSpam", "Detailed Loot Information", "OPTION_TOOLTIP_SHOW_LOOT_SPAM") - + - OptionsRow_OnLoad(self, "ChatBubblesParty", + BenillaOptionsRow_OnLoad(this, "ChatBubblesParty", "Show Party Chat Bubbles", "OPTION_TOOLTIP_PARTY_CHAT_BUBBLES") @@ -3990,91 +4028,91 @@ and writes it (l.337). The filter drops a SpamMessages.dbc match in every chat type but CHAT_MSG_FILTERED (`0x49aad2`). --> - + - OptionsRow_OnLoad(self, "spamFilter", "Disable Spam Filter", + BenillaOptionsRow_OnLoad(this, "spamFilter", "Disable Spam Filter", "OPTION_TOOLTIP_DISABLE_SPAM_FILTER") - self.invert = 1 + this.invert = 1 - + - + - OptionsRow_OnLoad(self, "nameplateShowEnemies", - "Enemy Name Plates") + BenillaOptionsFuncRow_OnLoad(this, BenillaOptionsFrame_GetEnemyPlates, + BenillaOptionsFrame_SetEnemyPlates, "0", "Enemy Name Plates") - + - OptionsRow_OnLoad(self, "nameplateShowFriends", - "Friendly Name Plates") + BenillaOptionsFuncRow_OnLoad(this, BenillaOptionsFrame_GetFriendlyPlates, + BenillaOptionsFrame_SetFriendlyPlates, "0", "Friendly Name Plates") - + - OptionsRow_OnLoad(self, "UnitNamePlayer", "Player Names", + BenillaOptionsRow_OnLoad(this, "UnitNamePlayer", "Player Names", "OPTION_TOOLTIP_SHOW_PLAYER_NAMES") - + - OptionsRow_OnLoad(self, "UnitNamePlayerGuild", "Player Guild Names", + BenillaOptionsRow_OnLoad(this, "UnitNamePlayerGuild", "Player Guild Names", "OPTION_TOOLTIP_SHOW_GUILD_NAMES", 1) - self.parentRow = "RowPlayerNames" + this.parentRow = "RowPlayerNames" - + - OptionsRow_OnLoad(self, "UnitNamePlayerPVPTitle", "Player Titles", + BenillaOptionsRow_OnLoad(this, "UnitNamePlayerPVPTitle", "Player Titles", "OPTION_TOOLTIP_SHOW_PLAYER_TITLES", 1) this.parentRow = "RowPlayerNames" - + - OptionsRow_OnLoad(self, "UnitNameNPC", "NPC Names", + BenillaOptionsRow_OnLoad(this, "UnitNameNPC", "NPC Names", "OPTION_TOOLTIP_SHOW_NPC_NAMES") - + - OptionsRow_OnLoad(self, "UnitNameOwn", "Show Own Name", + BenillaOptionsRow_OnLoad(this, "UnitNameOwn", "Show Own Name", "OPTION_TOOLTIP_SHOW_OWN_NAME") @@ -4120,10 +4158,10 @@ - KeyBindings_CharacterToggle(this) + BenillaKeyBindings_CharacterToggle(this) GameTooltip:SetOwner(this, "ANCHOR_RIGHT") - GameTooltip:SetText(KeyBindings_String("CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP", + GameTooltip:SetText(BenillaKeyBindings_String("CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP", "Click this to toggle between general key bindings and key bindings specific to this character."), nil, nil, nil, nil, 1) GameTooltip:Hide() @@ -4133,119 +4171,119 @@ getglobal(this:GetName() .. "Label"):SetText( - KeyBindings_String("CHARACTER_SPECIFIC_KEYBINDINGS", "Character Specific Key Bindings")) + BenillaKeyBindings_String("CHARACTER_SPECIFIC_KEYBINDINGS", "Character Specific Key Bindings")) - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -4263,100 +4301,106 @@ ScrollFrame_OnLoad() - - FauxScrollFrame_OnVerticalScroll(KEYBINDINGS_ROW_HEIGHT, KeyBindingsPage_Update) + FauxScrollFrame_OnVerticalScroll(BENILLA_KEYBINDINGS_ROW_HEIGHT, BenillaKeyBindingsPage_Update) - if not KeyBindingsPage.selected then + if BenillaKeyBindingsPage.selected then + BenillaKeyBindings_OnMouseWheel(arg1) + else ScrollFrameTemplate_OnMouseWheel(arg1) end - + - if not KeyBindingsPage.selected then + if BenillaKeyBindingsPage.selected then + BenillaKeyBindings_OnMouseWheel(arg1) + else BenillaFauxScrollFrame_OnMouseWheel(getglobal(this:GetName() .. "ScrollFrame"), arg1) end + BenillaKeyBindings_OnKeyDown(arg1) - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - - @@ -4475,16 +4519,27 @@ BenillaOptionsFrame_UpdateScale() + BenillaOptionsTab_FitWidth(BenillaOptionsFrameGameTab) + BenillaOptionsTab_FitWidth(BenillaOptionsFrameAddOnsTab) BenillaOptionsFrame_SelectCategory(this.selectedCategory or "Controls") if UpdateMicroButtons then UpdateMicroButtons() end - + + + this:EnableKeyboard(false) + this:EnableMouseWheel(false) + + BenillaKeyBindings_OnKeyDown() + BenillaKeyBindings_OnKeyDown(arg1) + BenillaKeyBindings_OnMouseWheel(arg1) + BenillaOptionsFrameSearchBox:SetText("") - OptionsPage_DiscardPending() - KeyBindings_SetSelected(nil) - KeyBindings_Output("") + BenillaOptionsPage_DiscardPending() + BenillaKeyBindings_SetSelected(nil) + BenillaKeyBindings_Output("") if UpdateMicroButtons then UpdateMicroButtons() end diff --git a/crates/benilla-app/assets/ui/ScriptLogFrame.xml b/crates/benilla-app/assets/ui/ScriptLogFrame.xml index 375c1dcc..13fd9dcc 100644 --- a/crates/benilla-app/assets/ui/ScriptLogFrame.xml +++ b/crates/benilla-app/assets/ui/ScriptLogFrame.xml @@ -1,16 +1,20 @@ diff --git a/crates/benilla-app/assets/ui/ScrollTemplates.xml b/crates/benilla-app/assets/ui/ScrollTemplates.xml index 0a7cfd07..19a3f3e8 100644 --- a/crates/benilla-app/assets/ui/ScrollTemplates.xml +++ b/crates/benilla-app/assets/ui/ScrollTemplates.xml @@ -183,7 +183,7 @@ - BenillaFauxScrollBar_OnValueChanged(self, arg1) + BenillaFauxScrollBar_OnValueChanged(this, arg1) diff --git a/crates/benilla-app/assets/ui/benilla.toc b/crates/benilla-app/assets/ui/benilla.toc deleted file mode 100644 index d7b096e6..00000000 --- a/crates/benilla-app/assets/ui/benilla.toc +++ /dev/null @@ -1,203 +0,0 @@ -# The built-in interface, in load order: a bare filename is ours, from `assets/ui`; a path is -# the reference's own file, off the player's patch chain. Entry 0, Fonts.xml, loads alone into -# every boot VM, from Startup on; the rest loads on entering the world, then third-party addons. -# The font objects thus exist before the login screen; the reference loads Fonts.xml with the -# rest of FrameXML. -# `inherits=`, `parent=` and a named `relativeTo=` resolve only against names declared above; a -# missing one only warns (the template is skipped, the parent falls back to the enclosing frame). -# A later Lua global or template replaces an earlier one; a named frame publishes its global -# only while the name is free. -# A stock `.xml` that does not `