Skip to content

Seamless Page Overflow V.2#123

Open
J4PC wants to merge 11 commits into
chrrs:mainfrom
J4PC:main
Open

Seamless Page Overflow V.2#123
J4PC wants to merge 11 commits into
chrrs:mainfrom
J4PC:main

Conversation

@J4PC
Copy link
Copy Markdown
Contributor

@J4PC J4PC commented May 10, 2026

Back in february I reworked the old pull request (#92 ) from the ground up, but never got around to submitting it. Suffice it to say I believe it is a lot better, but I am not sure if even this improved version is remotely close to the rest of the mod.

The features include more customisability on how you want the page to overflow.
I liked your suggestion with the enum and went a bit further: you now have two settings:
"Overflow when typing" and Overflow when Pasting ("Paste Behavior").

The overflow when typing is just a normal boolean toggle which is off by default and when turned on it automatically continues on the new page when typing and also you then get the enter and Backspace shortcuts from before.

Then for the second setting "Paste Behavior" here the default is deny if it doesn't fit (so the vanilla behaviour), the new option here being fill page: When you paste something it will fill the page until full but not continue on the next pages.
And then lastly the Overflow to next page behaviour which is just the same except it continues on the following pages.

Personally thought about changing the default paste behaviour to fit page because I think it is more intuitive that way, it changes vanilla behaviour but so does the entire mod. I left the default in the pull request on deny if it doesn't fit but I am curious what your thoughts on that are.

On the topic of synergies I now consolidated the way the paste and typing overflow system work so they go through one function which leads to the same behaviour when pasting or typing a single character. I know this implementation is probably not what you had in mind when you cited the binary search as too complex but I decided to keep it and just give it the same word wrapping as typing because when testing without the binary search there was a noticeable lag/freeze when pasting a bit more and the game could crash when pasting for example moby dick in (even though it cuts off at 100 pages).

Also while testing I noticed that some websites have a next line symbol which appears when pasting the contents in the book so in this new version they get filtered out.

#57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant