<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/jancity/src/gui/inc/gui.h, branch master</title>
<subtitle>Entry for Global Game Jam 2024.
</subtitle>
<id>https://gitea.privatedns.org/xavi/jancity/atom?h=master</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/jancity/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/'/>
<updated>2022-09-23T02:15:55+00:00</updated>
<entry>
<title>gui: Allow elements to be hidden</title>
<updated>2022-09-23T02:15:55+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-09-23T02:15:48+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=9a1b545e667036987f2bf2bb86966f941bfd384a'/>
<id>urn:sha1:9a1b545e667036987f2bf2bb86966f941bfd384a</id>
<content type='text'>
When a GUI element is hidden, no rendering or updating is done to it or
its children. This can be useful to define a complex GUI tree structure
that changes under specific conditions, without redefining it.
</content>
</entry>
<entry>
<title>gui: Implement gui_deinit</title>
<updated>2022-09-20T15:34:25+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-09-20T15:31:17+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=6867fb76c1e06011f7bb0d8158edd53c23856534'/>
<id>urn:sha1:6867fb76c1e06011f7bb0d8158edd53c23856534</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remap calls to pad/mouse/keyboard to input</title>
<updated>2022-09-20T14:56:30+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-09-20T11:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=87b4ef3a15af505f5ed5150ee1dadd2e2bc94c17'/>
<id>urn:sha1:87b4ef3a15af505f5ed5150ee1dadd2e2bc94c17</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Allow children of gui_container be resized anytime</title>
<updated>2022-07-09T22:26:48+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-07-09T22:21:09+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=f69dc6f359015e992d181c60cd815cefd6c62aad'/>
<id>urn:sha1:f69dc6f359015e992d181c60cd815cefd6c62aad</id>
<content type='text'>
So far, their position inside the container was determined when
initializing the interface. However, if a child were resized
afterwards, the container would not adjust its elements accordingly.
Moreover, the implementation for gui_container relied on hacking the
children's X/Y coordinates, which could only be done once.

Now, two additional members have been added to gui_common so that
specific X/Y offset can be determined by the parent, additionally to the
traditional rules followed by gui_coords. Despite the extra memory
footprint, it now allows containers to set specific X/Y offsets for
their children on every game cycle.
</content>
</entry>
<entry>
<title>gui: reuse callback data</title>
<updated>2022-07-02T02:08:35+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-07-02T02:08:31+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=85e11e8f9859738abbc53d2c96f4731869d09802'/>
<id>urn:sha1:85e11e8f9859738abbc53d2c96f4731869d09802</id>
<content type='text'>
There is no need to allocate memory for these callbacks for each single
GUI element. Instead, a single, statically-allocated instance can be
shared among all GUI elements of a given type.
</content>
</entry>
<entry>
<title>gui: allow custom add_child callback</title>
<updated>2022-07-01T22:45:51+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-07-01T22:45:51+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=270c6101f6236c8f949253e0f373c97d99b4ba63'/>
<id>urn:sha1:270c6101f6236c8f949253e0f373c97d99b4ba63</id>
<content type='text'>
</content>
</entry>
<entry>
<title>gui: implement {h,v}centered</title>
<updated>2022-06-28T22:39:06+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-06-28T22:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=3e50314b4415ccc171ae7a73c57e365d00ff4b9c'/>
<id>urn:sha1:3e50314b4415ccc171ae7a73c57e365d00ff4b9c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Revamp gui component</title>
<updated>2022-06-26T18:00:27+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2022-06-24T14:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=aea50395c5dbc5c49ad93384b0182d45d45c6441'/>
<id>urn:sha1:aea50395c5dbc5c49ad93384b0182d45d45c6441</id>
<content type='text'>
`gui` was tighly coupled to game logic, and could not be extended for
other purposes. Therefore, a generic GUI implementation, loosely
inspired by well-known GUI frameworks such as GTK, is now provided, with
the following properties:

- Does not depend on dynamic or static memory allocation, only automatic
(i.e., stack) memory allocation required.
- Portable among existing implementations.
- Simple to extend.
- Tiny memory footprint.

`gui` is now composed by GUI elements that can be chained to form a tree
structure. This is useful e.g.: to calculate X/Y coordinates for a given
GUI element given its parent(s).

This commit also refactors the older implementation, moving
game-specific logic into `player` and making use of the new component.
</content>
</entry>
<entry>
<title>Add project source code</title>
<updated>2022-03-30T06:20:20+00:00</updated>
<author>
<name>Xavier Del Campo Romero</name>
<email>xavi.dcr@tutanota.com</email>
</author>
<published>2021-07-02T22:49:03+00:00</published>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/jancity/commit/?id=6b9f686913efc3725b2690033cd4f398e07076ba'/>
<id>urn:sha1:6b9f686913efc3725b2690033cd4f398e07076ba</id>
<content type='text'>
</content>
</entry>
</feed>
