Skip to content

Commit 8ced665

Browse files
committed
Added logger example and logger instance direct call (using debug level)
1 parent 2119496 commit 8ced665

File tree

9 files changed

+2062
-2
lines changed

9 files changed

+2062
-2
lines changed

examples/examples.collection

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,24 @@ embedded_instances {
215215
" w: 1.0\n"
216216
" }\n"
217217
"}\n"
218+
"embedded_components {\n"
219+
" id: \"loggerproxy\"\n"
220+
" type: \"collectionproxy\"\n"
221+
" data: \"collection: \\\"/examples/logger/logger.collection\\\"\\n"
222+
"exclude: false\\n"
223+
"\"\n"
224+
" position {\n"
225+
" x: 0.0\n"
226+
" y: 0.0\n"
227+
" z: 0.0\n"
228+
" }\n"
229+
" rotation {\n"
230+
" x: 0.0\n"
231+
" y: 0.0\n"
232+
" z: 0.0\n"
233+
" w: 1.0\n"
234+
" }\n"
235+
"}\n"
218236
""
219237
position {
220238
x: 0.0

examples/examples.gui

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,165 @@ nodes {
18081808
text_leading: 1.0
18091809
text_tracking: 0.0
18101810
}
1811+
nodes {
1812+
position {
1813+
x: 651.0
1814+
y: 379.0
1815+
z: 0.0
1816+
w: 1.0
1817+
}
1818+
rotation {
1819+
x: 0.0
1820+
y: 0.0
1821+
z: 0.0
1822+
w: 1.0
1823+
}
1824+
scale {
1825+
x: 1.0
1826+
y: 1.0
1827+
z: 1.0
1828+
w: 1.0
1829+
}
1830+
size {
1831+
x: 200.0
1832+
y: 100.0
1833+
z: 0.0
1834+
w: 1.0
1835+
}
1836+
color {
1837+
x: 1.0
1838+
y: 1.0
1839+
z: 1.0
1840+
w: 1.0
1841+
}
1842+
type: TYPE_TEMPLATE
1843+
id: "logger"
1844+
parent: "buttons"
1845+
layer: ""
1846+
inherit_alpha: true
1847+
alpha: 1.0
1848+
template: "/examples/assets/button.gui"
1849+
template_node_child: false
1850+
}
1851+
nodes {
1852+
position {
1853+
x: 0.0
1854+
y: 0.0
1855+
z: 0.0
1856+
w: 1.0
1857+
}
1858+
rotation {
1859+
x: 0.0
1860+
y: 0.0
1861+
z: 0.0
1862+
w: 1.0
1863+
}
1864+
scale {
1865+
x: 1.0
1866+
y: 1.0
1867+
z: 1.0
1868+
w: 1.0
1869+
}
1870+
size {
1871+
x: 200.0
1872+
y: 49.0
1873+
z: 0.0
1874+
w: 1.0
1875+
}
1876+
color {
1877+
x: 1.0
1878+
y: 1.0
1879+
z: 1.0
1880+
w: 1.0
1881+
}
1882+
type: TYPE_BOX
1883+
blend_mode: BLEND_MODE_ALPHA
1884+
texture: "examples/blue_button07"
1885+
id: "logger/button"
1886+
xanchor: XANCHOR_NONE
1887+
yanchor: YANCHOR_NONE
1888+
pivot: PIVOT_CENTER
1889+
adjust_mode: ADJUST_MODE_FIT
1890+
parent: "logger"
1891+
layer: "below"
1892+
inherit_alpha: true
1893+
slice9 {
1894+
x: 6.0
1895+
y: 6.0
1896+
z: 6.0
1897+
w: 9.0
1898+
}
1899+
clipping_mode: CLIPPING_MODE_NONE
1900+
clipping_visible: true
1901+
clipping_inverted: false
1902+
alpha: 1.0
1903+
template_node_child: true
1904+
size_mode: SIZE_MODE_MANUAL
1905+
}
1906+
nodes {
1907+
position {
1908+
x: 0.0
1909+
y: 0.0
1910+
z: 0.0
1911+
w: 1.0
1912+
}
1913+
rotation {
1914+
x: 0.0
1915+
y: 0.0
1916+
z: 0.0
1917+
w: 1.0
1918+
}
1919+
scale {
1920+
x: 1.0
1921+
y: 1.0
1922+
z: 1.0
1923+
w: 1.0
1924+
}
1925+
size {
1926+
x: 188.0
1927+
y: 38.0
1928+
z: 0.0
1929+
w: 1.0
1930+
}
1931+
color {
1932+
x: 1.0
1933+
y: 1.0
1934+
z: 1.0
1935+
w: 1.0
1936+
}
1937+
type: TYPE_TEXT
1938+
blend_mode: BLEND_MODE_ALPHA
1939+
text: "LOGGER"
1940+
font: "kenpixel15"
1941+
id: "logger/label"
1942+
xanchor: XANCHOR_NONE
1943+
yanchor: YANCHOR_NONE
1944+
pivot: PIVOT_CENTER
1945+
outline {
1946+
x: 1.0
1947+
y: 1.0
1948+
z: 1.0
1949+
w: 1.0
1950+
}
1951+
shadow {
1952+
x: 1.0
1953+
y: 1.0
1954+
z: 1.0
1955+
w: 1.0
1956+
}
1957+
adjust_mode: ADJUST_MODE_FIT
1958+
line_break: false
1959+
parent: "logger/button"
1960+
layer: "text"
1961+
inherit_alpha: true
1962+
alpha: 1.0
1963+
outline_alpha: 1.0
1964+
shadow_alpha: 1.0
1965+
overridden_fields: 8
1966+
template_node_child: true
1967+
text_leading: 1.0
1968+
text_tracking: 0.0
1969+
}
18111970
nodes {
18121971
position {
18131972
x: 118.0

examples/examples.gui_script

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function init(self)
2525

2626
local examples = {
2727
"bezier", "broadcast", "dynamic", "flow", "gesture", "kinematic", "listener",
28-
"platformer", "ray_cast", "savefile", "savetable",
28+
"platformer", "ray_cast", "savefile", "savetable", "logger"
2929
}
3030

3131
for _,example in ipairs(examples) do

examples/logger/logger.collection

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: "logger"
2+
scale_along_z: 0
3+
embedded_instances {
4+
id: "go"
5+
data: "components {\n"
6+
" id: \"logger\"\n"
7+
" component: \"/examples/logger/logger.gui\"\n"
8+
" position {\n"
9+
" x: 0.0\n"
10+
" y: 0.0\n"
11+
" z: 0.0\n"
12+
" }\n"
13+
" rotation {\n"
14+
" x: 0.0\n"
15+
" y: 0.0\n"
16+
" z: 0.0\n"
17+
" w: 1.0\n"
18+
" }\n"
19+
"}\n"
20+
"components {\n"
21+
" id: \"logger1\"\n"
22+
" component: \"/examples/logger/logger.script\"\n"
23+
" position {\n"
24+
" x: 0.0\n"
25+
" y: 0.0\n"
26+
" z: 0.0\n"
27+
" }\n"
28+
" rotation {\n"
29+
" x: 0.0\n"
30+
" y: 0.0\n"
31+
" z: 0.0\n"
32+
" w: 1.0\n"
33+
" }\n"
34+
"}\n"
35+
""
36+
position {
37+
x: 0.0
38+
y: 0.0
39+
z: 0.0
40+
}
41+
rotation {
42+
x: 0.0
43+
y: 0.0
44+
z: 0.0
45+
w: 1.0
46+
}
47+
scale3 {
48+
x: 1.0
49+
y: 1.0
50+
z: 1.0
51+
}
52+
}

0 commit comments

Comments
 (0)