-
Notifications
You must be signed in to change notification settings - Fork 0
/
zinc_CreateWindow.go
executable file
·125 lines (104 loc) · 2.92 KB
/
zinc_CreateWindow.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
// Package zinckit ...
// Generated by the zinc tool. DO NOT EDIT!
// Source: zinc_CreateWindow
package zinckit
import (
"github.com/SirMetathyst/zinc"
)
// CreateWindowKey ...
const CreateWindowKey uint = 2363924133
// CreateWindowData ...
type CreateWindowData struct {
Title string
}
// CreateWindowComponent ...
type CreateWindowComponent struct {
ctx zinc.CTX
data map[zinc.EntityID]CreateWindowData
}
// NewCreateWindowComponent ...
func NewCreateWindowComponent() *CreateWindowComponent {
return &CreateWindowComponent{
data: make(map[zinc.EntityID]CreateWindowData),
}
}
// SetContext ...
func (c *CreateWindowComponent) SetContext(ctx zinc.CTX) {
if c.ctx == nil {
c.ctx = ctx
}
}
func init() {
x := NewCreateWindowComponent()
ctx := zinc.Default().RegisterComponent(CreateWindowKey, x)
x.SetContext(ctx)
}
// DeleteEntity ...
func (c *CreateWindowComponent) DeleteEntity(id zinc.EntityID) {
delete(c.data, id)
}
// HasEntity ...
func (c *CreateWindowComponent) HasEntity(id zinc.EntityID) bool {
_, ok := c.data[id]
return ok
}
// SetCreateWindow ...
func (c *CreateWindowComponent) SetCreateWindow(id zinc.EntityID, createwindow CreateWindowData) {
if c.ctx.HasEntity(id) {
if c.HasEntity(id) {
c.data[id] = createwindow
c.ctx.ComponentUpdated(CreateWindowKey, id)
} else {
c.data[id] = createwindow
c.ctx.ComponentAdded(CreateWindowKey, id)
}
}
}
// CreateWindow ...
func (c *CreateWindowComponent) CreateWindow(id zinc.EntityID) CreateWindowData {
return c.data[id]
}
// DeleteCreateWindow ...
func (c *CreateWindowComponent) DeleteCreateWindow(id zinc.EntityID) {
delete(c.data, id)
c.ctx.ComponentDeleted(CreateWindowKey, id)
}
// SetCreateWindowX ...
func SetCreateWindowX(e *zinc.EntityManager, id zinc.EntityID, createwindow CreateWindowData) {
v, _ := e.Component(CreateWindowKey)
c := v.(*CreateWindowComponent)
c.SetCreateWindow(id, createwindow)
}
// SetCreateWindow ...
func SetCreateWindow(id zinc.EntityID, createwindow CreateWindowData) {
SetCreateWindowX(zinc.Default(), id, createwindow)
}
// CreateWindowX ...
func CreateWindowX(e *zinc.EntityManager, id zinc.EntityID) CreateWindowData {
v, _ := e.Component(CreateWindowKey)
c := v.(*CreateWindowComponent)
return c.CreateWindow(id)
}
// CreateWindow ...
func CreateWindow(id zinc.EntityID) CreateWindowData {
return CreateWindowX(zinc.Default(), id)
}
// DeleteCreateWindowX ...
func DeleteCreateWindowX(e *zinc.EntityManager, id zinc.EntityID) {
v, _ := e.Component(CreateWindowKey)
c := v.(*CreateWindowComponent)
c.DeleteCreateWindow(id)
}
// DeleteCreateWindow ...
func DeleteCreateWindow(id zinc.EntityID) {
DeleteCreateWindowX(zinc.Default(), id)
}
// HasCreateWindowX ...
func HasCreateWindowX(e *zinc.EntityManager, id zinc.EntityID) bool {
v, _ := e.Component(CreateWindowKey)
return v.HasEntity(id)
}
// HasCreateWindow ...
func HasCreateWindow(id zinc.EntityID) bool {
return HasCreateWindowX(zinc.Default(), id)
}