mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-17 00:16:02 +00:00
New, as 4.3.4 does them: - Enable / Disable / IsEnabled: a disable clears the focus; both run CSimpleFrame::RunOnEnableScript (frame flag 0x400, OnEnable/OnDisable). - OnEnable / OnDisable scripts on every frame. Buttons run them when CSimpleButton::Enable changes the state, as 4.3.4's does. - IsInIMECompositionMode reads the composition flag 1.12 already keeps (+0x3CC); OnCharComposition(self, text) runs after the input method's composition insert. - OnTextChanged(self, userInput): 4.3.4's dirty bit 0x8, kept per box at the insert and delete points; SetText's clear and insert are the script-made changes. The fire block is replaced by a call that runs the script with the bit. Fixes (benilla-re ui/editboxmarkup "Faults"): - A text ending in a colour escape or an unclosed link froze the client on Right or Delete: the forward cursor step had no end test. It now stops at the terminator, as 4.3.4's does. - A single-line box read |n as a line break in its class table but drew it as two characters; the table is now built with the decoder flags its font string draws with. - The right-justified click converted glyphs counted from the line end by stepping from the line start; it now steps back from the end.
23 lines
943 B
C++
23 lines
943 B
C++
// This file is part of ClassicAPI.
|
|
//
|
|
// ClassicAPI is free software: you can redistribute it and/or modify it under the terms
|
|
// of the GNU General Public License as published by the Free Software Foundation, either
|
|
// version 3 of the License, or (at your option) any later version.
|
|
//
|
|
// ClassicAPI is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
// PURPOSE. See the GNU General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU General Public License along with
|
|
// ClassicAPI. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
#pragma once
|
|
|
|
namespace Frame::EnableScripts {
|
|
|
|
// 4.3.4's CSimpleFrame::RunOnEnableScript: sets or clears FRAME_FLAG_DISABLED
|
|
// and runs the frame's OnDisable or OnEnable script.
|
|
void RunOnEnableScript(void *frame, bool disabled);
|
|
|
|
} // namespace Frame::EnableScripts
|