3 class EngineSettings : Window
5 text = "ECERE 3D Engine Settings";
9 font = { "Tahoma", 10 };
13 Resolution resolution;
14 PixelFormat colorDepth;
19 Picture ecereLogo { this, image = BitmapResource { ":ecere.png", alphaBlend = true }, anchor = { left = 30, top = 10 } };
24 this, text = "3D API", hotKey = d, size = { 112, 24 }, anchor = { horz = 204, top = 40 };
26 bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
28 driver = (char *)row.tag;
32 Label { this, labeledWindow = driverBox, anchor = { horz = 204, top = 16 } };
37 this, text = "Resolution", hotKey = r, size = { 112, 24 }, anchor = { horz = 204, top = 96 }, disabled = !fullScreen;
39 bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
41 resolution = (Resolution)row.tag;
45 Label { this, labeledWindow = resBox, anchor = { horz = 205, top = 72 } };
50 this, text = "Color Depth", hotKey = c, size = { 112, 24 }, anchor = { horz = 204, top = 152 }, disabled = !fullScreen;
52 bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
54 colorDepth = (PixelFormat)row.tag;
58 Label { this, labeledWindow = bppBox, anchor = { horz = 208, top = 128 } };
63 this, text = "Refresh Rate", hotKey = t, size = { 112, 24 }, anchor = { horz = 204, top = 208 }, disabled = !fullScreen;
65 bool NotifySelect(DropBox dropBox, DataRow row, Modifiers mods)
67 refreshRate = (int)row.tag;
71 Label { labeledWindow = refBox, parent = this, anchor = { horz = 204, top = 184 } };
74 this, isCheckbox = true, text = "Full Screen", hotKey = f, anchor = { horz = 203, top = 248 }, checked = fullScreen;
76 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
78 fullScreen = button.checked;
79 resBox.disabled = !fullScreen;
80 refBox.disabled = !fullScreen;
81 bppBox.disabled = !fullScreen;
88 this, text = "Exit", size = { 80, 24 }, anchor = { horz = 69, top = 168 }, NotifyClicked = ButtonCloseDialog;
92 this, text = "Start", isDefault = true, size = { 80, 24 }, anchor = { horz = 69, top = 96 };
94 bool NotifyClicked(Button button, int x, int y, Modifiers mods)
97 ((GuiApplication)__thisModule).SwitchMode(fullScreen, driver, resolution, colorDepth, refreshRate, null, true);
104 driverBox.AddString("OpenGL").tag = (int64)"OpenGL";
105 driverBox.AddString("Direct3D 9").tag = (int64)"Direct3D";
106 driverBox.AddString("Direct3D 8").tag = (int64)"Direct3D8";
107 driverBox.currentRow = driverBox.firstRow;
109 resBox.AddString("Current");
110 resBox.AddString("640x480").tag = Resolution::res640x480;
111 resBox.AddString("800x600").tag = Resolution::res800x600;
112 resBox.AddString("1024x768").tag = Resolution::res1024x768;
113 resBox.AddString("1280x1024").tag = Resolution::res1280x1024;
114 resBox.AddString("1600x1200").tag = Resolution::res1600x1200;
115 resBox.currentRow = resBox.FindRow(resolution);
117 bppBox.AddString("Current");
118 bppBox.AddString("16 bpp").tag = PixelFormat::pixelFormat565;
119 bppBox.AddString("24 bpp").tag = PixelFormat::pixelFormat888;
120 bppBox.currentRow = bppBox.FindRow(colorDepth);
122 refBox.AddString("Current");
123 refBox.AddString("60 Hz").tag = 60;
124 refBox.AddString("75 Hz").tag = 75;
125 refBox.AddString("85 Hz").tag = 85;
126 refBox.AddString("100 Hz").tag = 100;
127 refBox.AddString("120 Hz").tag = 120;
128 refBox.currentRow = refBox.FindRow(refreshRate);