Jump to content

[SOLVED] GUI - Padding


photo

Recommended Posts

Posted

Hello Unigine,

 

like I requested in an older task, I just want to get this feature up again, its really hard to implement a "functionality" GUI without a "padding" function (http://www.w3schools.com/css/css_padding.asp).

 

Could you please think anew about implementing this feature?

 

Thanks

Lars

Posted

We'll keep your suggestion in mind, but for now I'm afraid it's a no, sorry.

  • You can use empty vboxes with space argument.
  • Create a child with an Overlap flag and manually calculate the required offset.

  • 2 months later...
Posted

Left, right, top and bottom paddings will be available for VBox, HBox, GridBox, GroupBox, TabBox, ScrollBox and Window widgets.

Posted

Hello frustum,

 

that sounds awesome thanks for you feedback!

 

Just a little response: I hope the padding can be used liked "DIV" paddings so you don't be addicted in anyway by padding to the left with the nested containers.

So parent containers where a child container is nested, and the child container will be padded, the parent container won't be padded at all?

 

Best regards

Lars

Posted

Lars,

 

I'm sorry but I cannot get your question. The parent has its own paading, and children have their own ones.

For example, here how it looks like:

post-13-0-13076900-1358340191_thumb.png

 

And here's a UI file:

<ui version="1.00">

<window name="Nodes::window" export="1">
	<text>Nodes</text>
	<vbox space="4" align="expand" padding_l="100">
		<hpaned name="Nodes::window_hp" export="1" value="-32767" align="expand">
			<vbox align="expand">				
				<vbox>
					<hbox align="expand" padding_b="30">
						<icon name="Nodes::clone_i" export="1" texture="core/editor/gui/nodes_clone.png">
							<tooltip>Clone node</tooltip>
							<callback type="clicked">Nodes::clone_clicked</callback>
						</icon>
						...
					</hbox>
				</vbox>				
				<vbox space="2"/>				
				<vbox>
					...
				</vbox>				
				<vbox space="2"/>				
				<scrollbox align="expand" width="200" height="320" padding_l="70">
					<treebox name="Nodes::nodes_tb" export="1" align="expand" editable="1" multi_selection="1" texture="core/editor/gui/nodes_icons.png">
						<tooltip>Drag nodes with pressed ALT to edit hierarchy</tooltip>
						<callback type="changed">Nodes::nodes_changed</callback>
						...
					</treebox>
				</scrollbox>
				...
			</vbox>
		</hpaned>
	</vbox>
</window>
</ui>
Posted

Hi Manguste,

 

thanks that answered my question :)

Looks awesome, hopefully it works like shown :D.

Best regards

×
×
  • Create New...