<feed xmlns='http://www.w3.org/2005/Atom'>
<title>xavi/rts/src/gui/inc/gui.h, branch master</title>
<subtitle>Minimalistic real-time strategy video game.
</subtitle>
<id>https://gitea.privatedns.org/xavi/rts/atom?h=master</id>
<link rel='self' href='https://gitea.privatedns.org/xavi/rts/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://gitea.privatedns.org/xavi/rts/'/>
<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/rts/commit/?id=d989dc6f49f0136ea69c10cdbaf3b4cdc8e31b6b'/>
<id>urn:sha1:d989dc6f49f0136ea69c10cdbaf3b4cdc8e31b6b</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/rts/commit/?id=e3356fde2de41b29989b4e8884f04b2be763256f'/>
<id>urn:sha1:e3356fde2de41b29989b4e8884f04b2be763256f</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/rts/commit/?id=4c5630b0d409419d6de905379a06893eac64996b'/>
<id>urn:sha1:4c5630b0d409419d6de905379a06893eac64996b</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/rts/commit/?id=e636accfd5b310165c0d7b5075f89a64583b5f1a'/>
<id>urn:sha1:e636accfd5b310165c0d7b5075f89a64583b5f1a</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/rts/commit/?id=b0eb562b9b78d37493d28b413aca45542e8cd0ba'/>
<id>urn:sha1:b0eb562b9b78d37493d28b413aca45542e8cd0ba</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/rts/commit/?id=ec9f41f1abf741bcb14ff14217d9686528c6eb48'/>
<id>urn:sha1:ec9f41f1abf741bcb14ff14217d9686528c6eb48</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/rts/commit/?id=cff35e88f5741c2295b85fa6e62f391a69f5b41f'/>
<id>urn:sha1:cff35e88f5741c2295b85fa6e62f391a69f5b41f</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/rts/commit/?id=7c75118429596dcfd86dbefb32e9ae79585c4da0'/>
<id>urn:sha1:7c75118429596dcfd86dbefb32e9ae79585c4da0</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/rts/commit/?id=8c10334252821b6310cf744218f7ad8bed7917f2'/>
<id>urn:sha1:8c10334252821b6310cf744218f7ad8bed7917f2</id>
<content type='text'>
</content>
</entry>
</feed>
