Skip to content

Commit dcab766

Browse files
committed
General improvements
1 parent b46f3d0 commit dcab766

1 file changed

Lines changed: 63 additions & 55 deletions

File tree

Lines changed: 63 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#AutoIt3Wrapper_UseUpx=n
88
#AutoIt3Wrapper_Compile_Both=y
99
#AutoIt3Wrapper_Res_Comment=This is, has been, and ever will be buggy. If it doesn't work, just tell me (FeynmanLogomaker) in a PM, or on the forum thread.
10-
#AutoIt3Wrapper_Res_Fileversion=7.5.5.0
10+
#AutoIt3Wrapper_Res_Fileversion=8.1.5.0
1111
#AutoIt3Wrapper_Res_SaveSource=y
1212
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
1313
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
@@ -46,21 +46,18 @@ Func GetPmode ( $flat , $blob , $blur , $glow , $spark , $flare , $lflare , $fir
4646
If GUICtrlRead ( $fireblend ) = $GUI_CHECKED Then
4747
$r = $r + 0x00020000
4848
EndIf
49-
Return "local function gfunc(i, r, g, b)" & @CRLF _
50-
& @TAB & "return 1, 0x" & Hex ( $r , 8 ) _
49+
Return "return 1, 0x" & Hex ( $r , 8 ) _
5150
& ", " & Round ( GUICtrlRead ( $sliderA ) * 2.55 ) _
5251
& ", " & Round ( GUICtrlRead ( $sliderR ) * 2.55 ) _
5352
& ", " & Round ( GUICtrlRead ( $sliderG ) * 2.55 ) _
5453
& ", " & Round ( GUICtrlRead ( $sliderB ) * 2.55 ) _
5554
& ", " & Round ( GUICtrlRead ( $sliderAG ) * 2.55 ) _
5655
& ", " & Round ( GUICtrlRead ( $sliderRG ) * 2.55 ) _
5756
& ", " & Round ( GUICtrlRead ( $sliderGG ) * 2.55 ) _
58-
& ", " & Round ( GUICtrlRead ( $sliderBG ) * 2.55 ) & @CRLF _
59-
& "end" & @CRLF _
60-
& "tpt.graphics_func(gfunc, tpt.element([ELEMENT NAME]))"
57+
& ", " & Round ( GUICtrlRead ( $sliderBG ) * 2.55 )
6158
EndFunc
6259

63-
Func BugReport ( $bug , $username = "Not Given" , $desc = "Unknown" , $cause = "Unknown" )
60+
Func BugReport ( $bug , $username = "[Not Given]" , $desc = "Unknown" , $cause = "Unknown" )
6461

6562
$EmailStr = "User " & $username & " has experienced a bug:" & @CRLF & @TAB & _
6663
"Description: " & $bug & @CRLF & @TAB & _
@@ -70,7 +67,7 @@ Func BugReport ( $bug , $username = "Not Given" , $desc = "Unknown" , $cause = "
7067

7168
SendMail ( "LET Bug Report" , _
7269
"bug_rep@let.net" , _
73-
_StringEncrypt ( 0 , "75822A983C8C58D8C9026983099BA9AE71F9D310ABE3D03F730470C9453C842F83B0F7C083E6" , _
70+
_StringEncrypt ( 0 , "75822A983C8C58D8C9026983099BA9AE71F9D310ABE3D03F737E70BC463D802883B3F0B583E26478752C" , _
7471
"0" , _
7572
1 ) , _
7673
$desc , _
@@ -109,7 +106,7 @@ Func BugRep ( )
109106
GUICtrlSetStyle ( $eDesc , 0x00001000 , 0x00000020 )
110107
GUICtrlSetBkColor ( $eDesc , 0xB0B0B0 )
111108

112-
$eCause = GUICtrlCreateEdit ( "Cause of bug (Please describe what you did to cause it, and" & @CRLF & "what we could do to reproduce it)" , 10 , 170 , 380 , 75 )
109+
$eCause = GUICtrlCreateEdit ( "Cause of bug (Please describe what you did to cause it, and" & @CRLF & "what we could do to reproduce it" , 10 , 170 , 380 , 75 )
113110
GUICtrlSetStyle ( $eCause , 0x00000000 , 0x00000020 )
114111
GUICtrlSetBkColor ( $eCause , 0xB0B0B0 )
115112

@@ -275,9 +272,9 @@ EndFunc
275272
;#####UPDATE#####
276273
Local $filename
277274

278-
Static $_VER = "7.5.5"
275+
Static $_VER = "8.1.5"
279276

280-
Static $_DOWNLOAD_URL = "https://dl.dropboxusercontent.com/s/iixzlhgrpha3etg/Ver.%207.5.5.zip?dl=1&token_hash=AAF333lUbrB8gcgkfcMAZrmsEjFKmZ24j8INht2akt8-iQ"
277+
Static $_DOWNLOAD_URL = "https://dl-web.dropbox.com/get/Lua%20Element%20Creator/Ver.%208.1.5.zip?_subject_uid=163512728&w=AABjJWQbmm5mC2OSuR2SmhFCkD3-Fr7pnuKMnqxHGfrdIw&dl=1"
281278
Static $_VERSION_URL = "http://pastebin.com/raw.php?i=4VxNwZ29"
282279
Static $_WHATSNEW_URL = "http://pastebin.com/raw.php?i=2ZR5K1XV"
283280

@@ -300,15 +297,15 @@ EndIf
300297

301298
;###GRAPHICS###
302299
Static $_W = 1275
303-
Static $_H = 615
300+
Static $_H = 655
304301
Static $FontWeight = 200
305302

306303
;##########
307304
DirCreate( "Lua Elements" )
308305
;##########
309306

310307
;###CREATION###
311-
$guihnd = GUICreate("Lua Element Tool", $_W, $_H)
308+
$guihnd = GUICreate("Lua Element Tool - Version " & $_VER, $_W, $_H)
312309
;GRAPHICS PRESETS
313310
GUISetFont ( 8.5 , $FontWeight )
314311
GUISetState ( @SW_SHOW )
@@ -326,7 +323,7 @@ GUICtrlCreateLabel ( "Lua Element Tool Version " & $_VER , 145 , 19 , 350 , 30 )
326323
;###UPDATE WARNING###
327324
If $_VER <> $_CURRENT Then
328325
If $_CURRENT <> "" Then
329-
GUICtrlCreateLabel ( "Current Version: " & $_CURRENT , 145 , 49 , 350 , 30 )
326+
GUICtrlCreateLabel ( "UPDATE AVAILABLE - ver." & $_CURRENT , 145 , 49 , 350 , 30 )
330327
Else
331328
GUICtrlCreateLabel ( "Error: Cannot find update info" , 145 , 49 , 350 , 20 )
332329
EndIf
@@ -335,17 +332,18 @@ EndIf
335332
;###UPDATE FUNC###
336333
GUICtrlCreateLabel ( "Update Function" , 525 , 10 )
337334
;Main
338-
$update = GUICtrlCreateEdit( "--Update Function" , 525 , 30 , 355 , $_H - 55 )
335+
$update = GUICtrlCreateEdit( "--Update Function" , 525 , 30 , 355 , $_H - 65 )
339336
;Styles
340337
GUICtrlSetStyle ( -1 , 0x00001000 , 0x00000020 )
341338
GUICtrlSetFont ( $update , 10 , 200 , 0 , "Consolas" , 1 )
342339
GUICtrlSetColor ( $update , 0xFFFFFF )
343340
GUICtrlSetBkColor ( $update , 0x000000 )
344341

345342
;###GRAPHICS FUNC###
346-
GUICtrlCreateLabel ( "Graphics Fuction (Press Ctrl-F to run the Graphics Function Helper)" , 900 , 10 )
343+
GUICtrlCreateLabel ( "Graphics Fuction" , 900 , 10 )
347344
;Data
348-
Static $GraphicsFuncDef = "local cola, colr, colg, colb, firea, firer, fireg, fireb" & @CRLF _
345+
Static $GraphicsFuncDef = "--Press CTRL-F to run the Graphics Function helper" & @CRLF _
346+
& "local cola, colr, colg, colb, firea, firer, fireg, fireb" & @CRLF _
349347
& "cola = 255 -- Alpha " & @CRLF _
350348
& "colr = 255 -- Red " & @CRLF _
351349
& "colg = 255 -- Green " & @CRLF _
@@ -357,7 +355,7 @@ GUICtrlCreateLabel ( "Graphics Fuction (Press Ctrl-F to run the Graphics Functio
357355
& "--See Pixel Mode Values Table for more info" & @CRLF _
358356
& "return 0, 0x00000001, cola, colr, colg, colb, firea, firer, fireg, fireb"
359357
;Main
360-
$graphics = GUICtrlCreateEdit( $GraphicsFuncDef , 900 , 30 , 355 , $_H - 55 )
358+
$graphics = GUICtrlCreateEdit( $GraphicsFuncDef , 900 , 30 , 355 , $_H - 65 )
361359
;Styles
362360
GUICtrlSetStyle ( -1 , 0x00001000 , 0x00000020 )
363361
GUICtrlSetColor ( -1 , 0xFFFFFF )
@@ -372,6 +370,16 @@ GUICtrlCreateLabel( "Name" , 10 , $cy , 100 , 15 )
372370
GUICtrlSetStyle ( -1 , 0x00000000 , 0x00000020 )
373371

374372

373+
$cy = $cy + 40
374+
375+
;###GROUP_NAME###
376+
GUICtrlCreateLabel( "Group" , 10 , $cy , 100 , 15 )
377+
;Main
378+
$group = GUICtrlCreateInput( "AU3FGEN" , 10 , $cy + 15 , 130 , 20 )
379+
;Styles
380+
GUICtrlSetStyle ( -1 , 0x00000000 , 0x00000020 )
381+
382+
375383
$cy = $cy + 40
376384

377385

@@ -448,9 +456,9 @@ GUICtrlCreateLabel( "MenuSection" , 10 , $cy , 100 , 15 )
448456
;Main
449457
$menu = GUICtrlCreateCombo( "0: Walls" , 10 , $cy + 15 , 130 , 20 )
450458
;Styles
451-
GUICtrlSetStyle ( -1 , 0x00000000 , 0x00000020 )
459+
452460
;Data
453-
GUICtrlSetData ( -1 , "1: Electric|2: Powered|3: Sensors|4: Force-creating|5: Explosives|6: Gases|7: Liquids|8: Powders|9: Solids|10: Radioactive|11: Special|12: Life|13: Tools (UNRELIABLE)|14: Deco (UNRELIABLE)" )
461+
GUICtrlSetData ( -1 , "1: Electric|2: Powered|3: Sensors|4: Force-creating|5: Explosives|6: Gases|7: Liquids|8: Powders|9: Solids|10: Radioactive|11: Special|12: Life|13: Tools|14: Deco" )
454462

455463

456464
$cy = $cy + 40
@@ -537,11 +545,11 @@ $cy = $cy + 40
537545

538546
GUICtrlCreateLabel( "FallDown" , 10 , $cy , 100 , 15 )
539547

540-
$fdn = GUICtrlCreateCombo( "0: Solid/Gas/Energy" , 10 , 545 , 130 , 20 )
548+
$fdn = GUICtrlCreateCombo( "0: Solid/Gas/Energy" , 10 , $cy + 15 , 130 , 20 )
541549

542-
GUICtrlSetStyle ( -1 , 0x00000000 , 0x00000020 )
550+
GUICtrlSetStyle ( $fdn , 0x00000000 , 0x00000020 )
543551

544-
GUICtrlSetData ( -1 , "1: Powder|2: Liquid" )
552+
GUICtrlSetData ( $fdn , "1: Powder|2: Liquid" )
545553

546554
$file = GUICtrlCreateMenu ( "File" )
547555
$save = GUICtrlCreateMenuItem ( "Save" , $file )
@@ -564,37 +572,37 @@ Func SaveFile ( )
564572
If Not @error Then
565573
$f = FileOpen ( $filename , 2 )
566574

567-
FileWrite ( $f , "elements.allocate('AU3FGEN', '" & GUICtrlRead ( $name ) & "')" & @CRLF )
575+
FileWrite ( $f , "elements.allocate('" & GUICtrlRead ( $group ) & "', '" & GUICtrlRead ( $name ) & "')" & @CRLF )
568576

569-
FileWrite ( $f , "elements.element(elements.AU3FGEN_PT_" & GUICtrlRead ( $name ) & ", elements.element(elements.DEFAULT_PT_BCOL))" & @CRLF )
577+
FileWrite ( $f , "elements.element(elements." & GUICtrlRead ( $group ) & "_PT_" & GUICtrlRead ( $name ) & ", elements.element(elements.DEFAULT_PT_BCOL))" & @CRLF )
570578

571-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Name" , GUICtrlRead ( $name ) ) )
579+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Name" , GUICtrlRead ( $name ) ) )
572580

573-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Description" , GUICtrlRead ( $desc ) ) )
581+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Description" , GUICtrlRead ( $desc ) ) )
574582

575-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Color" , GUICtrlRead ( $col ) ) )
583+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Color" , GUICtrlRead ( $col ) ) )
576584

577-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "MenuSection" , StringReplace ( StringMid ( GUICtrlRead ( $menu ) , 1 , 2 ) , ":" , "" ) ) )
585+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "MenuSection" , StringReplace ( StringMid ( GUICtrlRead ( $menu ) , 1 , 2 ) , ":" , "" ) ) )
578586

579-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Gravity" , GUICtrlRead ( $grav ) ) )
587+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Gravity" , GUICtrlRead ( $grav ) ) )
580588

581-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Flammable" , GUICtrlRead ( $flammable ) ) )
589+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Flammable" , GUICtrlRead ( $flammable ) ) )
582590

583-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Explosive" , StringMid ( GUICtrlRead ( $expl ) , 1 , 1 ) ) )
591+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Explosive" , StringMid ( GUICtrlRead ( $expl ) , 1 , 1 ) ) )
584592

585-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Loss" , GUICtrlRead ( $loss ) ) )
593+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Loss" , GUICtrlRead ( $loss ) ) )
586594

587-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "AirLoss" , GUICtrlRead ( $aloss ) ) )
595+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "AirLoss" , GUICtrlRead ( $aloss ) ) )
588596

