Skip to content

Commit 346edd8

Browse files
committed
improved looks a bit... still terribad. getting there. but works.
1 parent 744b152 commit 346edd8

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

config.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class IniEditor {
6161
return;
6262
}
6363

64-
font = TTF_OpenFont("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 16);
64+
font = TTF_OpenFont("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", 12);
6565
if (!font) {
6666
std::cerr << "TTF_OpenFont failed: " << TTF_GetError() << std::endl;
6767
SDL_DestroyRenderer(renderer);
@@ -269,14 +269,14 @@ class IniEditor {
269269
}
270270

271271
// Save button
272-
SDL_Rect saveBtn = {10, 360, 80, 30};
272+
SDL_Rect saveBtn = {10, 360, 55, 25};
273273
if (mouseX >= saveBtn.x && mouseX <= saveBtn.x + saveBtn.w &&
274274
mouseY >= saveBtn.y && mouseY <= saveBtn.y + saveBtn.h) {
275275
saveIniFile("config.ini");
276276
}
277277

278278
// Exit button
279-
SDL_Rect exitBtn = {100, 360, 80, 30};
279+
SDL_Rect exitBtn = {75, 360, 55, 25};
280280
if (mouseX >= exitBtn.x && mouseX <= exitBtn.x + exitBtn.w &&
281281
mouseY >= exitBtn.y && mouseY <= exitBtn.y + exitBtn.h) {
282282
running = false;
@@ -340,7 +340,7 @@ class IniEditor {
340340
for (size_t i = 0; i < sections.size(); ++i) {
341341
if (static_cast<int>(i) == dropdownHoverIndex) {
342342
SDL_Rect highlight = {10, y, 190, 20};
343-
SDL_SetRenderDrawColor(renderer, 200, 200, 255, 255);
343+
SDL_SetRenderDrawColor(renderer, 200, 200, 200, 255);
344344
SDL_RenderFillRect(renderer, &highlight);
345345
}
346346
renderText(sections[i], 15, y);
@@ -359,7 +359,7 @@ class IniEditor {
359359
renderText(key, 10, y - scrollOffset);
360360
if (key == activeField) {
361361
SDL_Rect fieldRect = {150, y - scrollOffset, 300, 20};
362-
SDL_SetRenderDrawColor(renderer, 220, 220, 220, 255);
362+
SDL_SetRenderDrawColor(renderer, 200, 200, 200, 255);
363363
SDL_RenderFillRect(renderer, &fieldRect);
364364
}
365365
renderText(value, 150, y - scrollOffset);
@@ -369,13 +369,13 @@ class IniEditor {
369369
}
370370

371371
// Render Save/Exit buttons
372-
SDL_Rect saveBtn = {10, 360, 80, 30};
373-
SDL_Rect exitBtn = {100, 360, 80, 30};
372+
SDL_Rect saveBtn = {10, 360, 55, 25};
373+
SDL_Rect exitBtn = {75, 360, 55, 25};
374374
SDL_SetRenderDrawColor(renderer, 200, 200, 200, 255);
375375
SDL_RenderFillRect(renderer, &saveBtn);
376376
SDL_RenderFillRect(renderer, &exitBtn);
377377
renderText("Save", 20, 365);
378-
renderText("Exit", 110, 365);
378+
renderText("Exit", 90, 365);
379379

380380
// Render tooltip
381381
if (!tooltipKey.empty() && explanations.count(tooltipKey)) {

config.ini

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
11
[VPX]
22
;These must be absolute paths to the tables folder and vpx executable.
3-
TablesPath=/home/tarso/Games/vpinball/build/tables/
4-
ExecutableCmd=/home/tarso/Games/vpinball/build/VPinballX_GL
3+
TablesPath = /home/tarso/Games/vpinball/build/tables/
4+
ExecutableCmd = /home/tarso/Games/vpinball/build/VPinballX_GL
55

66
;Use Args if you need extra settings, the cmdline form as below:
77
;StartArgs ExecutableCmd -play TablesPath/<selectedtable>.vpx EndArgs
8-
StartArgs=DRI_PRIME=1 gamemoderun
9-
EndArgs=
8+
StartArgs =
9+
EndArgs =
1010

1111
[CustomMedia]
1212
;These are relative to the table folder.
1313
;So /path/to/<allmytables>/<mytable1>/ 'images/|video/'
1414
;Priority is: custom video/ -> custom images/ -> [default video -> default image.](/img/)
1515

1616
;Images can be PNG or JPG, Videos MP4
17-
TableImage=images/table.png
18-
BackglassImage=images/backglass.png
19-
WheelImage=images/wheel.png
17+
TableImage = images/table.png
18+
BackglassImage = images/backglass.png
19+
WheelImage = images/wheel.png
2020
;If you want a marquee where the dmd lies, use this file and no dmd video file present.
2121
;Note that if the field is left empty it will use a default value.(video/dmd.mp4)
22-
DmdImage=images/marquee.png
22+
DmdImage = images/marquee.png
2323

2424
;Videos will take priority over images if both found.
25-
TableVideo=video/table.mp4
26-
BackglassVideo=video/backglass.mp4
27-
DmdVideo=video/dmd.mp4
25+
TableVideo = video/table.mp4
26+
BackglassVideo = video/backglass.mp4
27+
DmdVideo = video/dmd.mp4
2828

2929
[WindowSettings]
3030
;These are not the resolution of the monitor per se, but usually they are.
3131
;These are the window sizes to be created, so you can have 2 windows
3232
;on the same monitor, for example. Best if it's a match with vpx settings.
3333

3434
;The main monitor is the table playfield window
35-
MainMonitor=1
36-
MainWidth=1080
37-
MainHeight=1920
35+
MainMonitor = 1
36+
MainWidth = 1080
37+
MainHeight = 1920
3838
;The secondary monitor is the backglass + dmd window
39-
SecondMonitor=0
40-
SecondWidth=1024
41-
SecondHeight=1024
39+
SecondMonitor = 0
40+
SecondWidth = 1024
41+
SecondHeight = 1024
4242

4343
[Font]
44-
Path=/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
45-
Size=28
44+
Path = /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf
45+
Size = 28
4646

4747
[MediaDimensions]
4848
;Media will be scaled to these sizes, so try to keep your art close to that resolution.
4949

50-
WheelImageSize=350
51-
WheelImageMargin=24
50+
WheelImageSize = 350
51+
WheelImageMargin = 24
5252
;Note that the backglass + dmd media size must not be over the secondary window area.
5353
;So a 1024x1024 window can support a 1024x768 backglass with a 1024x256 dmd under it.
54-
BackglassWidth=1024
55-
BackglassHeight=768
56-
DmdWidth=1024
57-
DmdHeight=256
54+
BackglassWidth = 1024
55+
BackglassHeight = 768
56+
DmdWidth = 1024
57+
DmdHeight = 256

0 commit comments

Comments
 (0)