[solved] scaling sprites? problems since scaleable property got removed...

Place to get help with not working mods / modding interface.
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 445
Joined: Thu Dec 21, 2017 8:02 am
Contact:

[solved] scaling sprites? problems since scaleable property got removed...

Post by ownlyme »

edit: found it, use the style.stretch_image_to_widget_size property
that works pretty well if the user doesn't resize his window

in window mode, my graphs look like this:
win.jpg
win.jpg (16.3 KiB) Viewed 505 times
when i go into fullscreen mode, everything gets scaled, except the black sprite i'm using for the background:
ful.jpg
ful.jpg (17.24 KiB) Viewed 505 times
Anybody have an idea?

with natural_height instead of height the window frame just stays smaller and the bottom of the graph dissapears (the lightblue graph)
and also adding natural_width makes the whole thing disappear...

Code: Select all

	gui.add{type = "sprite", name = "graph", sprite="rr-black-background", direction = "vertical"}
	gui.graph.style.width=math.floor(80*PIXEL_WIDTH)+32
	gui.graph.style.height=GRAPH_HEIGHT
	--gui.graph.style.scaleable = false
	gui.graph.add{type = "table", column_count=COLUMN_COUNT+1, name = "table", direction = "vertical"}
	gui.graph.table.style.horizontal_spacing=0
	gui.graph.table.style.vertical_spacing=0
	--gui.graph.table.style.scaleable = false
	
		{
      type="sprite",
      name="rr-black-background",
      filename = "__RealisticReactors__/graphics/black192x101.png",
      priority = "extra-high",
      width = 192,
      height = 101,
	},
i don't even get why they removed the scaleable property in the first place
creator of 55 mods
My api requests/suggestions: ui relative for overlay||Grenade arc||Player Modifiers||textbox::selection||Singleplayer RCON||disable car's ground sounds
Post Reply

Return to “Modding help”