1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-05 00:45:14 -05:00

Some fixes + changes

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@204 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-11-07 16:55:28 +00:00
parent c43550a804
commit 56ae917fda
6 changed files with 106 additions and 95 deletions

View File

@ -7,6 +7,7 @@ object ColourHistoryForm: TColourHistoryForm
Caption = 'Colour Picker History'
ClientHeight = 250
ClientWidth = 489
OnShow = SetCHShowMenu
LCLVersion = '0.9.29'
object ColourList: TListView
Left = 16

View File

@ -1,18 +1,20 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TColourHistoryForm','FORMDATA',[
'TPF0'#18'TColourHistoryForm'#17'ColourHistoryForm'#4'Left'#3#242#1#6'Height'
+#3#250#0#3'Top'#3#218#1#5'Width'#3#233#1#13'ActiveControl'#7#13'SelectionNam'
+'e'#7'Caption'#6#21'Colour Picker History'#12'ClientHeight'#3#250#0#11'Clien'
+'tWidth'#3#233#1#10'LCLVersion'#6#6'0.9.29'#0#9'TListView'#10'ColourList'#4
+'Left'#2#16#6'Height'#3#208#0#3'Top'#2#16#5'Width'#3'@'#1#7'Columns'#14#0#8
+'TabOrder'#2#0#12'OnSelectItem'#7#14'ChangeViewData'#0#0#7'TButton'#12'Delet'
+'eButton'#4'Left'#3'`'#1#6'Height'#2#25#3'Top'#3#199#0#5'Width'#3#128#0#7'Ca'
+'ption'#6#6'Delete'#7'OnClick'#7#14'DeleteSelected'#8'TabOrder'#2#1#0#0#6'TL'
+'abel'#11'ColourValue'#4'Left'#3'h'#1#6'Height'#2#18#3'Top'#2'('#5'Width'#2#9
+#7'Caption'#6#1'0'#11'ParentColor'#8#0#0#6'TLabel'#10'CoordValue'#4'Left'#3
+'h'#1#6'Height'#2#18#3'Top'#2'I'#5'Width'#2#25#7'Caption'#6#4'0, 0'#11'Paren'
+'tColor'#8#0#0#5'TEdit'#13'SelectionName'#4'Left'#3'h'#1#6'Height'#2#27#3'To'
+'p'#2'h'#5'Width'#2'h'#8'OnChange'#7#10'ChangeName'#8'TabOrder'#2#2#4'Text'#6
+#4'Name'#0#0#7'TButton'#19'PickNewColourButton'#4'Left'#3'`'#1#6'Height'#2#25
+#3'Top'#3#160#0#5'Width'#3#128#0#7'Caption'#6#15'Pick New Colour'#8'TabOrder'
+#2#3#0#0#0
+'tWidth'#3#233#1#6'OnShow'#7#13'SetCHShowMenu'#10'LCLVersion'#6#6'0.9.29'#0#9
+'TListView'#10'ColourList'#4'Left'#2#16#6'Height'#3#208#0#3'Top'#2#16#5'Widt'
+'h'#3'@'#1#7'Columns'#14#0#8'TabOrder'#2#0#12'OnSelectItem'#7#14'ChangeViewD'
+'ata'#0#0#7'TButton'#12'DeleteButton'#4'Left'#3'`'#1#6'Height'#2#25#3'Top'#3
+#199#0#5'Width'#3#128#0#7'Caption'#6#6'Delete'#7'OnClick'#7#14'DeleteSelecte'
+'d'#8'TabOrder'#2#1#0#0#6'TLabel'#11'ColourValue'#4'Left'#3'h'#1#6'Height'#2
+#18#3'Top'#2'('#5'Width'#2#9#7'Caption'#6#1'0'#11'ParentColor'#8#0#0#6'TLabe'
+'l'#10'CoordValue'#4'Left'#3'h'#1#6'Height'#2#18#3'Top'#2'I'#5'Width'#2#25#7
+'Caption'#6#4'0, 0'#11'ParentColor'#8#0#0#5'TEdit'#13'SelectionName'#4'Left'
+#3'h'#1#6'Height'#2#27#3'Top'#2'h'#5'Width'#2'h'#8'OnChange'#7#10'ChangeName'
+#8'TabOrder'#2#2#4'Text'#6#4'Name'#0#0#7'TButton'#19'PickNewColourButton'#4
+'Left'#3'`'#1#6'Height'#2#25#3'Top'#3#160#0#5'Width'#3#128#0#7'Caption'#6#15
+'Pick New Colour'#8'TabOrder'#2#3#0#0#0
]);

