[0.17.31][modding, guiStyles] graphical_set definition not working as expected
Posted: Sat Apr 13, 2019 9:50 am
I tried to make a custom frame with rounded edges left, bottom and right. The top is supposed to be cut off. However, when removing the top rounded corners, the corners at the bottom are no longer rendered correctly.
The image below shows a test setup. The frame on the left is the default style with rounded edges on all sides. The frame in the middles has no edge at the top, but still at the top corners. The frame on the right has no top corners and incorrect bottom corners.
This is the code I use to create the rightmost frame:
Minimal example mod is attached. Press CTRL+SHIFT+E to show/hide three frames, as seen in the screenshot above.
The image below shows a test setup. The frame on the left is the default style with rounded edges on all sides. The frame in the middles has no edge at the top, but still at the top corners. The frame on the right has no top corners and incorrect bottom corners.
This is the code I use to create the rightmost frame:
Code: Select all
data.raw["gui-style"].default["frame_without_top"] = {
type = "frame_style",
graphical_set = {
base = {
left = {x = 68, y = 8, width = 8, height = 1},
left_bottom = {x = 68, y = 9, width = 8, height = 8}, --bottom corners still defined as before
center = {x = 76, y = 8, width = 1, height = 1},
bottom = {x = 76, y = 9, width = 1, height = 8},
right = {x = 77, y = 8, width = 8, height = 1},
right_bottom = {x = 77, y = 9, width = 8, height = 8} --bottom corners still defined as before
}
}
}