OpenXcom Forum
Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: krautbernd on November 22, 2018, 10:21:56 pm
-
This is an extremely minor gripe, but the rectangle in the background image for ufopedia articles (items/weapons) used to display the BIGOB image is 2 pixels wider than the actual BIGOB image. This is fine for vanilla xcom, but some mods (x-com files for example) use it to display NPCs or other items that don't fit into that space especially well. They aren't centered or appear cut off.
While some of this is fixable by modifying the background image (see attached images), this leads to the weight indicator being drawn over the rectangle.
Would it be possible to either define a seperate background image to be used per entry and/or override the default placement of elements in ufopedia entries? Case in point, this probably concerns
_txtWeight = new Text(88, 8, 104, 55);
_image = new Surface(32, 48, 157, 5);
_game->getMod()->getSurface("BACK08.SCR")->blit(_bg);
in ArticleStateItem.cpp
Would it be possible to implement a *.rul based override for these?
(https://abload.de/thumb/screen016oefp4.jpg) (https://abload.de/image.php?img=screen016oefp4.jpg)(https://abload.de/thumb/screen015v7d2h.jpg) (https://abload.de/image.php?img=screen015v7d2h.jpg)(https://abload.de/thumb/screen0173mco7.jpg) (https://abload.de/image.php?img=screen0173mco7.jpg)(https://abload.de/thumb/screen018h3c6q.jpg) (https://abload.de/image.php?img=screen018h3c6q.jpg)
-
On a related note, would it be possible to scale in-game windows (or the size/type of fonts) according to the number of entries they have? Case in point, the commendations mod adds a new section to the UFOpedia, so the window title now overlaps the frame.
(https://abload.de/thumb/screen0070gdwc.png) (https://abload.de/image.php?img=screen0070gdwc.png)
-
On a related note, would it be possible to scale in-game windows (or the size/type of fonts) according to the number of entries they have?
Yes, but it's not easy.
Case in point, the commendations mod adds a new section to the UFOpedia, so the window title now overlaps the frame.
If you upgrade your OXC or OXCE, both now have scrolling of pedia sections... it won't overlap anymore.
-
Would it be possible to either define a separate background image to be used per entry and/or override the default placement of elements in ufopedia entries? Case in point, this probably concerns
_txtWeight = new Text(88, 8, 104, 55);
_image = new Surface(32, 48, 157, 5);
The latter, via interfaces.rul.
Todolisted.
-
Done.
Sample ruleset:
interfaces:
- type: articleItem
elements:
- id: image
pos: [100, 140] # default = [157, 5]
- id: weightText
pos: [200, 160] # default = [104, 55]
https://github.com/MeridianOXC/OpenXcom/commit/fd8ebf1f745ec4a9e64627f1fac0d6e57b2c2af4