589-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "AirDrag" , GUICtrlRead ( $adrag ) ) )
597+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "AirDrag" , GUICtrlRead ( $adrag ) ) )
590598

591-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Advection" , GUICtrlRead ( $adv ) ) )
599+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Advection" , GUICtrlRead ( $adv ) ) )
592600

593-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Weight" , GUICtrlRead ( $wght ) ) )
601+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Weight" , GUICtrlRead ( $wght ) ) )
594602

595-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Diffusion" , GUICtrlRead ( $diff ) ) )
603+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Diffusion" , GUICtrlRead ( $diff ) ) )
596604

597-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Diffusion" , StringMid ( GUICtrlRead ( $fdn ) , 1 , 1 ) ) )
605+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Diffusion" , StringMid ( GUICtrlRead ( $fdn ) , 1 , 1 ) ) )
598606

599607
#cs
600608
GRELEMGraphics = function(i, r, g, b)
@@ -627,37 +635,37 @@ Func SaveFileAs ( )
627635
If Not @error Then
628636
$f = FileOpen ( $filename , 2 )
629637

630-
FileWrite ( $f , "elements.allocate('AU3FGEN', '" & GUICtrlRead ( $name ) & "')" & @CRLF )
638+
FileWrite ( $f , "elements.allocate('" & GUICtrlRead ( $group ) & "', '" & GUICtrlRead ( $name ) & "')" & @CRLF )
631639