View File

@ -36,6 +36,7 @@ type
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure SetCHShowMenu(Sender: TObject);
private
{ private declarations }
public
@ -91,10 +92,14 @@ end;
procedure TColourHistoryForm.ChangeViewData(Sender: TObject; Item: TListItem;
Selected: Boolean);
begin
ColourValue.Caption := 'Colour: ' + IntToStr(TColourPickerObject(ColourList.Selected.Data).Colour);
CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(ColourList.Selected.Data).Pos.X) +
', ' + IntToStr(TColourPickerObject(ColourList.Selected.Data).Pos.Y);
SelectionName.Text := TColourPickerObject(ColourList.Selected.Data).Name;
if not Assigned(Item) then
exit;
if not Item.Selected then
exit;
ColourValue.Caption := 'Colour: ' + IntToStr(TColourPickerObject(Item.Data).Colour);
CoordValue.Caption := 'Coords: ' + IntToStr(TColourPickerObject(Item.Data).Pos.X) +
', ' + IntToStr(TColourPickerObject(Item.Data).Pos.Y);
SelectionName.Text := TColourPickerObject(Item.Data).Name;
end;
procedure TColourHistoryForm.ChangeName(Sender: TObject);
@ -121,6 +126,11 @@ begin
inherited Destroy;
end;
procedure TColourHistoryForm.SetCHShowMenu(Sender: TObject);
begin
Form1.View_CH_Menu.Checked := True;
end;
initialization
{$I colourhistory.lrs}

View File

