RK7
[
r_keeper 7|file:///D:\profile\Documents%D0%9A%D0%B8%D1%80%D0%B8%D0%BB%D0%BB%D0%A2%D0%B5%D1%85%D0%BD%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%B0%D1%8F%20%D0%B4%D0%BE%D0%BA%D1%83%D0%BC%D0%B5%D0%BD%D1%82%D0%B0%D1%86%D0%B8%D1%8F.html]
*
A script to add a colored dish to the order
When ordering a dish marked with a colored button, the script adds this dish to the order with the same color.
Code Block | ||
---|---|---|
| ||
procedure CheckViewOnGetColors(Sender: TObject; CheckItem: TObject; Selected: boolean; var Color, FontColor: TColor); |
...
begin |
...
if SYS.ObjectInheritsFrom(CheckItem, 'TDish') then begin |
...
if (TDish(CheckItem).State = disOpened) then |
...
if not Selected then |
...
begin |
...
Color := Trk7menuitem(TDish(CheckItem).RefItem).VisualType_BColor; |
...
FontColor := Trk7menuitem(TDish(CheckItem).RefItem).VisualType_TextColor; |
...
end |
...
else |
...
begin |
...
Color := clBlack; |
...
FontColor := clWhite; |
...
// Color := Trk7menuitem(TDish(CheckItem).RefItem).VisualType_TextColor; |
...
// FontColor := Trk7menuitem(TDish(CheckItem).RefItem).VisualType_BColor; |
...
end; |
...
end; |
...
end; |