632-
FileWrite ( $f , "elements.element(elements.AU3FGEN_PT_" & GUICtrlRead ( $name ) & ", elements.element(elements.DEFAULT_PT_BCOL))" & @CRLF )
640+
FileWrite ( $f , "elements.element(elements." & GUICtrlRead ( $group ) & "_PT_" & GUICtrlRead ( $name ) & ", elements.element(elements.DEFAULT_PT_BCOL))" & @CRLF )
633641

634-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Name" , GUICtrlRead ( $name ) ) )
642+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Name" , GUICtrlRead ( $name ) ) )
635643

636-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Description" , GUICtrlRead ( $desc ) ) )
644+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Description" , GUICtrlRead ( $desc ) ) )
637645

638-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Color" , GUICtrlRead ( $col ) ) )
646+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Color" , GUICtrlRead ( $col ) ) )
639647

640-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "MenuSection" , StringReplace ( StringMid ( GUICtrlRead ( $menu ) , 1 , 2 ) , ":" , "" ) ) )
648+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "MenuSection" , StringReplace ( StringMid ( GUICtrlRead ( $menu ) , 1 , 2 ) , ":" , "" ) ) )
641649

642-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Gravity" , GUICtrlRead ( $grav ) ) )
650+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Gravity" , GUICtrlRead ( $grav ) ) )
643651

