![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
12-26-13, 03:45 PM
|
#6 | |||||||
|
Helmsman
![]() Join Date: Jun 2011
Posts: 105
Downloads: 181
Uploads: 0
|
Fantastic!
Quote:
Is that prudent? I mean, AFAICT the ini structure itself with those [Gxx Iyyy] identifiers just represents the actual UI tree (or forest, actually), but flattened backwards. These bracketed numbers don't present any meaningful info for editing, do they? Plus if you store them, you'd have to recalculate them for the whole subtree every time you add or remove UI elements, instead of just once when saving the file.IDs (ItemID, ParentID), on the other hand, are a different matter, since they are pretty much responsible for the actual UI structure. Quote:
Quote:
For adding new items, I've hacked together a rather naive ID generator which sort of works, although it's not completely in line with what I think it was intended for IDs, but again we have to consider that the program may be working with files edited by hand, which also don't strictly follow the developers intent. From what I can tell, IDs were intended to be in the form XX000000 for pages and XXYY0000 for groups (no matter how deep in the tree those groups are), with only the lowest two bytes being used by all other item types, and in a way that a child items would respect that numbering in their own IDs. In practice, however, we could potentially encounter files that don't follow this convention, esp. the last part. Quote:
Regarding ID checking, yeah. While I was drafting the parser, I quickly found out that I can't really read the file if I consider it an error if there are duplicate or incorrect IDs: MaGUI, for example, has several duplicates and one ID that wouldn't fit into 32 bits ![]() Quote:
Quote:
Quote:
![]() vanjast, can I PM you as well for further discussion? Or should we keep it here so as much as possible would be public? |
|||||||
|
|
| Thread Tools | |
| Display Modes | |
|
|
