The NanoVG drawing function. */
| 115 | The NanoVG drawing function. |
| 116 | */ |
| 117 | void onNanoDisplay() override |
| 118 | { |
| 119 | const float lineHeight = 20 * fScale; |
| 120 | float y; |
| 121 | |
| 122 | fontSize(15.0f * fScale); |
| 123 | textLineHeight(lineHeight); |
| 124 | |
| 125 | // --------------------------------------------------------------------------------------- |
| 126 | // File 1 |
| 127 | |
| 128 | y = 45.0f * fScale; |
| 129 | |
| 130 | if (fState[kStateFile1].isNotEmpty()) |
| 131 | { |
| 132 | drawLeft(0.0f, y, "Name:"); |
| 133 | drawRight(0.0f, y, fState[kStateFile1]); |
| 134 | y += lineHeight; |
| 135 | |
| 136 | drawLeft(0.0f, y, "Size:"); |
| 137 | drawRight(0.0f, y, getTextBufFileSize(fParameters[kParameterFileSize1])); |
| 138 | y += lineHeight; |
| 139 | } |
| 140 | else |
| 141 | { |
| 142 | drawLeft(0.0f, y, "No file loaded"); |
| 143 | } |
| 144 | |
| 145 | // --------------------------------------------------------------------------------------- |
| 146 | // File 2 |
| 147 | |
| 148 | y = 145.0f * fScale; |
| 149 | |
| 150 | if (fState[kStateFile2].isNotEmpty()) |
| 151 | { |
| 152 | drawLeft(0.0f, y, "Name:"); |
| 153 | drawRight(0.0f, y, fState[kStateFile2]); |
| 154 | y += lineHeight; |
| 155 | |
| 156 | drawLeft(0.0f, y, "Size:"); |
| 157 | drawRight(0.0f, y, getTextBufFileSize(fParameters[kParameterFileSize2])); |
| 158 | y += lineHeight; |
| 159 | } |
| 160 | else |
| 161 | { |
| 162 | drawLeft(0.0f, y, "No file loaded"); |
| 163 | } |
| 164 | |
| 165 | // --------------------------------------------------------------------------------------- |
| 166 | // File 3 |
| 167 | |
| 168 | y = 245.0f * fScale; |
| 169 | |
| 170 | if (fState[kStateFile3].isNotEmpty()) |
| 171 | { |
| 172 | drawLeft(0.0f, y, "Name:"); |
| 173 | drawRight(0.0f, y, fState[kStateFile3]); |
| 174 | y += lineHeight; |
nothing calls this directly
no test coverage detected