marc.mitchell_ Posted July 16, 2018 Share Posted July 16, 2018 In general, I’ve found the UI system difficult to work with, the layout system isn’t very good for creating the type of UI’s we would normally implement, and some things don’t do what I expect. For example: I’m looking to use a WidgetHBox to parent spites to which arrange horizontally starting at a specific position on screen. I’ve attached an example class. I’ve created a widgetHBox and added several sprites as children like below: flythroughHBox = new WidgetHBox(gui,20,0); flythroughHBox.setPosition(1000, 250); flythroughHBox.setHeight(400); flythroughHBox.setWidth(840); path1 = new WidgetSprite(gui); path1.setTexture("Textures/UI_Assets/SpectatorMode/Button_1.TGA"); path1.setHeight(400); path1.setWidth(200); flythroughHBox.addChild(path1); And added this to the gui: gui.addChild(flythroughHBox); Setting the position using .SetPosition doesn’t have any effect on where the HBox is positioned. Is there a way to position the HBox at a specified screen position? UIManager.cs Link to comment
ded Posted July 17, 2018 Share Posted July 17, 2018 Hi Marc, Adding HBox with the ALIGN_OVERLAP flag to the parent widget or Gui should make it moveable. Link to comment
marc.mitchell_ Posted July 31, 2018 Author Share Posted July 31, 2018 Thanks @ded, this answered my question please mark resolved. Link to comment
Recommended Posts