feat(frame): add the OnMinMaxChanged script to Slider and StatusBar

SetMinMaxValues runs it with (min, max) when the range changes, before
the value is applied to the new range, as 4.3.4 does. The ExtraScripts
resolver now skips a script of the same name on another class instead
of stopping, so both classes can have one.
This commit is contained in:
Brues
2026-10-20 14:31:06 -05:00
parent 986f849b65
commit f112a13695
6 changed files with 176 additions and 4 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ int __fastcall Resolver_h(void *frame, void *edx, const char *name) {
for (const Script *s = g_head; s != nullptr; s = s->next) {
if (!Ascii::EqualCI(name, s->nameLower))
continue;
if (!Game::Lua::IsA(frame, s->typeIdVar))
return 0;
if (!Game::Lua::IsA(frame, s->typeIdVar)) // another class may have the name
continue;
Script::Cell &cell = s->cells[frame];
return reinterpret_cast<int>(cell.v);
}