X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-editor.git;a=blobdiff_plain;f=src%2Feditor%2Ff_main.pas;h=070939d11262449427ddd618720d851addd242b1;hp=c5821c4fb5608f62e0321fdbe65fa418501d2e69;hb=797ba76501e5360f4d02d6aade613dc529a24213;hpb=a00a3d61ed426b67fed0fce818471fb84c462aac diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index c5821c4..070939d 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -295,6 +295,7 @@ var DrawPanelSize: Boolean; BackColor: TColor; PreviewColor: TColor; + UseCheckerboard: Boolean; Scale: Byte; RecentCount: Integer; RecentFiles: TStringList; @@ -2655,6 +2656,7 @@ begin DrawPanelSize := config.ReadBool('Editor', 'DrawPanelSize', True); BackColor := config.ReadInt('Editor', 'BackColor', $7F6040); PreviewColor := config.ReadInt('Editor', 'PreviewColor', $00FF00); + UseCheckerboard := config.ReadBool('Editor', 'UseCheckerboard', True); gColorEdge := config.ReadInt('Editor', 'EdgeColor', COLOR_EDGE); gAlphaEdge := config.ReadInt('Editor', 'EdgeAlpha', ALPHA_EDGE); if gAlphaEdge = 255 then @@ -2798,8 +2800,14 @@ begin if not g_GetTexture(SelectedTexture(), ID) then g_GetTexture('NOTEXTURE', ID); g_GetTextureSizeByID(ID, Width, Height); - if g_GetTexture('PREVIEW', PID) then - e_DrawFill(PID, RenderPanel.Width-Width, RenderPanel.Height-Height, Width div 16 + 1, Height div 16 + 1, 0, True, False); + if UseCheckerboard then + begin + if g_GetTexture('PREVIEW', PID) then + e_DrawFill(PID, RenderPanel.Width-Width, RenderPanel.Height-Height, Width div 16 + 1, Height div 16 + 1, 0, True, False); + end else + e_DrawFillQuad(RenderPanel.Width-Width-2, RenderPanel.Height-Height-2, + RenderPanel.Width-1, RenderPanel.Height-1, + GetRValue(PreviewColor), GetGValue(PreviewColor), GetBValue(PreviewColor), 0); e_Draw(ID, RenderPanel.Width-Width, RenderPanel.Height-Height, 0, True, False); end;