- Added lightlevel slider
This commit is contained in:
parent
3ffe710c31
commit
21e398ae92
|
@ -5,6 +5,7 @@
|
|||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<AlwaysBuild Value="False"/>
|
||||
<LRSInOutputDirectory Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
|
@ -56,7 +57,7 @@
|
|||
<MinVersion Major="4" Minor="5" Release="1" Valid="True"/>
|
||||
</Item5>
|
||||
</RequiredPackages>
|
||||
<Units Count="45">
|
||||
<Units Count="46">
|
||||
<Unit0>
|
||||
<Filename Value="CentrED.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
|
@ -320,6 +321,13 @@
|
|||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ULightProvider"/>
|
||||
</Unit44>
|
||||
<Unit45>
|
||||
<Filename Value="Tools/UfrmLightlevel.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmLightlevel"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="UfrmLightlevel"/>
|
||||
</Unit45>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
inherited frmLightlevel: TfrmLightlevel
|
||||
Height = 171
|
||||
Width = 40
|
||||
ActiveControl = tbLightlevel
|
||||
Caption = 'Lightlevel'
|
||||
ClientHeight = 171
|
||||
ClientWidth = 40
|
||||
object tbLightlevel: TTrackBar[0]
|
||||
Left = 0
|
||||
Height = 171
|
||||
Top = 0
|
||||
Width = 40
|
||||
Max = 32
|
||||
OnChange = tbLightlevelChange
|
||||
Orientation = trVertical
|
||||
Position = 0
|
||||
Align = alClient
|
||||
TabOrder = 0
|
||||
end
|
||||
inherited tmClose: TTimer[1]
|
||||
end
|
||||
end
|
|
@ -0,0 +1,48 @@
|
|||
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;
|
||||
procedure tbLightlevelChange(Sender: TObject);
|
||||
private
|
||||
{ private declarations }
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
|
||||
var
|
||||
frmLightlevel: TfrmLightlevel;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
UfrmMain;
|
||||
|
||||
{ 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;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I UfrmLightlevel.lrs}
|
||||
|
||||
end.
|
||||
|
|
@ -78,7 +78,7 @@ uses
|
|||
UGameResources, UfrmAccountControl, UfrmEditAccount, UfrmDrawSettings,
|
||||
UfrmBoundaries, UfrmElevateSettings, UfrmConfirmation, UfrmMoveSettings,
|
||||
UfrmAbout, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand,
|
||||
UfrmVirtualLayer, UfrmFilter, UfrmRegionControl;
|
||||
UfrmVirtualLayer, UfrmFilter, UfrmRegionControl, UfrmLightlevel;
|
||||
|
||||
{$I version.inc}
|
||||
|
||||
|
@ -210,6 +210,7 @@ begin
|
|||
frmBoundaries := TfrmBoundaries.Create(frmMain);
|
||||
frmFilter := TfrmFilter.Create(frmMain);
|
||||
frmVirtualLayer := TfrmVirtualLayer.Create(frmMain);
|
||||
frmLightlevel := TfrmLightlevel.Create(frmMain);
|
||||
frmAbout := TfrmAbout.Create(frmMain);
|
||||
frmMain.Show;
|
||||
frmInitialize.Hide;
|
||||
|
@ -306,6 +307,7 @@ begin
|
|||
FreeAndNil(frmRegionControl);
|
||||
FreeAndNil(frmLargeScaleCommand);
|
||||
FreeAndNil(frmRadarMap);
|
||||
FreeAndNil(frmLightlevel);
|
||||
|
||||
if frmMain <> nil then
|
||||
begin
|
||||
|
|
|
@ -25,7 +25,7 @@ object frmLogin: TfrmLogin
|
|||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 0
|
||||
Height = 18
|
||||
Height = 19
|
||||
Top = 239
|
||||
Width = 481
|
||||
Alignment = taCenter
|
||||
|
@ -439,7 +439,7 @@ object frmLogin: TfrmLogin
|
|||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 330
|
||||
Height = 76
|
||||
Height = 78
|
||||
Top = 12
|
||||
Width = 143
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
|
@ -447,7 +447,7 @@ object frmLogin: TfrmLogin
|
|||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 8
|
||||
BorderSpacing.Right = 8
|
||||
ClientHeight = 74
|
||||
ClientHeight = 76
|
||||
ClientWidth = 141
|
||||
TabOrder = 2
|
||||
object btnOK: TButton
|
||||
|
@ -515,7 +515,7 @@ object frmLogin: TfrmLogin
|
|||
BorderSpacing.Left = 8
|
||||
BorderSpacing.Top = 4
|
||||
BorderSpacing.Right = 8
|
||||
Caption = 'Select the directory containing art.mul, artidx.mul, hues.mul, tiledata.mul, animdata.mul, texmaps.mul and texidx.mul.'
|
||||
Caption = 'Select the directory containing art.mul, artidx.mul, hues.mul, tiledata.mul, animdata.mul, texmaps.mul, texidx.mul, light.mul and lightidx.mul.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
|
@ -544,7 +544,7 @@ object frmLogin: TfrmLogin
|
|||
AnchorSideRight.Side = asrBottom
|
||||
Left = 330
|
||||
Height = 85
|
||||
Top = 96
|
||||
Top = 98
|
||||
Width = 143
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
AutoSize = True
|
||||
|
|
|
@ -110,7 +110,9 @@ begin
|
|||
(not FileExists(path + 'tiledata.mul')) or
|
||||
(not FileExists(path + 'animdata.mul')) or
|
||||
(not FileExists(path + 'texmaps.mul')) or
|
||||
(not FileExists(path + 'texidx.mul')) then
|
||||
(not FileExists(path + 'texidx.mul')) or
|
||||
(not FileExists(path + 'light.mul')) or
|
||||
(not FileExists(path + 'lightidx.mul')) then
|
||||
begin
|
||||
MessageDlg('Incorrect directory', 'The data path you specified does not '
|
||||
+ 'seem to be correct.', mtWarning, [mbOK], 0);
|
||||
|
|
|
@ -968,14 +968,14 @@ object frmMain: TfrmMain
|
|||
OnClick = tbStaticsClick
|
||||
end
|
||||
object tbSeparator5: TToolButton
|
||||
Left = 415
|
||||
Left = 438
|
||||
Top = 2
|
||||
Width = 17
|
||||
Caption = 'tbSeparator5'
|
||||
Style = tbsDivider
|
||||
end
|
||||
object tbRadarMap: TToolButton
|
||||
Left = 432
|
||||
Left = 455
|
||||
Hint = 'Radar Map'
|
||||
Top = 2
|
||||
Caption = 'Radar Map'
|
||||
|
@ -997,7 +997,7 @@ object frmMain: TfrmMain
|
|||
OnMouseMove = tbFilterMouseMove
|
||||
end
|
||||
object tbFlat: TToolButton
|
||||
Left = 380
|
||||
Left = 403
|
||||
Top = 2
|
||||
Action = acFlat
|
||||
DropdownMenu = pmFlatViewSettings
|
||||
|
@ -1021,6 +1021,11 @@ object frmMain: TfrmMain
|
|||
Top = 2
|
||||
Action = acUndo
|
||||
end
|
||||
object ToolButton1: TToolButton
|
||||
Left = 380
|
||||
Top = 2
|
||||
Action = acLightlevel
|
||||
end
|
||||
end
|
||||
object pnlChatHeader: TPanel
|
||||
AnchorSideLeft.Control = pnlChat
|
||||
|
@ -1456,7 +1461,7 @@ object frmMain: TfrmMain
|
|||
left = 264
|
||||
top = 32
|
||||
Bitmap = {
|
||||
4C69150000001000000010000000000000000000000000000000000000000000
|
||||
4C69160000001000000010000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000D9A781FFD39E76FF00000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000ECBEA1FFE7BB9DFFE4B697FFE0B292FFDAAE
|
||||
|
@ -2128,6 +2133,38 @@ object frmMain: TfrmMain
|
|||
3DD2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0036813C03337D
|
||||
3978FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00B0E2
|
||||
F55CA7DCF5B59DD9F5E291D1F1F782CBF0F876C4EFED6DBFEDD177C3EE80FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00AFE0F619ADDEF6B7B7E4
|
||||
F8FFC7ECFBFFD7F3FCFFE1F7FDFFE2F8FEFFD8F0FCFFB6DFF8FF6BBBEDFF56AF
|
||||
E8DE77BEEC2CFFFFFF00FFFFFF00FFFFFF00B2E1F50BA2DBF4CAC3EBFAFFE2F9
|
||||
FDFFE0F9FDFFD5F7FDFFCFF6FDFFC9F4FCFFC7F4FCFFD6F9FDFFEBFAFEFF90CA
|
||||
F2FF43A2E4ED78BEE917FFFFFF00FFFFFF0098D6F489B4E3F8FFE5FAFEFFDBF8
|
||||
FDFFE4FAFEFFF0FCFEFFF9FEFFFFF9FEFFFFEFFCFEFFD2F6FDFFB4F1FBFFEDFD
|
||||
FFFF6BB3EAFF58A9E4B6FFFFFF00FFFFFF0088CDF1E4D2EFFBFFDBF9FEFFDFF9
|
||||
FDFFECFBFEFFEEFCFEFFEFFCFEFFEFFCFEFFEBFBFEFFE0F9FEFFB8F1FBFFA8F1
|
||||
FBFFCBE5F8FF3892DCF7FFFFFF00FFFFFF007BC5EEF9DFF6FDFFC8F5FCFFCDF6
|
||||
FCFFD6F7FDFFD3F4FCFFCFF2FCFFCAF1FBFFC4F0FCFFBAF2FBFF96EAF8FF72E5
|
||||
F7FFE2F4FDFF3189D8FEFFFFFF00FFFFFF006FBEECE3C9E9F9FFD4F9FDFF7CE3
|
||||
F7FF86E5F8FF60B1EFFF68B5EFFF63B4EFFF4CA6ECFF82E4F7FF59DCF5FF8AEB
|
||||
FAFFCBE2F7FF338BD9F7FFFFFF00FFFFFF0078C0EC888BC8EFFFECFCFEFF77E1
|
||||
F7FF2F99EAFF75E1F6FF74E1F6FF68DEF5FF73E1F6FF0986E6FF46D5F3FFDCFE
|
||||
FEFF6FAAE5FF4C99DEBFFFFFFF00FFFFFF0080C6F00468B5E9D8A5D4F3FFDCFA
|
||||
FEFF38A1EBFF74E1F6FF6AE4F6FF5DE2F5FF72E0F6FF1691E8FFC0F5FDFFACCE
|
||||
F1FF2780D6F86FAEE425FFFFFF00FFFFFF00FFFFFF0078BDEB2F5CACE7EBA6D3
|
||||
F3FF65AEF0FF74E1F6FF73E1F6FF72E0F6FF71E0F6FF4CA3ECFF9CC3EFFF297F
|
||||
D6FB65A8E25AFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0075B9EA3461A7
|
||||
DEE7469DE6FF4BBEF7FF47E6FDFF41E5FDFF51C3FBFF167CDEFF3382D1F266AA
|
||||
E346FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0085A7
|
||||
BF4B638195FA7A95A3FF3A8A98FF357F8CFF606E76FF2D4357FE7FA2BE40FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF0068777DE2A6A5A2FFA8A2A2FF9D9998FF948F8BFF434B53EBFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF005F6E77C6BCBCBBFFEBEAEAFFCDCCCCFFA3A19FFF3F4C55DBFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF0088A7BB5D485055F5444545FE3F4141FE3F474AF67D9CB16AFFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
|
||||
FF00FFFFFF00FFFFFF00FFFFFF00
|
||||
}
|
||||
end
|
||||
|
@ -2609,6 +2646,13 @@ object frmMain: TfrmMain
|
|||
OnExecute = acUndoExecute
|
||||
ShortCut = 16474
|
||||
end
|
||||
object acLightlevel: TAction
|
||||
Category = 'Settings'
|
||||
Caption = 'Lightlevel'
|
||||
Hint = 'Set Lightlevel'
|
||||
ImageIndex = 21
|
||||
OnExecute = acLightlevelExecute
|
||||
end
|
||||
end
|
||||
object tmGrabTileInfo: TTimer
|
||||
Enabled = False
|
||||
|
|
|
@ -68,6 +68,7 @@ type
|
|||
acFilter: TAction;
|
||||
acFlat: TAction;
|
||||
acNoDraw: TAction;
|
||||
acLightlevel: TAction;
|
||||
acUndo: TAction;
|
||||
acVirtualLayer: TAction;
|
||||
ActionList1: TActionList;
|
||||
|
@ -147,6 +148,7 @@ type
|
|||
tbNoDraw: TToolButton;
|
||||
tbSeparator2: TToolButton;
|
||||
tbUndo: TToolButton;
|
||||
ToolButton1: TToolButton;
|
||||
tsLocations: TTabSheet;
|
||||
tbSetHue: TToolButton;
|
||||
tmGrabTileInfo: TTimer;
|
||||
|
@ -181,6 +183,7 @@ type
|
|||
procedure acFilterExecute(Sender: TObject);
|
||||
procedure acFlatExecute(Sender: TObject);
|
||||
procedure acHueExecute(Sender: TObject);
|
||||
procedure acLightlevelExecute(Sender: TObject);
|
||||
procedure acMoveExecute(Sender: TObject);
|
||||
procedure acNoDrawExecute(Sender: TObject);
|
||||
procedure acSelectExecute(Sender: TObject);
|
||||
|
@ -373,6 +376,7 @@ type
|
|||
property Landscape: TLandscape read FLandscape;
|
||||
property CurrentTile: TWorldItem read FCurrentTile write SetCurrentTile;
|
||||
property SelectedTile: TWorldItem read FSelectedTile write SetSelectedTile;
|
||||
property LightManager: TLightManager read FLightManager;
|
||||
{ Methods }
|
||||
procedure InvalidateFilter;
|
||||
procedure InvalidateScreenBuffer;
|
||||
|
@ -395,7 +399,7 @@ uses
|
|||
UfrmBoundaries, UfrmElevateSettings, UfrmConfirmation, UfrmMoveSettings,
|
||||
UfrmAbout, UPacketHandlers, UfrmHueSettings, UfrmRadar, UfrmLargeScaleCommand,
|
||||
UfrmLogin, UResourceManager, UfrmVirtualLayer, UfrmFilter, UfrmRegionControl,
|
||||
Logging, LConvEncoding, LCLType;
|
||||
Logging, LConvEncoding, LCLType, UfrmLightlevel;
|
||||
|
||||
type
|
||||
TGLArrayf4 = array[0..3] of GLfloat;
|
||||
|
@ -1171,6 +1175,11 @@ begin
|
|||
frmHueSettings.Show;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.acLightlevelExecute(Sender: TObject);
|
||||
begin
|
||||
frmLightlevel.Show;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.acMoveExecute(Sender: TObject);
|
||||
begin
|
||||
acMove.Checked := True;
|
||||
|
|
Loading…
Reference in New Issue