- [NEW] [ui] incoffset() i panel()
- [NEW] mòdul ay_viewer - [NEW] [ay-3-8912] afegits mètodes de debug - [FIX] [ay-3-8912]Arreglats uns quants tipus de dades - [FIX] [ay-3-8912]Arreglat el càlcul de la frequència (en realitat amplitud) dels tonos - [FIX] [ay-3-8912] Arreglat el algoritme de càlcul del roido
This commit is contained in:
17
ui.cpp
17
ui.cpp
@@ -51,6 +51,23 @@ namespace ui
|
||||
offset_y = y;
|
||||
}
|
||||
|
||||
void incoffset(uint8_t x, uint8_t y)
|
||||
{
|
||||
offset_x += x;
|
||||
offset_y += y;
|
||||
}
|
||||
|
||||
void panel(int x, int y, int w, int h, const char *title)
|
||||
{
|
||||
ui::setoffset(x, y);
|
||||
|
||||
ui::box(0,0,w,h,COLOR_WHITE);
|
||||
ui::printrect(2,0, strlen(title)+2,1, COLOR_DARK);
|
||||
ui::printtxt(3,0, title, COLOR_WHITE);
|
||||
|
||||
ui::incoffset(1, 1);
|
||||
}
|
||||
|
||||
void box(int x, int y, int w, int h, uint8_t color)
|
||||
{
|
||||
SDL_Rect rect {((offset_x+x)*CHR_W)+3, ((offset_y+y)*CHR_H)+6, w*CHR_W-6, h*CHR_H-13};
|
||||
|
||||
Reference in New Issue
Block a user