a few questions about modding the UI
Posted: Sun Aug 16, 2015 9:24 pm
I'm trying to edit the UI and everything I try just seems to crash the game
1. in the red alert mod, i've edited this tag in chrome.yaml
order-icons: chrome2.png
i've also added a .png image called chrome2.png to the uibits folder. this doesn't seem to work, the game crashes. Am I doing something wrong? is there a correct way to do this? my exception log for this;
Red Alert Mod at Version release-20150614
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.18444
Exception of type `System.IO.InvalidDataException`: Non-power-of-two array 764x463
at OpenRA.Renderer.Sdl2.Texture.SetData(Byte[] colors, Int32 width, Int32 height)
at OpenRA.Graphics.Sheet.GetTexture()
at OpenRA.Graphics.SpriteRenderer.Flush()
at OpenRA.Graphics.SpriteRenderer.SetRenderStateForSprite(Sprite s)
at OpenRA.Graphics.SpriteRenderer.DrawSprite(Sprite s, float2 location, Single paletteTextureIndex, float2 size)
at OpenRA.Widgets.WidgetUtils.FillRectWithSprite(Rectangle r, Sprite s)
at OpenRA.Widgets.WidgetUtils.DrawPanelPartial(Rectangle bounds, PanelSides ps, Sprite borderTop, Sprite borderBottom, Sprite borderLeft, Sprite borderRight, Sprite cornerTopLeft, Sprite cornerTopRight, Sprite cornerBottomLeft, Sprite cornerBottomRight, Sprite background)
at OpenRA.Widgets.WidgetUtils.DrawPanelPartial(String collection, Rectangle bounds, PanelSides ps)
at OpenRA.Mods.Common.Widgets.ButtonWidget.DrawBackground(String baseName, Rectangle rect, Boolean disabled, Boolean pressed, Boolean hover, Boolean highlighted)
at OpenRA.Mods.Common.Widgets.ButtonWidget.DrawBackground(Rectangle rect, Boolean disabled, Boolean pressed, Boolean hover, Boolean highlighted)
at OpenRA.Mods.Common.Widgets.ButtonWidget.Draw()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Game.RenderTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
2. is there a way to add a new font to the game?
3.in the CnC mod, there are numbered buttons for producing items from multiple productive structures at the same time, i'm not sure what they're called. What do I need to do to add those into the RA mod?
1. in the red alert mod, i've edited this tag in chrome.yaml
order-icons: chrome2.png
i've also added a .png image called chrome2.png to the uibits folder. this doesn't seem to work, the game crashes. Am I doing something wrong? is there a correct way to do this? my exception log for this;
Red Alert Mod at Version release-20150614
Operating System: Windows (Microsoft Windows NT 6.1.7601 Service Pack 1)
Runtime Version: .NET CLR 4.0.30319.18444
Exception of type `System.IO.InvalidDataException`: Non-power-of-two array 764x463
at OpenRA.Renderer.Sdl2.Texture.SetData(Byte[] colors, Int32 width, Int32 height)
at OpenRA.Graphics.Sheet.GetTexture()
at OpenRA.Graphics.SpriteRenderer.Flush()
at OpenRA.Graphics.SpriteRenderer.SetRenderStateForSprite(Sprite s)
at OpenRA.Graphics.SpriteRenderer.DrawSprite(Sprite s, float2 location, Single paletteTextureIndex, float2 size)
at OpenRA.Widgets.WidgetUtils.FillRectWithSprite(Rectangle r, Sprite s)
at OpenRA.Widgets.WidgetUtils.DrawPanelPartial(Rectangle bounds, PanelSides ps, Sprite borderTop, Sprite borderBottom, Sprite borderLeft, Sprite borderRight, Sprite cornerTopLeft, Sprite cornerTopRight, Sprite cornerBottomLeft, Sprite cornerBottomRight, Sprite background)
at OpenRA.Widgets.WidgetUtils.DrawPanelPartial(String collection, Rectangle bounds, PanelSides ps)
at OpenRA.Mods.Common.Widgets.ButtonWidget.DrawBackground(String baseName, Rectangle rect, Boolean disabled, Boolean pressed, Boolean hover, Boolean highlighted)
at OpenRA.Mods.Common.Widgets.ButtonWidget.DrawBackground(Rectangle rect, Boolean disabled, Boolean pressed, Boolean hover, Boolean highlighted)
at OpenRA.Mods.Common.Widgets.ButtonWidget.Draw()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Widgets.Widget.DrawOuter()
at OpenRA.Game.RenderTick()
at OpenRA.Game.Loop()
at OpenRA.Game.Run()
at OpenRA.Program.Run(String[] args)
at OpenRA.Program.Main(String[] args)
2. is there a way to add a new font to the game?
3.in the CnC mod, there are numbered buttons for producing items from multiple productive structures at the same time, i'm not sure what they're called. What do I need to do to add those into the RA mod?