Skip to content

Movable menu windows - #42

Merged
Flamefire merged 5 commits into
Return-To-The-Roots:masterfrom
morganchristiansson:menu-windows
Jun 26, 2026
Merged

Movable menu windows#42
Flamefire merged 5 commits into
Return-To-The-Roots:masterfrom
morganchristiansson:menu-windows

Conversation

@morganchristiansson

Copy link
Copy Markdown
Contributor
  1. Make Menu, Save, Load windows movable.
  2. Make Load window resizable and filelist resize with window size.
  3. Filter Load filelist on known filetypes.
  4. Make Save inputs same width.

@morganchristiansson

Copy link
Copy Markdown
Contributor Author

I have a large .png heightmap in the save folder, loading it causes OOM and kills a bunch of applications. Very annoying.

I also added items to main menu in another branch and it's annoying to not be able to move it out of the way.
Idk if it was intentional to have move disabled, but don't see why it shouldn't be allowed.

@morganchristiansson
morganchristiansson force-pushed the menu-windows branch 2 times, most recently from 23c94df to e459607 Compare June 20, 2026 13:18
@morganchristiansson morganchristiansson changed the title Menu windows Movable menu windows Jun 22, 2026
Comment thread callbacks.cpp Outdated
@Flamefire

Copy link
Copy Markdown
Member

I have a large .png heightmap in the save folder, loading it causes OOM and kills a bunch of applications. Very annoying.

I don't understand how this is related to this PR. Can you explain please?

@morganchristiansson

Copy link
Copy Markdown
Contributor Author

I have a large .png heightmap in the save folder, loading it causes OOM and kills a bunch of applications. Very annoying.

I don't understand how this is related to this PR. Can you explain please?

"Filter Load filelist on known filetypes" stops "Load map" from accidentally loading unsupported filetypes and crashing on OOM.

@Flamefire

Copy link
Copy Markdown
Member

conflict to resolve

@morganchristiansson

morganchristiansson commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

conflicts = progress!
Thank you ❤️
Merged upstream/master, resolve conflicts, ran and tested, and pushed.

Idk if I should rebase or squash this branch before merge, it has multiple merge commits, I'd be happy to do so, ensuring empty diff against reviewed commit pointer, and force push.
Takes a bit of skill and trust, I'm good at git.

@Flow86

Flow86 commented Jun 26, 2026

Copy link
Copy Markdown
Member

rebase is always good (still having conflicts btw)

@morganchristiansson

Copy link
Copy Markdown
Contributor Author

Yeah just force pushing during review can mess things up for reviewers, so once review starts I stop rebasing&force pushing. Unless coordinated with reviewers.
But can do it at end of review.

How can you say there's conflicts? I just merged latest upstream/master and PR says no conflicts with base branch.

@morganchristiansson

Copy link
Copy Markdown
Contributor Author

Rebased.
Empty diff against origin/menu-windows.
Force pushed.

@Flamefire

Copy link
Copy Markdown
Member

Yeah just force pushing during review can mess things up for reviewers, so once review starts I stop rebasing&force pushing. Unless coordinated with reviewers.
But can do it at end of review.

That is exactly the way to go, thanks!

rebase is always good

I disagree here (see e.g. above) as often the argument for rebase vs. (possibly frequent) merges of main is that it "looks odd" which doesn't matter to me as long as git easily handles it.
However for conflicts I do prefer doing rebases as it allows me to check what I wanted to change against what did change after each individual commit.
So I guess mostly a matter of taste unless it causes issues, such as during a review.

@Flamefire
Flamefire merged commit be2e0da into Return-To-The-Roots:master Jun 26, 2026
1 check passed
@morganchristiansson

Copy link
Copy Markdown
Contributor Author

Btw I really enjoy the craft of creating a perfect series of commits for review and hate the squash on merge feature.

Tho some people have no idea what they're doing with git and their PRs are best squashed on merge.

FlexApex added a commit to FlexApex/s25edit that referenced this pull request Jun 28, 2026
…Roots#42 Position API

After rebasing the feature branch onto upstream master (which merged PR Return-To-The-Roots#40
xy-point-extent and PR Return-To-The-Roots#42 menu-windows), several files had stale int-based
API calls/definitions that conflicted with the new Position/Extent API:

- CGame.h: add missing enterEditor/LoadSettings/SaveSettings declarations
  and suppressResizeEvents_ member (implemented in CGame.cpp from the
  resizable-window commit but omitted from the header during rebase)
- globals.h: add TRIANGLE_HEIGHT/WIDTH/INCREASE macro aliases for the
  lowercase mutable globals used by CGame_Event.cpp and CSurface.cpp
- CSurface.cpp: restore Position-based signatures for Draw, DrawPixel_*,
  GetPixel, update_shading, update_flatVectors, update_nodeVector to match
  CSurface.h (PR Return-To-The-Roots#42 API); keep the tiling additions (floorDiv,
  drawTriangleTiled, new DrawTriangleField loop) from the resizable commit
- callbacks.cpp: rebuild EditorLoadMenu folder navigation on top of the
  PR Return-To-The-Roots#42 Position API (no int-based addText/addButton calls)
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.

3 participants