@ -164,8 +164,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
<CursorPos X="50" Y="979"/>
<TopLine Value="132"/>
<CursorPos X="3" Y="821"/>
<TopLine Value="819"/>
<EditorIndex Value="0"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
@ -275,7 +275,7 @@
<CursorPos X="29" Y="29"/>
<TopLine Value="24"/>
<EditorIndex Value="7"/>
<UsageCount Value="48"/>
<UsageCount Value="49"/>
<Loaded Value="True"/>
</Unit31>
<Unit32>
@ -284,7 +284,7 @@
<CursorPos X="18" Y="57"/>
<TopLine Value="46"/>
<EditorIndex Value="12"/>
<UsageCount Value="72"/>
<UsageCount Value="73"/>
<Loaded Value="True"/>
</Unit32>
<Unit33>
@ -726,7 +726,7 @@
<IsPartOfProject Value="True"/>
<UnitName Value="colourpicker"/>
<CursorPos X="36" Y="188"/>
<TopLine Value="167"/>
<TopLine Value="36"/>
<EditorIndex Value="3"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
@ -866,7 +866,7 @@
<UnitName Value="ocr"/>
<CursorPos X="19" Y="91"/>
<TopLine Value="75"/>
<UsageCount Value="171"/>
<UsageCount Value="173"/>
</Unit116>
<Unit117>
<Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/>
@ -881,7 +881,7 @@
<UnitName Value="project"/>
<CursorPos X="46" Y="15"/>
<TopLine Value="1"/>
<UsageCount Value="168"/>
<UsageCount Value="170"/>
</Unit118>
<Unit119>
<Filename Value="../../../FPC/FPCCheckout/rtl/inc/heap.inc"/>
@ -995,7 +995,7 @@
<UnitName Value="web"/>
<CursorPos X="1" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="96"/>
<UsageCount Value="98"/>
</Unit136>
<Unit137>
<Filename Value="../../../lazarus/lcl/lazhelphtml.pas"/>
@ -1195,7 +1195,7 @@
<CursorPos X="1" Y="69"/>
<TopLine Value="46"/>
<EditorIndex Value="1"/>
<UsageCount Value="89"/>
<UsageCount Value="91"/>
<Loaded Value="True"/>
</Unit161>
<Unit162>
@ -1474,7 +1474,7 @@
<CursorPos X="72" Y="28"/>
<TopLine Value="14"/>
<EditorIndex Value="13"/>
<UsageCount Value="15"/>
<UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit203>
<Unit204>
@ -1503,7 +1503,7 @@
<UnitName Value="colourpickersort"/>
<CursorPos X="11" Y="1"/>
<TopLine Value="1"/>
<UsageCount Value="28"/>
<UsageCount Value="30"/>
</Unit207>
<Unit208>
<Filename Value="colourhistory.pas"/>
@ -1511,10 +1511,10 @@
<ComponentName Value="ColourHistoryForm"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="colourhistory"/>
<CursorPos X="55" Y="115"/>
<TopLine Value="100"/>
<CursorPos X="37" Y="131"/>
<TopLine Value="110"/>
<EditorIndex Value="4"/>
<UsageCount Value="26"/>
<UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit208>
<Unit209>
@ -1559,123 +1559,123 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="colourhistory.pas"/>
<Caret Line="73" Column="12" TopLine="50"/>
<Caret Line="31" Column="9" TopLine="31"/>
</Position1>
<Position2>
<Filename Value="colourhistory.pas"/>
<Caret Line="28" Column="21" TopLine="14"/>
<Caret Line="96" Column="3" TopLine="75"/>
</Position2>
<Position3>
<Filename Value="colourhistory.pas"/>
<Caret Line="70" Column="27" TopLine="44"/>
<Caret Line="88" Column="22" TopLine="75"/>
</Position3>
<Position4>
<Filename Value="colourhistory.pas"/>
<Caret Line="82" Column="22" TopLine="61"/>
</Position4>
<Position5>
<Filename Value="colourhistory.pas"/>
<Caret Line="55" Column="34" TopLine="55"/>
</Position5>
<Position6>
<Filename Value="colourhistory.pas"/>
<Caret Line="91" Column="31" TopLine="19"/>
</Position6>
<Position7>
<Filename Value="colourhistory.pas"/>
<Caret Line="31" Column="9" TopLine="31"/>
</Position7>
<Position8>
<Filename Value="colourhistory.pas"/>
<Caret Line="96" Column="3" TopLine="75"/>
</Position8>
<Position9>
<Filename Value="colourhistory.pas"/>
<Caret Line="88" Column="22" TopLine="75"/>
</Position9>
<Position10>
<Filename Value="testunit.pas"/>
<Caret Line="961" Column="27" TopLine="948"/>
</Position10>
<Position11>
</Position4>
<Position5>
<Filename Value="testunit.pas"/>
<Caret Line="967" Column="51" TopLine="952"/>
</Position5>
<Position6>
<Filename Value="testunit.pas"/>
<Caret Line="974" Column="51" TopLine="952"/>
</Position6>
<Position7>
<Filename Value="testunit.pas"/>
<Caret Line="822" Column="6" TopLine="810"/>
</Position7>
<Position8>
<Filename Value="testunit.pas"/>
<Caret Line="825" Column="27" TopLine="808"/>
</Position8>
<Position9>
<Filename Value="testunit.pas"/>
<Caret Line="822" Column="28" TopLine="810"/>
</Position9>
<Position10>
<Filename Value="colourhistory.pas"/>
<Caret Line="85" Column="32" TopLine="69"/>
</Position10>
<Position11>
<Filename Value="colourhistory.pas"/>
<Caret Line="92" Column="32" TopLine="69"/>
</Position11>
<Position12>
<Filename Value="testunit.pas"/>
<Caret Line="974" Column="51" TopLine="952"/>
<Caret Line="501" Column="35" TopLine="484"/>
</Position12>
<Position13>
<Filename Value="testunit.pas"/>
<Caret Line="822" Column="6" TopLine="810"/>
<Caret Line="859" Column="51" TopLine="840"/>
</Position13>
<Position14>
<Filename Value="testunit.pas"/>
<Caret Line="825" Column="27" TopLine="808"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="77" Column="1" TopLine="69"/>
</Position14>
<Position15>
<Filename Value="testunit.pas"/>
<Caret Line="822" Column="28" TopLine="810"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="25" Column="44" TopLine="11"/>
</Position15>
<Position16>
<Filename Value="colourhistory.pas"/>
<Caret Line="85" Column="32" TopLine="69"/>
<Filename Value="framescript.pas"/>
<Caret Line="27" Column="46" TopLine="19"/>
</Position16>
<Position17>
<Filename Value="colourhistory.pas"/>
<Caret Line="92" Column="32" TopLine="69"/>
<Caret Line="51" Column="12" TopLine="28"/>
</Position17>
<Position18>
<Filename Value="testunit.pas"/>
<Caret Line="501" Column="35" TopLine="484"/>
<Caret Line="30" Column="49" TopLine="26"/>
</Position18>
<Position19>
<Filename Value="testunit.pas"/>
<Caret Line="859" Column="51" TopLine="840"/>
<Caret Line="38" Column="24" TopLine="26"/>
</Position19>
<Position20>
<Filename Value="colourhistory.pas"/>
<Caret Line="77" Column="1" TopLine="69"/>
<Filename Value="framescript.pas"/>
<Caret Line="69" Column="29" TopLine="46"/>
</Position20>
<Position21>
<Filename Value="colourhistory.pas"/>
<Caret Line="25" Column="44" TopLine="11"/>
<Caret Line="113" Column="3" TopLine="96"/>
</Position21>
<Position22>
<Filename Value="framescript.pas"/>
<Caret Line="27" Column="46" TopLine="19"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="36" Column="49" TopLine="23"/>
</Position22>
<Position23>
<Filename Value="colourhistory.pas"/>
<Caret Line="51" Column="12" TopLine="28"/>
<Filename Value="testunit.pas"/>
<Caret Line="14" Column="63" TopLine="1"/>
</Position23>
<Position24>
<Filename Value="testunit.pas"/>
<Caret Line="30" Column="49" TopLine="26"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="115" Column="43" TopLine="100"/>
</Position24>
<Position25>
<Filename Value="testunit.pas"/>
<Caret Line="38" Column="24" TopLine="26"/>
<Caret Line="324" Column="37" TopLine="318"/>
</Position25>
<Position26>
<Filename Value="framescript.pas"/>
<Caret Line="69" Column="29" TopLine="46"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="99" Column="49" TopLine="82"/>
</Position26>
<Position27>
<Filename Value="colourhistory.pas"/>
<Caret Line="113" Column="3" TopLine="96"/>
<Filename Value="testunit.pas"/>
<Caret Line="979" Column="62" TopLine="960"/>
</Position27>
<Position28>
<Filename Value="colourhistory.pas"/>
<Caret Line="36" Column="49" TopLine="23"/>
<Filename Value="testunit.pas"/>
<Caret Line="821" Column="31" TopLine="810"/>
</Position28>
<Position29>
<Filename Value="testunit.pas"/>
<Caret Line="14" Column="63" TopLine="1"/>
<Filename Value="colourhistory.pas"/>
<Caret Line="90" Column="43" TopLine="83"/>
</Position29>
<Position30>
<Filename Value="colourhistory.pas"/>
<Caret Line="115" Column="43" TopLine="100"/>
<Filename Value="testunit.pas"/>
<Caret Line="823" Column="51" TopLine="807"/>
</Position30>
</JumpHistory>
</ProjectOptions>

View File

@ -1,5 +1,3 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#18#1#6'Height'#3'-'#2#3'Top'#3#233#0#5'Wi'
+'dth'#3#219#2#13'ActiveControl'#7#11'ScriptPanel'#7'Caption'#6#17'THA FUKING'

View File

@ -818,7 +818,7 @@ end;
procedure TForm1.ColourHistoryMenuClick(Sender: TObject);
begin
View_CH_Menu.Checked := not View_CH_Menu.Checked;
View_CH_Menu.Checked := not ColourHistoryForm.Visible;
if View_CH_Menu.Checked then
ColourHistoryForm.Show
else
@ -981,7 +981,7 @@ begin
ColourHistoryForm.AddColObj(cobj);
ColourHistoryForm.Show;
writeln('Picked colour: ' + inttostr(c) + ' at (' + inttostr(x) + ', ' + inttostr(y) + ')');
formWriteln('Picked colour: ' + inttostr(c) + ' at (' + inttostr(x) + ', ' + inttostr(y) + ')');
end;