@@ -91,7 +91,7 @@ pub fn (nw &NativeWidgets) update_checkbox(nwidget &NativeWidget, x int, y int,
9191}
9292
9393pub fn (mut nw NativeWidgets) create_radio_group (x int , y int , w int , h int , values []string , selected int , title string ) NativeWidget {
94- mut ptrs := []& char{len: values.len}
94+ mut ptrs := unsafe { []& char{len: values.len} }
9595 for i, v in values {
9696 ptrs[i] = & char (v.str)
9797 }
@@ -170,7 +170,7 @@ pub fn (nw &NativeWidgets) update_slider(nwidget &NativeWidget, x int, y int, w
170170}
171171
172172pub fn (mut nw NativeWidgets) create_dropdown (x int , y int , w int , h int , items []string , selected int ) NativeWidget {
173- mut ptrs := []& char{len: items.len}
173+ mut ptrs := unsafe { []& char{len: items.len} }
174174 for i, v in items {
175175 ptrs[i] = & char (v.str)
176176 }
@@ -186,7 +186,7 @@ pub fn (nw &NativeWidgets) update_dropdown(nwidget &NativeWidget, x int, y int,
186186}
187187
188188pub fn (mut nw NativeWidgets) create_listbox (x int , y int , w int , h int , items []string , selected int ) NativeWidget {
189- mut ptrs := []& char{len: items.len}
189+ mut ptrs := unsafe { []& char{len: items.len} }
190190 for i, v in items {
191191 ptrs[i] = & char (v.str)
192192 }
@@ -224,7 +224,7 @@ pub fn (nw &NativeWidgets) update_picture(nwidget &NativeWidget, x int, y int, w
224224}
225225
226226pub fn (mut nw NativeWidgets) create_menu (x int , y int , w int , h int , items []string ) NativeWidget {
227- mut ptrs := []& char{len: items.len}
227+ mut ptrs := unsafe { []& char{len: items.len} }
228228 for i, v in items {
229229 ptrs[i] = & char (v.str)
230230 }
0 commit comments