mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 08:00:42 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user