Repository navigation
A week of Apus Engine: a window that draws itself, and six small detective stories #18
Cooler2
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
58 commits this week, almost all of them on the border between the engine and the operating system, where a game stops being a picture in a rectangle and starts behaving like a proper desktop application.
A custom window frame
Drawing your own title bar is easy; doing it right is hard. The usual approach drops the frame entirely, and the window promptly forgets how to snap to screen edges, ignores Win+arrows and covers the taskbar when maximized. Apus Engine cuts the OS frame away but keeps the standard window style, so Windows itself still handles all of that. The same works under SDL.
On the game side it's one call: after BindToWindow, a regular TUIWindow becomes the frame of the OS window. Its top strip acts as the caption, and buttons and menus on it stay clickable. The new demo/WindowFrame shows it in action.
The window learns to talk to the system
Text
Text effects have reached the UI: the TextFXStyle module adds glow, outline or shadow to a button caption with one style string. The effect can react to state, for example by glowing gold on hover.
Also, GetFont(50) at UI scale ×2 produced a glyph too tall for the cache, and one label could wipe out the whole scene frame. Not anymore.
Six small detective stories
Most of the week went into bugs that never show up in a demo but would ruin somebody's evening one day:
Bottom line: a game on Apus Engine now behaves much more like a real application, and several bugs that would only have hit real players didn't make it to a release.
All reactions