Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented custom marks and custom text features #1447

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from

Conversation

Hrusteckiy
Copy link
Contributor

@Hrusteckiy Hrusteckiy commented Sep 17, 2023

Allows for add custom text strings and custom marks for item's icons. It is useful for separating items with the same icons. Look at this situation in "Survivor: Escape from the Zone" mod.
image
These features should help modders with solving this

Using:
Add that node in `actor_menu_item(_16).xml`:
```<cell_item_custom_text x="1" y="1" width="24" height="16" stretch="1">
		<text x="2" y="6" width="24" height="16" font="arial_14" color="ui_2" align="r" vert_align="c"/>
  </cell_item_custom_text>```
In item's section:
```item_custom_text = st_text
item_custom_text_clr_inv = 100,250,100
item_custom_text_font = graffiti22
item_custom_text_offset = -2.0, -2.0```
`item_custom_text_clr_inv`, `item_custom_text_font`, `item_custom_text_offset`, are an optional, if not written - will be used font, color, offset from XML node. `item_custom_text` is a text from StringTable. `item_custom_text_offset` is an offset by right-bottom of cell
@github-actions github-actions bot added the UI label Sep 17, 2023
@Hrusteckiy Hrusteckiy changed the title Dev custom marks text Implemented custom marks and custom text Sep 17, 2023
@Hrusteckiy Hrusteckiy changed the title Implemented custom marks and custom text Implemented custom marks and custom text features Sep 17, 2023
@Xottab-DUTY Xottab-DUTY added Enhancement Modmaker Experience Modmaker experience with OpenXRay labels Sep 18, 2023
Using:
Add that node in `actor_menu_item(_16).xml`:
```<cell_item_custom_mark x="1" y="1" width="24" height="16" stretch="1">
		<texture>ui_item_count_back</texture>
	</cell_item_custom_mark>```
In item's section:
```item_custom_mark = true
item_custom_mark_offset = -2.0, 0.0
item_custom_mark_size = 10, 10
item_custom_mark_texture = ui_item_count_back
item_custom_mark_clr = 100,250,100```
`item_custom_mark_offset`, `item_custom_mark_size`, `item_custom_mark_texture`, `item_custom_mark_clr` are an optional - will be used texture, size, and color from XML node. By default it has position at right-bottom of cell, remember about it on offset setting up
@Hrusteckiy Hrusteckiy force-pushed the dev-custom-marks-text branch from 659fa94 to 1ce721e Compare September 19, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Modmaker Experience Modmaker experience with OpenXRay UI
Projects
Status: To do
Development

Successfully merging this pull request may close these issues.

2 participants