I'm trying to map again, so I'm here fixing minor annoyances again. As always, C++ is not my native language and my dev machine is Linux, so if I made some poor architectural choices or broke something on Windows... sorry :)
Commits try to explain themselves, but the highlights are:
When a directory changes, make the resulting prompt dialog modal to the active window. Tabbing back to the map editor only to have the focus stolen by the main window for the sake of a modal, when the whole app is frozen under it anyway, is very weird.
Fix the splash screen repaint on GTK. Sort of. Not during startup, but at least when opening an archive or map. It also shows attached to the main window most of the time, now, which avoids giving it a taskbar entry (at least on GTK).
Fix the duplicate wheel events on the map canvas on GTK. This seems to be a wxGTK bug, but the duplicate events have identical timestamps, so weeding them out is very easy.
Fix rendering of texture offsets with negative scale. Seems like ZDoom ignores the sign when scaling the offsets.
Fix an infinite loop in mergeArch. I'm good at stumbling into these, apparently. In this case it resulted from precision cruft sneaking in after using Edit Objects.
Fix the 2D view not updating correctly after deleting a sector. This swaps the last sector into the deleted sector's place in the list, but because no geometry actually changed, the VBOs aren't updated, leading to some confusing between the new and old sector.
Remember configuration order for specials and UDMF properties. The config lists them in a human-curated and pleasant order, which was then being thrown away for the default order you get out of std::map. The special tab and prop grid are much nicer to scroll through now.
Show the names of UDMF properties in prop grid tooltips. This was really more about investigating why UDMF props were in the order they were in the first place, but it seems good to expose.
Spice up the props grid, just a bit. You can now click on the label column to focus it (which is oddly not default behavior), allowing for ease of keyboard navigation. You can also multi-select properties, which currently has only one use: pressing delete to clear them all at once. It could be nice to be able to copy a specific set of properties between objects sometime, though.
Fix nonexistent UDMF props being created when looked up. This led to every side2.X pseudo-property being created as a blank entry on lines, which in turn put a bunch of blank rows at the bottom of the line propgrid and confused the heck out of me. I guess std::map just creates default objects if you so much as glance at it.
Consolidate some group names for Boom specials. Boom had "Floor Down" and "Remote Door" groups, but Doom had these as "Floors > Move Down" and "Doors > Remote".
Fix the "Change Special" dialog being blank on GTK. I do not know what happened here but now it works so let's not question it.
Allow searching action specials by name. There's a big ol' textbox up there that only takes numbers! Now if you type text, it filters the list of specials down to those that contain what you typed.
There's not actually a filtering mechanism on the TreeView, so it has to nuke and repopulate the tree while you're typing, but there are only so many specials so it's... fine. It's fine.
Also, the selection and args panel should no longer get out of sync.
Add arg types for time. Now doors with a "delay" arg have a dropdown telling you that the standard door delay is 105, which is good for me personally, because for some reason I was absolutely convinced it was 50.
Fix some parse bugs with magic DECORATE/ZScript comments. It was possible for the tokenizer to eat real tokens from subsequent lines in the name of finding arguments for these comments, which would then confuse the rest of the parse. I couldn't think of a way to fix this within the tokenizer, so I changed it to sub-parse the comments.
Also some LOG_DEBUG stuff. It just wasn't working, and then I found out it only works with the -debug flag, but it already compiles to nothing unless you're running a debug build anyway, so I fixed this, and also deleted some existing LOG_DEBUGs that I left lying around because they probably shouldn't end up in the codebase.
I'm trying to map again, so I'm here fixing minor annoyances again. As always, C++ is not my native language and my dev machine is Linux, so if I made some poor architectural choices or broke something on Windows... sorry :)
Commits try to explain themselves, but the highlights are:
When a directory changes, make the resulting prompt dialog modal to the active window. Tabbing back to the map editor only to have the focus stolen by the main window for the sake of a modal, when the whole app is frozen under it anyway, is very weird.
Fix the splash screen repaint on GTK. Sort of. Not during startup, but at least when opening an archive or map. It also shows attached to the main window most of the time, now, which avoids giving it a taskbar entry (at least on GTK).
Fix the duplicate wheel events on the map canvas on GTK. This seems to be a wxGTK bug, but the duplicate events have identical timestamps, so weeding them out is very easy.
Fix rendering of texture offsets with negative scale. Seems like ZDoom ignores the sign when scaling the offsets.
Fix an infinite loop in mergeArch. I'm good at stumbling into these, apparently. In this case it resulted from precision cruft sneaking in after using Edit Objects.
Fix the 2D view not updating correctly after deleting a sector. This swaps the last sector into the deleted sector's place in the list, but because no geometry actually changed, the VBOs aren't updated, leading to some confusing between the new and old sector.
Remember configuration order for specials and UDMF properties. The config lists them in a human-curated and pleasant order, which was then being thrown away for the default order you get out of
std::map
. The special tab and prop grid are much nicer to scroll through now.Show the names of UDMF properties in prop grid tooltips. This was really more about investigating why UDMF props were in the order they were in the first place, but it seems good to expose.
Spice up the props grid, just a bit. You can now click on the label column to focus it (which is oddly not default behavior), allowing for ease of keyboard navigation. You can also multi-select properties, which currently has only one use: pressing delete to clear them all at once. It could be nice to be able to copy a specific set of properties between objects sometime, though.
Fix nonexistent UDMF props being created when looked up. This led to every
side2.X
pseudo-property being created as a blank entry on lines, which in turn put a bunch of blank rows at the bottom of the line propgrid and confused the heck out of me. I guessstd::map
just creates default objects if you so much as glance at it.Consolidate some group names for Boom specials. Boom had "Floor Down" and "Remote Door" groups, but Doom had these as "Floors > Move Down" and "Doors > Remote".
Fix the "Change Special" dialog being blank on GTK. I do not know what happened here but now it works so let's not question it.
Allow searching action specials by name. There's a big ol' textbox up there that only takes numbers! Now if you type text, it filters the list of specials down to those that contain what you typed.
There's not actually a filtering mechanism on the TreeView, so it has to nuke and repopulate the tree while you're typing, but there are only so many specials so it's... fine. It's fine.
Also, the selection and args panel should no longer get out of sync.
Add arg types for time. Now doors with a "delay" arg have a dropdown telling you that the standard door delay is 105, which is good for me personally, because for some reason I was absolutely convinced it was 50.
Fix some parse bugs with magic DECORATE/ZScript comments. It was possible for the tokenizer to eat real tokens from subsequent lines in the name of finding arguments for these comments, which would then confuse the rest of the parse. I couldn't think of a way to fix this within the tokenizer, so I changed it to sub-parse the comments.
Also some
LOG_DEBUG
stuff. It just wasn't working, and then I found out it only works with the-debug
flag, but it already compiles to nothing unless you're running a debug build anyway, so I fixed this, and also deleted some existingLOG_DEBUG
s that I left lying around because they probably shouldn't end up in the codebase.