644-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Flammable" , GUICtrlRead ( $flammable ) ) )
652+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Flammable" , GUICtrlRead ( $flammable ) ) )
645653

646-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Explosive" , StringMid ( GUICtrlRead ( $expl ) , 1 , 1 ) ) )
654+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Explosive" , StringMid ( GUICtrlRead ( $expl ) , 1 , 1 ) ) )
647655

648-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Loss" , GUICtrlRead ( $loss ) ) )
656+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Loss" , GUICtrlRead ( $loss ) ) )
649657

650-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "AirLoss" , GUICtrlRead ( $aloss ) ) )
658+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "AirLoss" , GUICtrlRead ( $aloss ) ) )
651659

652-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "AirDrag" , GUICtrlRead ( $adrag ) ) )
660+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "AirDrag" , GUICtrlRead ( $adrag ) ) )
653661

654-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Advection" , GUICtrlRead ( $adv ) ) )
662+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Advection" , GUICtrlRead ( $adv ) ) )
655663

656-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Weight" , GUICtrlRead ( $wght ) ) )
664+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Weight" , GUICtrlRead ( $wght ) ) )
657665

658-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Diffusion" , GUICtrlRead ( $diff ) ) )
666+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Diffusion" , GUICtrlRead ( $diff ) ) )
659667

660-
FileWrite ( $f , lua ( "AU3FGEN" , GUICtrlRead ( $name ) , "Falldown" , StringMid ( GUICtrlRead ( $fdn ) , 1 , 1 ) ) )
668+
FileWrite ( $f , lua ( "" & GUICtrlRead ( $group ) & "" , GUICtrlRead ( $name ) , "Falldown" , StringMid ( GUICtrlRead ( $fdn ) , 1 , 1 ) ) )
661669

662670
FileWrite ( $f , "local g = function(i, x, y, s, n)" & @CRLF _
663671
& GUICtrlRead( $update ) & @CRLF & _

0 commit comments

Comments
 (0)