Apply BASE Widgets' attributes engine improvement

This commit is contained in:
2022-08-25 19:56:09 +02:00
parent e366f85de1
commit a8a12a022a
12 changed files with 69 additions and 72 deletions

View File

@@ -3,18 +3,14 @@
<demo:HUD
xmlns:base="com.bartlomiejpluta.base.lib.gui"
xmlns:demo="com.bartlomiejpluta.demo.gui"
widthMode="SizeMode.RELATIVE"
heightMode="SizeMode.RELATIVE"
width="1f"
height="1f">
height="relative"
width="relative">
<base:BorderLayout-TopLeft>
<demo:Bar
ref="hp"
strokeColor="0x111111"
fillColor="0xFF0000"
widthMode="SizeMode.ABSOLUTE"
heightMode="SizeMode.ABSOLUTE"
width="250f"
height="20f"/>
</base:BorderLayout-TopLeft>
@@ -27,10 +23,9 @@
<base:Label
ref="log"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.ABSOLUTE"
width="400f"
height="25f"
alignment="GUI.ALIGN_BOTTOM | GUI.ALIGN_LEFT"
alignment="bottom|left"
color="0xFFFFFF"
fontSize="15f"/>
</base:BorderLayout-BottomLeft>
@@ -39,10 +34,9 @@
<base:Label
ref="debug"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.ABSOLUTE"
width="200f"
height="25f"
alignment="GUI.ALIGN_BOTTOM | GUI.ALIGN_RIGHT"
alignment="bottom|right"
color="0xFFFFFF"
fontSize="15f"/>
</base:BorderLayout-BottomRight>

View File

@@ -3,19 +3,16 @@
<demo:GameMenuWindow
xmlns:base="com.bartlomiejpluta.base.lib.gui"
xmlns:demo="com.bartlomiejpluta.demo.gui"
windowPosition="WindowPosition.CENTER"
windowPosition="center"
margin="10f"
padding="20f">
<base:VLayout
width="200f"
widthMode="SizeMode.ABSOLUTE">
<base:VLayout width="200f">
<base:Label
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
alignment="GUI.ALIGN_TOP | GUI.ALIGN_CENTER"
width="relative"
alignment="top|center"
red="1f"
green="1f"
blue="1f"
@@ -23,15 +20,11 @@
fontSize="30f">Game Menu
</base:Label>
<base:VOptionChoice
widthMode="SizeMode.RELATIVE"
width="1f">
<base:VOptionChoice width="relative">
<demo:Button
ref="resume_game"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
width="relative"
red="1f"
green="1f"
blue="1f"
@@ -41,8 +34,7 @@
<demo:Button
ref="start_menu"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
width="relative"
red="1f"
green="1f"
blue="1f"
@@ -52,14 +44,12 @@
<demo:Button
ref="exit"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
width="relative"
red="1f"
green="1f"
blue="1f"
fontSize="17f">Exit
</demo:Button>
</base:VOptionChoice>
</base:VLayout>

View File

@@ -3,19 +3,15 @@
<demo:StartMenuWindow
xmlns:base="com.bartlomiejpluta.base.lib.gui"
xmlns:demo="com.bartlomiejpluta.demo.gui"
windowPosition="WindowPosition.BOTTOM"
windowPosition="bottom"
margin="10f"
padding="20f">
<base:VLayout
width="200f"
widthMode="SizeMode.ABSOLUTE">
<base:VLayout width="200f">
<base:Label
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
alignment="GUI.ALIGN_TOP | GUI.ALIGN_CENTER"
width="relative"
alignment="top|center"
red="1f"
green="1f"
blue="1f"
@@ -23,15 +19,11 @@
fontSize="30f">Menu
</base:Label>
<base:VOptionChoice
widthMode="SizeMode.RELATIVE"
width="1f">
<base:VOptionChoice ref="menu" width="relative">
<demo:Button
ref="new_game"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
width="relative"
red="1f"
green="1f"
blue="1f"
@@ -41,16 +33,13 @@
<demo:Button
ref="exit"
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
width="relative"
red="1f"
green="1f"
blue="1f"
fontSize="17f">Exit
</demo:Button>
</base:VOptionChoice>
</base:VLayout>
</demo:StartMenuWindow>

View File

@@ -3,17 +3,16 @@
<demo:EquipmentWindow
xmlns:base="com.bartlomiejpluta.base.lib.gui"
xmlns:demo="com.bartlomiejpluta.demo.gui"
windowPosition="WindowPosition.CENTER"
windowPosition="center"
padding="20f"
widthMode="SizeMode.AUTO"
heightMode="SizeMode.AUTO">
width="auto"
height="auto">
<base:VLayout widthMode="SizeMode.AUTO" heightMode="SizeMode.AUTO">
<base:VLayout width="auto" height="auto">
<base:Label
font="A.fonts.roboto_regular.uid"
widthMode="SizeMode.RELATIVE"
width="1f"
alignment="GUI.ALIGN_TOP | GUI.ALIGN_CENTER"
width="relative"
alignment="top|center"
red="1f"
green="1f"
blue="1f"
@@ -21,7 +20,7 @@
fontSize="30f">Equipment
</base:Label>
<base:VGridOptionChoice ref="eq" columns="4" widthMode="SizeMode.AUTO" heightMode="SizeMode.AUTO">
<base:VGridOptionChoice ref="eq" columns="4" width="auto" height="auto">
<demo:ItemIconView margin="5f" />
<demo:ItemIconView margin="5f" />
<demo:ItemIconView margin="5f" />