| 111 | } |
| 112 | |
| 113 | void Paint(surface_t* surface){ |
| 114 | surface_t* iconS = nullptr; |
| 115 | switch(icon){ |
| 116 | case 1: |
| 117 | iconS = &FileView::diskIconSml; |
| 118 | break; |
| 119 | case 2: |
| 120 | iconS = &FileView::diskIconSml;//ramIcon; |
| 121 | break; |
| 122 | default: |
| 123 | iconS = &FileView::folderIconSml; |
| 124 | break; |
| 125 | } |
| 126 | |
| 127 | if(iconS && iconS->buffer) |
| 128 | Graphics::surfacecpyTransparent(surface, iconS, bounds.pos + (vector2i_t){2, 2}); |
| 129 | |
| 130 | Graphics::DrawString(label.c_str(), bounds.pos.x + 20, bounds.pos.y + bounds.size.y / 2 - 8, colours[Colour::Text], surface); |
| 131 | } |
| 132 | }; |
| 133 | |
| 134 | void OnFileButtonPress(Button* b){ |
nothing calls this directly
no test coverage detected