[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Debug Element Layout" vod_platform=youtube id=L81ZcBDnQx4 annotator=Miblo] [1:50][Recap and set the stage for the day] [5:17][handmade.debug.cpp: Look at how we're currently drawing things] [7:17][handmade_debug.cpp: Introduce layout struct to contain local variables] [10:02][handmade_debug.cpp: Introduce Advance] [15:21][Run the game and find that it's the same as it was] [15:30][handmade_debug.cpp: Introduce PlaceRectangle] [18:41][Run the game and find that it just works] [18:51][handmade_debug.cpp: Use PlaceRectangle to compute the layout of elements for us] [20:23][Run the game and show the elements using the same layout routine] [20:50][handmade_debug.cpp: Consider the difficulty of pulling out the SizeP computation] [24:05][handmade_debug.cpp: Simplify and loft out computations from DEBUGDrawMainMenu] [33:50][handmade_debug.cpp: Introduce BeginElementRectangle, MakeElementSizable, DefaultInteraction and EndElement] [54:03][Run the game and spot a mistake] [54:20][handmade_debug.cpp: Only push the rects if the Element has a Size and stop making Text elements Sizeable] [55:05][handmade_debug.cpp: Add the DefaultInteraction] [56:03][Run the game and see that everything seems to be working pretty well] [57:45][Q&A][:speech] [1:00:30][@theGeekPirate][Why don't you connect to chat with your desktop?] [1:02:47][Set the stage for the evening and wind it down[ref site="Casey's Blog" page="Working on The Witness, Part 11" url="http://mollyrocket.com/casey/stream_0019.html"]][:speech] [/video]