【修改按钮带灯属性名称】
This commit is contained in:
parent
a65799ed77
commit
30c4210a5d
@ -32,7 +32,7 @@ func NewButtonEntity(w ecs.World, data *repository.Button, entityMap map[string]
|
||||
entry = w.Entry(w.Create(component.ButtonTag, btnType, component.UidType, component.BitStateType))
|
||||
component.UidType.SetValue(entry, component.Uid{Id: uid})
|
||||
// 带灯按钮
|
||||
if data.Light() {
|
||||
if data.HasLight() {
|
||||
entry.AddComponent(component.SingleLightType, unsafe.Pointer(NewLightHEntity(w)))
|
||||
}
|
||||
entityMap[uid] = entry
|
||||
|
@ -200,7 +200,7 @@ message Button {
|
||||
string id = 1;
|
||||
string code = 2;
|
||||
ButtonType buttonType = 3;
|
||||
bool haveLight = 4;
|
||||
bool hasLight = 4;
|
||||
}
|
||||
|
||||
// 灯
|
||||
|
@ -73,7 +73,7 @@ type Button struct {
|
||||
Identity
|
||||
code string
|
||||
buttonType proto.Button_ButtonType
|
||||
light bool
|
||||
hasLight bool
|
||||
}
|
||||
|
||||
func NewButton(id string, code string, buttonType proto.Button_ButtonType) *Button {
|
||||
@ -93,11 +93,11 @@ func (btn *Button) GetBtnType() proto.Button_ButtonType {
|
||||
}
|
||||
|
||||
func (btn *Button) SetLight() {
|
||||
btn.light = true
|
||||
btn.hasLight = true
|
||||
}
|
||||
|
||||
func (btn *Button) Light() bool {
|
||||
return btn.light
|
||||
func (btn *Button) HasLight() bool {
|
||||
return btn.hasLight
|
||||
}
|
||||
|
||||
// 报警器
|
||||
|
@ -1646,7 +1646,7 @@ type Button struct {
|
||||
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
|
||||
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
|
||||
ButtonType Button_ButtonType `protobuf:"varint,3,opt,name=buttonType,proto3,enum=model.Button_ButtonType" json:"buttonType,omitempty"`
|
||||
HaveLight bool `protobuf:"varint,4,opt,name=haveLight,proto3" json:"haveLight,omitempty"`
|
||||
HasLight bool `protobuf:"varint,4,opt,name=hasLight,proto3" json:"hasLight,omitempty"`
|
||||
}
|
||||
|
||||
func (x *Button) Reset() {
|
||||
@ -1702,9 +1702,9 @@ func (x *Button) GetButtonType() Button_ButtonType {
|
||||
return Button_Unknown
|
||||
}
|
||||
|
||||
func (x *Button) GetHaveLight() bool {
|
||||
func (x *Button) GetHasLight() bool {
|
||||
if x != nil {
|
||||
return x.HaveLight
|
||||
return x.HasLight
|
||||
}
|
||||
return false
|
||||
}
|
||||
@ -2262,101 +2262,101 @@ var file_model_proto_rawDesc = []byte{
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x12, 0x22, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x49, 0x64,
|
||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
|
||||
0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xf1, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
|
||||
0x6e, 0x74, 0x49, 0x64, 0x73, 0x22, 0xef, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e,
|
||||
0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
|
||||
0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79,
|
||||
0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79,
|
||||
0x70, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1c,
|
||||
0x0a, 0x09, 0x68, 0x61, 0x76, 0x65, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x08, 0x52, 0x09, 0x68, 0x61, 0x76, 0x65, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6b, 0x0a, 0x0a,
|
||||
0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e,
|
||||
0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x65,
|
||||
0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e,
|
||||
0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b,
|
||||
0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a,
|
||||
0x08, 0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b,
|
||||
0x65, 0x79, 0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x22, 0x97, 0x01, 0x0a, 0x05, 0x4c, 0x69,
|
||||
0x67, 0x68, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63,
|
||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e,
|
||||
0x4c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63,
|
||||
0x74, 0x52, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x38, 0x0a, 0x0b, 0x4c, 0x69, 0x67,
|
||||
0x68, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x4c, 0x10, 0x00, 0x12,
|
||||
0x05, 0x0a, 0x01, 0x48, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, 0x10, 0x02, 0x12, 0x06, 0x0a,
|
||||
0x02, 0x48, 0x55, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01,
|
||||
0x41, 0x10, 0x05, 0x22, 0x2b, 0x0a, 0x05, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x22, 0x6f, 0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63,
|
||||
0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12,
|
||||
0x40, 0x0a, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70,
|
||||
0x52, 0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75,
|
||||
0x70, 0x22, 0x61, 0x0a, 0x0f, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47,
|
||||
0x72, 0x6f, 0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70,
|
||||
0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d,
|
||||
0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43,
|
||||
0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e,
|
||||
0x65, 0x6e, 0x74, 0x73, 0x22, 0x58, 0x0a, 0x13, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e,
|
||||
0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0a, 0x64,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
|
||||
0x11, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x74,
|
||||
0x0a, 0x03, 0x4d, 0x6b, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x5d, 0x0a, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f,
|
||||
0x70, 0x65, 0x52, 0x0a, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a,
|
||||
0x0a, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x08, 0x68, 0x61, 0x73, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x22, 0x6b, 0x0a, 0x0a, 0x42, 0x75,
|
||||
0x74, 0x74, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e,
|
||||
0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4e, 0x4f, 0x5f, 0x52, 0x65, 0x73, 0x65,
|
||||
0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4e, 0x4f, 0x5f,
|
||||
0x52, 0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65,
|
||||
0x73, 0x65, 0x74, 0x5f, 0x50, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52,
|
||||
0x65, 0x73, 0x65, 0x74, 0x5f, 0x55, 0x70, 0x10, 0x04, 0x12, 0x0c, 0x0a, 0x08, 0x4b, 0x65, 0x79,
|
||||
0x5f, 0x4b, 0x6e, 0x6f, 0x62, 0x10, 0x05, 0x22, 0x97, 0x01, 0x0a, 0x05, 0x4c, 0x69, 0x67, 0x68,
|
||||
0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
|
||||
0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x18,
|
||||
0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x4c, 0x69,
|
||||
0x67, 0x68, 0x74, 0x2e, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x52,
|
||||
0x06, 0x61, 0x73, 0x70, 0x65, 0x63, 0x74, 0x22, 0x38, 0x0a, 0x0b, 0x4c, 0x69, 0x67, 0x68, 0x74,
|
||||
0x41, 0x73, 0x70, 0x65, 0x63, 0x74, 0x12, 0x05, 0x0a, 0x01, 0x4c, 0x10, 0x00, 0x12, 0x05, 0x0a,
|
||||
0x01, 0x48, 0x10, 0x01, 0x12, 0x05, 0x0a, 0x01, 0x55, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, 0x48,
|
||||
0x55, 0x10, 0x03, 0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x04, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10,
|
||||
0x05, 0x22, 0x2b, 0x0a, 0x05, 0x41, 0x6c, 0x61, 0x72, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x22, 0x6f,
|
||||
0x0a, 0x07, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x40, 0x0a,
|
||||
0x0f, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70,
|
||||
0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0f,
|
||||
0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22,
|
||||
0x61, 0x0a, 0x0f, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x47, 0x72, 0x6f,
|
||||
0x75, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e,
|
||||
0x65, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6f, 0x64,
|
||||
0x65, 0x6c, 0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d,
|
||||
0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e,
|
||||
0x74, 0x73, 0x22, 0x58, 0x0a, 0x13, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63,
|
||||
0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x0a, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e,
|
||||
0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x74, 0x0a, 0x03,
|
||||
0x4d, 0x6b, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x02, 0x69, 0x64, 0x12, 0x5d, 0x0a, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69,
|
||||
0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73,
|
||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2e, 0x45,
|
||||
0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65,
|
||||
0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f,
|
||||
0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75,
|
||||
0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6d, 0x6f, 0x64, 0x65, 0x6c,
|
||||
0x2e, 0x45, 0x6c, 0x65, 0x63, 0x74, 0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f,
|
||||
0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x19, 0x65, 0x6c, 0x65, 0x63, 0x74,
|
||||
0x72, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x47, 0x72,
|
||||
0x6f, 0x75, 0x70, 0x73, 0x2a, 0xd0, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x5f, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63,
|
||||
0x61, 0x6c, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50,
|
||||
0x6f, 0x69, 0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x12, 0x15,
|
||||
0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67,
|
||||
0x6e, 0x61, 0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x10,
|
||||
0x05, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x53, 0x6c, 0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43,
|
||||
0x75, 0x72, 0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x65,
|
||||
0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x08, 0x12,
|
||||
0x17, 0x0a, 0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69,
|
||||
0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x0a, 0x12, 0x24,
|
||||
0x0a, 0x20, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x61,
|
||||
0x73, 0x65, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74,
|
||||
0x6f, 0x72, 0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x5f, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x10,
|
||||
0x0d, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x41, 0x6c, 0x61, 0x72, 0x6d, 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63,
|
||||
0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x73, 0x64, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x44,
|
||||
0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x10, 0x10, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x5f, 0x4d, 0x6b, 0x78, 0x10, 0x11, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12,
|
||||
0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x01,
|
||||
0x12, 0x05, 0x0a, 0x01, 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03, 0x2a, 0x20,
|
||||
0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c,
|
||||
0x45, 0x46, 0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01,
|
||||
0x2a, 0x43, 0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79,
|
||||
0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00,
|
||||
0x12, 0x0f, 0x0a, 0x0b, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10,
|
||||
0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f,
|
||||
0x69, 0x6e, 0x74, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73,
|
||||
0x69, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x70, 0x73, 0x2a, 0xd0, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6c,
|
||||
0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69,
|
||||
0x6e, 0x74, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79,
|
||||
0x70, 0x65, 0x5f, 0x54, 0x75, 0x72, 0x6e, 0x6f, 0x75, 0x74, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x69, 0x67, 0x6e, 0x61,
|
||||
0x6c, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70,
|
||||
0x65, 0x5f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x65, 0x72, 0x10, 0x05, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x6c,
|
||||
0x6f, 0x70, 0x65, 0x10, 0x06, 0x12, 0x21, 0x0a, 0x1d, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x53, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x43, 0x75, 0x72,
|
||||
0x76, 0x61, 0x74, 0x75, 0x72, 0x65, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b, 0x10, 0x08, 0x12, 0x17, 0x0a,
|
||||
0x13, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x6e, 0x6b,
|
||||
0x4e, 0x6f, 0x64, 0x65, 0x10, 0x09, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x54, 0x79, 0x70, 0x65, 0x5f, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x10, 0x0a, 0x12, 0x24, 0x0a, 0x20,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x50, 0x68, 0x61, 0x73, 0x65,
|
||||
0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x6f, 0x72,
|
||||
0x10, 0x0b, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65,
|
||||
0x5f, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x10, 0x0c, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x10, 0x0d, 0x12,
|
||||
0x14, 0x0a, 0x10, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x41, 0x6c,
|
||||
0x61, 0x72, 0x6d, 0x10, 0x0e, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54,
|
||||
0x79, 0x70, 0x65, 0x5f, 0x50, 0x73, 0x64, 0x10, 0x0f, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10,
|
||||
0x10, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x5f,
|
||||
0x4d, 0x6b, 0x78, 0x10, 0x11, 0x2a, 0x25, 0x0a, 0x04, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x01, 0x12, 0x05,
|
||||
0x0a, 0x01, 0x42, 0x10, 0x02, 0x12, 0x05, 0x0a, 0x01, 0x43, 0x10, 0x03, 0x2a, 0x20, 0x0a, 0x09,
|
||||
0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x45, 0x46,
|
||||
0x54, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x49, 0x47, 0x48, 0x54, 0x10, 0x01, 0x2a, 0x43,
|
||||
0x0a, 0x0e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65,
|
||||
0x12, 0x0c, 0x0a, 0x08, 0x42, 0x6f, 0x75, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x10, 0x00, 0x12, 0x0f,
|
||||
0x0a, 0x0b, 0x41, 0x78, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x10, 0x01, 0x12,
|
||||
0x12, 0x0a, 0x0e, 0x49, 0x6e, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x4a, 0x6f, 0x69, 0x6e,
|
||||
0x74, 0x10, 0x02, 0x42, 0x1a, 0x5a, 0x18, 0x2e, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
|
||||
0x6f, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -89,6 +89,9 @@ func buildModels(source *proto.Repository, repository *Repository) {
|
||||
}
|
||||
for _, protoData := range source.Buttons {
|
||||
m := NewButton(protoData.Id, protoData.Code, protoData.ButtonType)
|
||||
if protoData.HasLight {
|
||||
m.HasLight()
|
||||
}
|
||||
repository.buttonMap[m.Id()] = m
|
||||
}
|
||||
for _, protoData := range source.Psds {
|
||||
|
Loading…
Reference in New Issue
Block a user