MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Paint

Method Paint

LibLemon/src/gui/fileview.cpp:113–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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){

Callers

nothing calls this directly

Calls 2

surfacecpyTransparentFunction · 0.85
DrawStringFunction · 0.50

Tested by

no test coverage detected