mirror of https://github.com/buggins/dlangui.git
fixed examples including missing import std.conv; fixed deprecation warnings in examples
This commit is contained in:
parent
c288a3f674
commit
96a251ab02
|
@ -13,8 +13,7 @@ import dlangui.graphics.scene.objimport;
|
||||||
import dlangui.graphics.scene.fbximport;
|
import dlangui.graphics.scene.fbximport;
|
||||||
import dlangui.graphics.glsupport;
|
import dlangui.graphics.glsupport;
|
||||||
import dlangui.graphics.gldrawbuf;
|
import dlangui.graphics.gldrawbuf;
|
||||||
import derelict.opengl3.gl3;
|
import derelict.opengl.gl;
|
||||||
import derelict.opengl3.gl;
|
|
||||||
|
|
||||||
mixin APP_ENTRY_POINT;
|
mixin APP_ENTRY_POINT;
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,8 @@ class SheetEditControl : HorizontalLayout {
|
||||||
}
|
}
|
||||||
|
|
||||||
class SpreadSheetView : StringGridWidget {
|
class SpreadSheetView : StringGridWidget {
|
||||||
|
import std.conv: to;
|
||||||
|
|
||||||
this(string ID = null) {
|
this(string ID = null) {
|
||||||
super(ID);
|
super(ID);
|
||||||
layoutWidth = FILL_PARENT;
|
layoutWidth = FILL_PARENT;
|
||||||
|
|
|
@ -130,15 +130,15 @@ class EditFrame : AppFrame {
|
||||||
window.close();
|
window.close();
|
||||||
return true;
|
return true;
|
||||||
case IDEActions.HelpAbout:
|
case IDEActions.HelpAbout:
|
||||||
window.showMessageBox(UIString("About DlangUI ML Editor"d),
|
window.showMessageBox(UIString.fromRaw("About DlangUI ML Editor"d),
|
||||||
UIString("DLangIDE\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple editor for DML code"d));
|
UIString.fromRaw("DLangIDE\n(C) Vadim Lopatin, 2015\nhttp://github.com/buggins/dlangui\nSimple editor for DML code"d));
|
||||||
return true;
|
return true;
|
||||||
case IDEActions.FileNew:
|
case IDEActions.FileNew:
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Create new DML file"d;
|
caption = "Create new DML file"d;
|
||||||
FileDialog dlg = createFileDialog(caption, false);
|
FileDialog dlg = createFileDialog(caption, false);
|
||||||
dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml"));
|
||||||
dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*"));
|
||||||
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
||||||
if (result.id == ACTION_OPEN.id) {
|
if (result.id == ACTION_OPEN.id) {
|
||||||
string filename = result.stringParam;
|
string filename = result.stringParam;
|
||||||
|
@ -156,8 +156,8 @@ class EditFrame : AppFrame {
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Save DML File as"d;
|
caption = "Save DML File as"d;
|
||||||
FileDialog dlg = createFileDialog(caption, false);
|
FileDialog dlg = createFileDialog(caption, false);
|
||||||
dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml"));
|
||||||
dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*"));
|
||||||
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
||||||
if (result.id == ACTION_OPEN.id) {
|
if (result.id == ACTION_OPEN.id) {
|
||||||
string filename = result.stringParam;
|
string filename = result.stringParam;
|
||||||
|
@ -170,8 +170,8 @@ class EditFrame : AppFrame {
|
||||||
UIString caption;
|
UIString caption;
|
||||||
caption = "Open DML File"d;
|
caption = "Open DML File"d;
|
||||||
FileDialog dlg = createFileDialog(caption);
|
FileDialog dlg = createFileDialog(caption);
|
||||||
dlg.addFilter(FileFilterEntry(UIString("DML files"d), "*.dml"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("DML files"d), "*.dml"));
|
||||||
dlg.addFilter(FileFilterEntry(UIString("All files"d), "*.*"));
|
dlg.addFilter(FileFilterEntry(UIString.fromRaw("All files"d), "*.*"));
|
||||||
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
dlg.dialogResult = delegate(Dialog dlg, const Action result) {
|
||||||
if (result.id == ACTION_OPEN.id) {
|
if (result.id == ACTION_OPEN.id) {
|
||||||
string filename = result.stringParam;
|
string filename = result.stringParam;
|
||||||
|
|
Loading…
Reference in New Issue