()
| 2901 | } |
| 2902 | |
| 2903 | func (row *ContainerRow) Draw() { |
| 2904 | |
| 2905 | if row.AlternateBGColor { |
| 2906 | |
| 2907 | if row.alternateBGColorFlag { |
| 2908 | globals.Renderer.SetDrawColor(getThemeColor(GUIMenuColor).RGBA()) |
| 2909 | } else { |
| 2910 | globals.Renderer.SetDrawColor(getThemeColor(GUIMenuColor).Add(20).RGBA()) |
| 2911 | } |
| 2912 | |
| 2913 | if row.Container.WorldSpace { |
| 2914 | globals.Renderer.RenderFillRect(globals.Project.Camera.TranslateRect(row.rect)) |
| 2915 | } else { |
| 2916 | globals.Renderer.RenderFillRect(row.rect) |
| 2917 | } |
| 2918 | |
| 2919 | } |
| 2920 | |
| 2921 | for _, element := range row.Elements { |
| 2922 | rect := element.Rectangle() |
| 2923 | |
| 2924 | if rect.X+rect.H < row.Container.Rect.X || rect.Y+rect.H < row.Container.Rect.Y || rect.X >= row.Container.Rect.X+row.Container.Rect.W || rect.Y >= row.Container.Rect.Y+row.Container.Rect.H { |
| 2925 | continue |
| 2926 | } |
| 2927 | |
| 2928 | element.Draw() |
| 2929 | |
| 2930 | } |
| 2931 | |
| 2932 | // if len(row.Tooltip) > 0 { |
| 2933 | |
| 2934 | // if globals.Mouse.RawPosition().Inside(row.rect) { |
| 2935 | // DrawTooltip(Point{row.rect.X - 32, row.rect.Y - 32}, row.Tooltip) |
| 2936 | // } |
| 2937 | |
| 2938 | // } |
| 2939 | |
| 2940 | } |
| 2941 | |
| 2942 | func (row *ContainerRow) FindElement(name string, wild bool) MenuElement { |
| 2943 |
nothing calls this directly
no test coverage detected