Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F129953
GUI.proto
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Size
6 KB
Referenced Files
None
Subscribers
None
GUI.proto
View Options
syntax
=
"proto2"
;
package
Echo
.
GUIData
;
message
SizeModes
{
enum
SizeMode
{
STRETCH
=
0
;
/// The set percent size will be used.
FILL
=
1
;
/// Fill the parent element using the aspect ratio of the element content. If the aspect ratio differs
/// from the parent then the element will overflow on which ever axis is needed to fill the parent.
WIDTH_AND_CALCULATE_ASPECT_RATIO
=
2
;
/// Use the width and calculate the height based on the aspect ratio of the element content.
HEIGHT_AND_CALCULATE_ASPECT_RATIO
=
3
;
/// Use the height and calculate the width based on the aspect ratio of the element content.
WIDTH_WITH_SET_ASPECT_RATIO
=
4
;
/// Use the width and calculate height using the set aspect ratio to calculate the height based on the specified values.
HEIGHT_WITH_SET_ASPECT_RATIO
=
5
;
/// Use the height and calculate width using the set aspect ratio to calculate the width based on the specified values.
FILL_WITH_SET_ASPECT_RATIO
=
6
;
/// Fill the parent element using the set aspect ratio of the element content. If the aspect ratio differs
/// from the parent then the element will overflow on which ever axis is needed to fill the parent.
MAX_FIT_WITH_SET_ASPECT_RATIO
=
7
;
/// Fit the Element to the parent on the smallest axis using the set aspect ratio to calculate the other axis.
}
}
message
Alignments
{
enum
Alignment
{
CENTRE
=
0
;
MINIMUM
=
1
;
MAXIMUM
=
2
;
}
}
message
ElementTypes
{
enum
ElementType
{
CONTAINER
=
0
;
IMAGE
=
1
;
TEXT
=
2
;
BUTTON
=
3
;
LAYOUT
=
4
;
TEXTBOX
=
5
;
}
}
message
ImageProperties
{
optional
string
material
=
1
;
optional
bool
flip_horizontally
=
2
;
optional
bool
flip_vertically
=
3
;
//If you want to use only part of a texture for the image.
//Minimum is top left, maximum is bottom right.
optional
float
min_u
=
4
;
optional
float
min_v
=
5
;
optional
float
max_u
=
6
;
optional
float
max_v
=
7
;
}
message
TextProperties
{
required
string
text
=
1
;
required
string
font
=
2
;
optional
float
point_size
=
3
;
}
message
LayoutProperties
{
message
Directions
{
enum
Direction
{
HORIZONTAL_MIN_TO_MAX
=
0
;
/// Place elements horizontally from the minimum to maximum in the order they were added.
HORIZONTAL_MAX_TO_MIN
=
1
;
/// Place elements horizontally from the maximum to minimum in the order they were added.
VERTICAL_MIN_TO_MAX
=
2
;
/// Place elements vertically from the minimum to maximum in the order they were added.
VERTICAL_MAX_TO_MIN
=
3
;
/// Place elements vertically from the maximum to minimum in the order they were added.
}
}
message
PlacementModes
{
enum
PlacementMode
{
FIT_CONTENTS
=
0
;
/// Contents will be scaled to fit the layout size, some child size modes have unspecified* behaviour,
/// For example: Horizontal directions do not support height first child element size modes as these
/// modes expect to be able to determine the width but the horizontal placement needs to be able to
/// scale by the width of the child element, which in doing so would break the height first rule.
/// Children using the max fit size modes
ALLOW_OVERFLOW
=
1
;
/// Contents will be positioned and are allowed to be positioned outside of the layout's bounds. All size
/// modes are supported.
}
}
optional
Directions.Direction
direction
=
1
;
optional
PlacementModes.PlacementMode
placement_mode
=
2
;
optional
bool
use_optimal_settings
=
3
;
}
message
TextBoxProperties
{
required
string
text
=
1
;
required
string
font
=
2
;
optional
float
line_size
=
3
;
optional
float
point_size
=
4
;
}
message
ButtonProperties
{
optional
string
idle_material
=
1
;
optional
string
pressed_material
=
2
;
optional
string
released_material
=
3
;
optional
string
hover_material
=
4
;
}
message
Conditionals
{
optional
string
condition
=
1
;
repeated
string
function
=
2
;
}
message
Element
{
required
ElementTypes.ElementType
type
=
1
;
optional
float
width
=
2
;
optional
float
height
=
3
;
optional
float
aspect_ratio
=
4
;
optional
float
x
=
5
;
optional
float
y
=
6
;
optional
float
z
=
7
;
optional
string
name
=
8
;
optional
bool
targetable
=
9
;
optional
SizeModes.SizeMode
size_mode
=
10
;
optional
Alignments.Alignment
h_align
=
11
;
optional
Alignments.Alignment
v_align
=
12
;
repeated
string
enter_function
=
13
;
repeated
string
hover_function
=
14
;
repeated
string
leave_function
=
15
;
repeated
string
pressed_function
=
16
;
repeated
string
hold_function
=
17
;
repeated
string
released_function
=
18
;
optional
ImageProperties
image_properties
=
19
;
optional
TextProperties
text_properties
=
20
;
optional
ButtonProperties
button_properties
=
21
;
optional
LayoutProperties
layout_properties
=
22
;
optional
TextBoxProperties
textbox_properties
=
23
;
repeated
Element
element
=
24
;
repeated
string
gui_file
=
25
;
optional
bool
visible
=
26
;
optional
string
physical_width
=
27
;
optional
string
physical_height
=
28
;
optional
string
colour
=
29
;
optional
bool
inherit_parent_colour
=
30
;
optional
bool
inherit_parent_alpha
=
31
;
repeated
string
property
=
32
;
repeated
Conditionals
conditional
=
33
;
}
message
Cursor
{
required
Element
element
=
1
;
required
string
x_axis
=
2
;
required
string
y_axis
=
3
;
required
string
button
=
4
;
}
//See code documentation for the Viewport parameters.
message
Viewport
{
optional
float
left
=
1
;
optional
float
top
=
2
;
optional
float
right
=
3
;
optional
float
bottom
=
4
;
optional
SizeModes.SizeMode
mode
=
5
;
optional
float
display_aspect_ratio
=
6
;
optional
float
vertical_centre
=
7
;
optional
float
horizontal_centre
=
8
;
}
//.gui files only contain elements and/or other gui files.
message
GUI
{
repeated
Element
element
=
1
;
repeated
string
gui_file
=
2
;
}
//.screen files are similar to .gui files but contain other information for setting up a full GUI Scene.
message
Screen
{
optional
Cursor
cursor
=
1
;
optional
Viewport
viewport
=
2
;
repeated
Element
element
=
3
;
repeated
string
gui_file
=
4
;
repeated
Conditionals
conditional
=
5
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 18, 9:03 PM (48 m, 6 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
76627
Default Alt Text
GUI.proto (6 KB)
Attached To
Mode
rEE Echo 3
Attached
Detach File
Event Timeline
Log In to Comment