2009-12-23 17:12:58 +01:00
|
|
|
unit UfrmLightlevel;
|
|
|
|
|
|
|
|
{$mode objfpc}{$H+}
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
|
|
|
ExtCtrls, ComCtrls, UfrmToolWindow;
|
|
|
|
|
|
|
|
type
|
|
|
|
|
|
|
|
{ TfrmLightlevel }
|
|
|
|
|
|
|
|
TfrmLightlevel = class(TfrmToolWindow)
|
|
|
|
tbLightlevel: TTrackBar;
|
2015-05-01 12:23:03 +02:00
|
|
|
procedure FormCreate(Sender: TObject);
|
2009-12-23 17:12:58 +01:00
|
|
|
procedure tbLightlevelChange(Sender: TObject);
|
|
|
|
private
|
|
|
|
{ private declarations }
|
|
|
|
public
|
|
|
|
{ public declarations }
|
|
|
|
end;
|
|
|
|
|
|
|
|
var
|
|
|
|
frmLightlevel: TfrmLightlevel;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
2015-05-01 12:23:03 +02:00
|
|
|
UfrmMain, Language;
|
2009-12-23 17:12:58 +01:00
|
|
|
|
|
|
|
{ TfrmLightlevel }
|
|
|
|
|
|
|
|
procedure TfrmLightlevel.tbLightlevelChange(Sender: TObject);
|
|
|
|
begin
|
|
|
|
if frmMain.LightManager.LightLevel = 0 then
|
|
|
|
begin
|
|
|
|
frmMain.LightManager.LightLevel := tbLightlevel.Position;
|
|
|
|
frmMain.InvalidateFilter;
|
|
|
|
end else
|
|
|
|
frmMain.LightManager.LightLevel := tbLightlevel.Position;
|
|
|
|
|
2015-05-01 12:23:03 +02:00
|
|
|
frmMain.acLightlevel.Tag:=frmMain.LightManager.LightLevel;
|
2009-12-23 17:12:58 +01:00
|
|
|
frmMain.oglGameWindow.Repaint;
|
|
|
|
end;
|
|
|
|
|
2015-05-01 12:23:03 +02:00
|
|
|
procedure TfrmLightlevel.FormCreate(Sender: TObject);
|
|
|
|
begin
|
|
|
|
LanguageTranslate(Self);
|
|
|
|
end;
|
|
|
|
|
2009-12-23 17:12:58 +01:00
|
|
|
initialization
|
|
|
|
{$I UfrmLightlevel.lrs}
|
|
|
|
|
|
|
|
end.
|
|
|
|
|