Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0b4b7bd21 | ||
|
|
218491bc4b | ||
|
|
0c65598156 | ||
|
|
3846afaf10 | ||
|
|
140a085ebe |
@@ -0,0 +1,24 @@
|
|||||||
|
This is free and unencumbered software released into the public domain.
|
||||||
|
|
||||||
|
Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||||
|
distribute this software, either in source code form or as a compiled
|
||||||
|
binary, for any purpose, commercial or non-commercial, and by any
|
||||||
|
means.
|
||||||
|
|
||||||
|
In jurisdictions that recognize copyright laws, the author or authors
|
||||||
|
of this software dedicate any and all copyright interest in the
|
||||||
|
software to the public domain. We make this dedication for the benefit
|
||||||
|
of the public at large and to the detriment of our heirs and
|
||||||
|
successors. We intend this dedication to be an overt act of
|
||||||
|
relinquishment in perpetuity of all present and future rights to this
|
||||||
|
software under copyright law.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||||
|
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||||
|
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||||
|
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||||
|
OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more information, please refer to <http://unlicense.org/>
|
||||||
+65
-62
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
package require Tk
|
package require Tk
|
||||||
|
|
||||||
set appversion 0.4
|
set appversion 0.7
|
||||||
set scriptpath [file normalize [info script]]
|
set scriptpath [file normalize [info script]]
|
||||||
set appdir [file dirname $scriptpath]
|
set appdir [file dirname $scriptpath]
|
||||||
# check if we're running from a starpack
|
# check if we're running from a starpack
|
||||||
@@ -54,11 +54,11 @@ set wa_opts {
|
|||||||
{offset 0x1E name {Blood} val {bool}}
|
{offset 0x1E name {Blood} val {bool}}
|
||||||
{offset 0x23 name {Upgraded Grenade} val {bool}}
|
{offset 0x23 name {Upgraded Grenade} val {bool}}
|
||||||
{offset 0x24 name {Upgraded Shotgun} val {bool}}
|
{offset 0x24 name {Upgraded Shotgun} val {bool}}
|
||||||
|
{offset 0x25 name {Upgraded Clusters} val {bool}}
|
||||||
|
{offset 0x26 name {Upgraded Longbow} val {bool}}
|
||||||
{offset 0x0F name {Sudden Death Event} val {0 {Round ends} 1 {Nuclear strike} 2 {HP drops to 1} 3 {Nothing happens}}}
|
{offset 0x0F name {Sudden Death Event} val {0 {Round ends} 1 {Nuclear strike} 2 {HP drops to 1} 3 {Nothing happens}}}
|
||||||
{offset 0x0D name {Stockpiling Mode} val {0 Replenish 1 Accumulate 2 Reduce}}
|
{offset 0x0D name {Stockpiling Mode} val {0 Replenish 1 Accumulate 2 Reduce}}
|
||||||
{offset 0x0E name {Worm Selection} val {0 Sequential 1 Manual 2 Random}}
|
{offset 0x0E name {Worm Selection} val {0 Sequential 1 Manual 2 Random}}
|
||||||
{offset 0x25 name {Upgraded Clusters} val {bool}}
|
|
||||||
{offset 0x26 name {Upgraded Longbow} val {bool}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# names of weapon properties
|
# names of weapon properties
|
||||||
@@ -202,18 +202,16 @@ set wa_ext_opts {
|
|||||||
{offset 0x150 size 1 name {Undetermined Crates} def 128 val {0 Off 1 On 128 Default}}
|
{offset 0x150 size 1 name {Undetermined Crates} def 128 val {0 Off 1 On 128 Default}}
|
||||||
{offset 0x151 size 1 name {Undetermined Fuses} def 128 val {0 Off 1 On 128 Default}}
|
{offset 0x151 size 1 name {Undetermined Fuses} def 128 val {0 Off 1 On 128 Default}}
|
||||||
{offset 0x14A size 1 name {Rope-Roll Drops} def 0 val {0 {Disabled} 1 {As from rope only} 2 {As from rope or jump}}}
|
{offset 0x14A size 1 name {Rope-Roll Drops} def 0 val {0 {Disabled} 1 {As from rope only} 2 {As from rope or jump}}}
|
||||||
{offset 0x14B size 1 name {Horizontal Impact Loss of Control} def 0 val {0 {Lose control} 255 {No loss of control}}}
|
|
||||||
{offset 0x143 size 1 name {Phased Worms (Enemy)} def 0 val {
|
{offset 0x143 size 1 name {Phased Worms (Enemy)} def 0 val {
|
||||||
0 {Off}
|
0 {Off}
|
||||||
1 {Worms move through each other}
|
1 {Worms move through each other}
|
||||||
2 {+ Move through enemy weapon objects}
|
2 {+ Move through enemy weapon objects}
|
||||||
3 {+ Don't take damage from enemy explosions}
|
3 {+ Don't take damage from enemy explosions}
|
||||||
}}
|
}}
|
||||||
{offset 0x14D size 1 name {Keep Control After Skimming} def 0 val {0 {Lose control} 1 {Keep control} 2 {Keep control and rope}}}
|
{offset 0x183 size 1 name {RubberWorm Gravity Type} def 0 val {0 {Unmodified} 1 {Standard} 2 {Black hole (constant)} 3 {Black hole (linear)}}}
|
||||||
|
{offset 0x191 size 1 name {Health Crates Cure Poison} def 1 val {255 {Off} 0 {Cure the collector} 1 {Cure the collector's team} 2 {Cure all allied teams}}}
|
||||||
{offset 0x156 size 1 name {Pneumatic Drill Imparts Velocity} def 128 val {0 Off 1 On 128 Default}}
|
{offset 0x156 size 1 name {Pneumatic Drill Imparts Velocity} def 128 val {0 Off 1 On 128 Default}}
|
||||||
{offset 0x16D size 1 name {Indian Rope Glitch} def 128 val {0 Off 1 On 128 Default}}
|
{offset 0x16D size 1 name {Indian Rope Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||||
{offset 0x16E size 1 name {Herd-Doubling Glitch} def 128 val {0 Off 1 On 128 Default}}
|
|
||||||
{offset 0x172 size 1 name {Skipwalking} def 0 val {255 Disabled 0 Possible 1 Facilitated}}
|
|
||||||
{offset 0x193 size 1 name {Sheep Heaven's Gate} def 7 val {
|
{offset 0x193 size 1 name {Sheep Heaven's Gate} def 7 val {
|
||||||
1 {1. Sheep explode out of all crates}
|
1 {1. Sheep explode out of all crates}
|
||||||
2 {2. Sheep weapon extended fuse time}
|
2 {2. Sheep weapon extended fuse time}
|
||||||
@@ -223,18 +221,20 @@ set wa_ext_opts {
|
|||||||
6 {6. Option 2 + Option 4}
|
6 {6. Option 2 + Option 4}
|
||||||
7 {7. All of the above}
|
7 {7. All of the above}
|
||||||
}}
|
}}
|
||||||
|
{offset 0x192 size 1 name {Kaos Mod Preset} def 0 val {
|
||||||
|
0 {20, 10, 15, 5, 10, 15, 10, 15, 5}
|
||||||
|
1 {20, 10, 10, 5, 10, 15, 10, 12, 5}
|
||||||
|
2 {20, 15, 10, 5, 10, 15, 10, 10, 0}
|
||||||
|
3 {25, 15, 5, 0, 20, 20, 10, 5, 0}
|
||||||
|
4 {25, 25, 0, 5, 20, 10, 10, 5, 0}
|
||||||
|
5 {25, 15, 5, 5, 25, 10, 10, 5, 0}
|
||||||
|
}}
|
||||||
|
{offset 0x16E size 1 name {Herd-Doubling Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||||
|
{offset 0x172 size 1 name {Skipwalking} def 0 val {255 Disabled 0 Possible 1 Facilitated}}
|
||||||
{offset 0x173 size 1 name {Roofing} def 0 val {0 {Allowed} 1 {Block above} 2 {Block everywhere}}}
|
{offset 0x173 size 1 name {Roofing} def 0 val {0 {Allowed} 1 {Block above} 2 {Block everywhere}}}
|
||||||
{offset 0x18E size 1 name {Terrain Overlap Phasing Glitch} def 128 val {0 Off 1 On 128 Default}}
|
{offset 0x18E size 1 name {Terrain Overlap Phasing Glitch} def 128 val {0 Off 1 On 128 Default}}
|
||||||
{offset 0x183 size 1 name {RubberWorm Gravity Type} def 0 val {0 {Unmodified} 1 {Standard} 2 {Black hole (constant)} 3 {Black hole (linear)}}}
|
{offset 0x14B size 1 name {Horizontal Impact Loss of Control} def 0 val {0 {Lose control} 255 {No loss of control}}}
|
||||||
{offset 0x191 size 1 name {Health Crates Cure Poison} def 1 val {255 {Off} 0 {Cure the collector} 2 {Cure the collector's team} 3 {Cure all allied teams}}}
|
{offset 0x14D size 1 name {Keep Control After Skimming} def 0 val {0 {Lose control} 1 {Keep control} 2 {Keep control and rope}}}
|
||||||
{offset 0x192 size 1 name {Kaos Mod Preset} def 0 val {
|
|
||||||
0 {Preset 0}
|
|
||||||
1 {Preset 1}
|
|
||||||
2 {Preset 2}
|
|
||||||
3 {Preset 3}
|
|
||||||
4 {Preset 4}
|
|
||||||
5 {Preset 5}
|
|
||||||
}}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# special setting processor section
|
# special setting processor section
|
||||||
@@ -293,21 +293,22 @@ proc wa_roundtime_write {num} {
|
|||||||
|
|
||||||
# fixedpoint helpers
|
# fixedpoint helpers
|
||||||
proc fixed2float {fpint} {
|
proc fixed2float {fpint} {
|
||||||
set whole [expr {int($fpint) >> 16}]
|
set fpint [expr {int($fpint)}]
|
||||||
set frac [expr {int($fpint) & 65535}]
|
set whole [expr {$fpint >> 16}]
|
||||||
return [expr {$whole + ($frac / 65536)}]
|
set frac [expr {$fpint % 65536}]
|
||||||
|
return [expr {$whole + ($frac / 65536.)}]
|
||||||
}
|
}
|
||||||
|
|
||||||
proc float2fixed {flt} {
|
proc float2fixed {flt} {
|
||||||
set whole [expr {int(double($flt))}]
|
set whole [expr {int($flt)}]
|
||||||
set frac [expr {double($flt) - $whole}]
|
set frac [expr {$flt - $whole}]
|
||||||
return [expr {($whole << 16) | int($frac * 65536)}]
|
return [expr {($whole << 16) | int($frac * 65536.)}]
|
||||||
}
|
}
|
||||||
|
|
||||||
# v3-only spec functions
|
# v3-only spec functions
|
||||||
|
|
||||||
proc wa_petrolturndecay_read {raw} {return [fixed2float $raw]}
|
proc wa_petrolturndecay_read {raw} {return [fixed2float $raw]}
|
||||||
proc wa_petrolturndecay_write {num} {return [expr int($num * 65536)]}
|
proc wa_petrolturndecay_write {num} {return [expr int($num * 65536.)]}
|
||||||
|
|
||||||
# general logic
|
# general logic
|
||||||
|
|
||||||
@@ -341,7 +342,7 @@ proc fullscanscheme {version} {
|
|||||||
set delay 0
|
set delay 0
|
||||||
set prob 0
|
set prob 0
|
||||||
catch {
|
catch {
|
||||||
binary scan [string range $rawschemedata $offs [expr {$offs + 4}]] cucucucu ammo power delay prob
|
binary scan [string range $rawschemedata $offs [expr {$offs + 3}]] cucucucu ammo power delay prob
|
||||||
}
|
}
|
||||||
set wsc_data($offs) $ammo
|
set wsc_data($offs) $ammo
|
||||||
set wsc_data($poweroffs) $power
|
set wsc_data($poweroffs) $power
|
||||||
@@ -360,7 +361,7 @@ proc fullscanscheme {version} {
|
|||||||
if {$size eq 2} {set fmt s}
|
if {$size eq 2} {set fmt s}
|
||||||
if {$size eq 4} {set fmt i}
|
if {$size eq 4} {set fmt i}
|
||||||
set newval ""
|
set newval ""
|
||||||
binary scan [string range $rawschemedata $offs [expr {$offs + $size}]] $fmt newval
|
binary scan [string range $rawschemedata $offs [expr {$offs + $size - 1}]] $fmt newval
|
||||||
if {$newval ne ""} {set wscval $newval}
|
if {$newval ne ""} {set wscval $newval}
|
||||||
if {([llength $valopt] > 1) && ([lindex $valopt 0] eq "spec")} {
|
if {([llength $valopt] > 1) && ([lindex $valopt 0] eq "spec")} {
|
||||||
set readfunc "[lindex $valopt 1]_read"
|
set readfunc "[lindex $valopt 1]_read"
|
||||||
@@ -474,7 +475,7 @@ proc savescheme {fname} {
|
|||||||
if {$size eq 2} {set fmt s}
|
if {$size eq 2} {set fmt s}
|
||||||
if {$size eq 4} {set fmt i}
|
if {$size eq 4} {set fmt i}
|
||||||
if {([llength $valopt] > 1) && ([lindex $valopt 0] eq "spec")} {
|
if {([llength $valopt] > 1) && ([lindex $valopt 0] eq "spec")} {
|
||||||
set writefunc "[lindex $valopt 1]_read"
|
set writefunc "[lindex $valopt 1]_write"
|
||||||
set val [$writefunc $val]
|
set val [$writefunc $val]
|
||||||
} elseif {$valopt eq "fixp"} {
|
} elseif {$valopt eq "fixp"} {
|
||||||
set val [float2fixed $val]
|
set val [float2fixed $val]
|
||||||
@@ -570,7 +571,7 @@ grid .infoframe -row 1 -column 0 -sticky we
|
|||||||
ttk::frame .tabbar.nopts
|
ttk::frame .tabbar.nopts
|
||||||
.tabbar add .tabbar.nopts -text "Options"
|
.tabbar add .tabbar.nopts -text "Options"
|
||||||
ttk::labelframe .tabbar.nopts.opts -text "General options"
|
ttk::labelframe .tabbar.nopts.opts -text "General options"
|
||||||
grid .tabbar.nopts.opts -column 0 -row 0 -sticky nw -padx 5 -pady 5 -columnspan 6
|
grid .tabbar.nopts.opts -column 0 -row 0 -sticky nw -padx 5 -pady 5 -columnspan 4
|
||||||
|
|
||||||
set row 0
|
set row 0
|
||||||
set col 0
|
set col 0
|
||||||
@@ -590,7 +591,7 @@ foreach opt $wa_opts {
|
|||||||
ttk::entry $txtid -width 8 -textvariable $boundvar
|
ttk::entry $txtid -width 8 -textvariable $boundvar
|
||||||
pack $lblid -side left -fill x -padx 5
|
pack $lblid -side left -fill x -padx 5
|
||||||
pack $txtid -side right
|
pack $txtid -side right
|
||||||
grid $elpref -column $col -row $row -sticky nwe
|
grid $elpref -column $col -row $row -sticky nwe -pady 5
|
||||||
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
||||||
set chkid ".tabbar.nopts.opts.chk$offs"
|
set chkid ".tabbar.nopts.opts.chk$offs"
|
||||||
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
||||||
@@ -608,7 +609,7 @@ foreach opt $wa_opts {
|
|||||||
grid $comboid -column $col -row $row -sticky news
|
grid $comboid -column $col -row $row -sticky news
|
||||||
}
|
}
|
||||||
incr col
|
incr col
|
||||||
if {$col > 4} {
|
if {$col > 3} {
|
||||||
set col 0
|
set col 0
|
||||||
incr row
|
incr row
|
||||||
}
|
}
|
||||||
@@ -633,25 +634,25 @@ foreach weap $wa_weapons {
|
|||||||
set boundvar_prob "wsc_data($proboffs)"
|
set boundvar_prob "wsc_data($proboffs)"
|
||||||
set groupid ".tabbar.weap.$offs"
|
set groupid ".tabbar.weap.$offs"
|
||||||
ttk::labelframe $groupid -text $wname -labelanchor nw
|
ttk::labelframe $groupid -text $wname -labelanchor nw
|
||||||
ttk::label "$groupid.ammolbl" -text "Ammo"
|
ttk::label "$groupid.ammolbl" -text "A"
|
||||||
ttk::entry "$groupid.ammotxt" -textvariable $boundvar_ammo -width 4
|
ttk::entry "$groupid.ammotxt" -textvariable $boundvar_ammo -width 4
|
||||||
grid "$groupid.ammolbl" -column 0 -row 0 -sticky nsw
|
grid "$groupid.ammolbl" -column 0 -row 0 -sticky nsw
|
||||||
grid "$groupid.ammotxt" -column 1 -row 0 -sticky nw
|
grid "$groupid.ammotxt" -column 1 -row 0 -sticky nw
|
||||||
ttk::label "$groupid.powerlbl" -text "Power"
|
ttk::label "$groupid.powerlbl" -text "P"
|
||||||
ttk::entry "$groupid.powertxt" -textvariable $boundvar_power -width 4
|
ttk::entry "$groupid.powertxt" -textvariable $boundvar_power -width 4
|
||||||
grid "$groupid.powerlbl" -column 0 -row 1 -sticky nsw
|
grid "$groupid.powerlbl" -column 2 -row 0 -sticky nsw
|
||||||
grid "$groupid.powertxt" -column 1 -row 1 -sticky nw
|
grid "$groupid.powertxt" -column 3 -row 0 -sticky nw
|
||||||
ttk::label "$groupid.delaylbl" -text "Delay"
|
ttk::label "$groupid.delaylbl" -text "D"
|
||||||
ttk::entry "$groupid.delaytxt" -textvariable $boundvar_delay -width 4
|
ttk::entry "$groupid.delaytxt" -textvariable $boundvar_delay -width 4
|
||||||
grid "$groupid.delaylbl" -column 0 -row 2 -sticky nsw
|
grid "$groupid.delaylbl" -column 4 -row 0 -sticky nsw
|
||||||
grid "$groupid.delaytxt" -column 1 -row 2 -sticky nw
|
grid "$groupid.delaytxt" -column 5 -row 0 -sticky nw
|
||||||
ttk::label "$groupid.problbl" -text "Probability"
|
ttk::label "$groupid.problbl" -text "Pr"
|
||||||
ttk::entry "$groupid.probtxt" -textvariable $boundvar_prob -width 4
|
ttk::entry "$groupid.probtxt" -textvariable $boundvar_prob -width 4
|
||||||
grid "$groupid.problbl" -column 0 -row 3 -sticky nsw
|
grid "$groupid.problbl" -column 6 -row 0 -sticky nsw
|
||||||
grid "$groupid.probtxt" -column 1 -row 3 -sticky nw
|
grid "$groupid.probtxt" -column 7 -row 0 -sticky nw
|
||||||
grid $groupid -column $col -row $row -sticky news -padx 5 -pady 3
|
grid $groupid -column $col -row $row -sticky news -padx 5 -pady 3
|
||||||
incr col
|
incr col
|
||||||
if {$col > 10} {
|
if {$col > 4} {
|
||||||
set col 0
|
set col 0
|
||||||
incr row
|
incr row
|
||||||
}
|
}
|
||||||
@@ -661,15 +662,14 @@ foreach weap $wa_weapons {
|
|||||||
ttk::frame .tabbar.extopts
|
ttk::frame .tabbar.extopts
|
||||||
.tabbar add .tabbar.extopts -text "Extended options (v3)"
|
.tabbar add .tabbar.extopts -text "Extended options (v3)"
|
||||||
|
|
||||||
# Extended option checkboxes in the first tab
|
# Second extended options tabframe
|
||||||
set eflpref ".tabbar.nopts.eflags"
|
ttk::frame .tabbar.extflags
|
||||||
ttk::labelframe $eflpref -text "Extended option flags (v3)"
|
.tabbar add .tabbar.extflags -text "Extended option flags (v3)"
|
||||||
grid $eflpref -row 1 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 8
|
|
||||||
|
|
||||||
# Extended option textboxes in the first tab
|
# Extended option textboxes in the first tab
|
||||||
set etpref ".tabbar.nopts.etxts"
|
set etpref ".tabbar.nopts.etxts"
|
||||||
ttk::labelframe $etpref -text "Extended option parameters (v3)"
|
ttk::labelframe $etpref -text "Extended option parameters (v3)"
|
||||||
grid $etpref -row 2 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 8
|
grid $etpref -row 2 -column 0 -sticky nw -padx 5 -pady 5 -columnspan 5
|
||||||
|
|
||||||
set row 0
|
set row 0
|
||||||
set col 0
|
set col 0
|
||||||
@@ -693,18 +693,18 @@ foreach opt $wa_ext_opts {
|
|||||||
ttk::entry $txtid -width 8 -textvariable $boundvar
|
ttk::entry $txtid -width 8 -textvariable $boundvar
|
||||||
pack $lblid -side left -fill x -padx 5
|
pack $lblid -side left -fill x -padx 5
|
||||||
pack $txtid -side right
|
pack $txtid -side right
|
||||||
grid $elpref -column $txtcol -row $txtrow -sticky nwe
|
grid $elpref -column $txtcol -row $txtrow -sticky nwe -pady 5
|
||||||
incr txtcol
|
incr txtcol
|
||||||
if {$txtcol > 5} {
|
if {$txtcol > 4} {
|
||||||
set txtcol 0
|
set txtcol 0
|
||||||
incr txtrow
|
incr txtrow
|
||||||
}
|
}
|
||||||
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
} elseif {([lindex $valopt 0] eq "bool")} { # create a checkbox entry
|
||||||
set chkid ".tabbar.nopts.eflags.chk$offs"
|
set chkid ".tabbar.extflags.chk$offs"
|
||||||
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
ttk::checkbutton $chkid -text $name -variable $boundvar -onvalue 1 -offvalue 0
|
||||||
grid $chkid -column $chkcol -row $chkrow -sticky nw
|
grid $chkid -column $chkcol -row $chkrow -sticky nw
|
||||||
incr chkcol
|
incr chkcol
|
||||||
if {$chkcol > 4} {
|
if {$chkcol > 3} {
|
||||||
set chkcol 0
|
set chkcol 0
|
||||||
incr chkrow
|
incr chkrow
|
||||||
}
|
}
|
||||||
@@ -720,7 +720,7 @@ foreach opt $wa_ext_opts {
|
|||||||
}
|
}
|
||||||
grid $comboid -column $col -row $row -sticky news -padx 5 -pady 3
|
grid $comboid -column $col -row $row -sticky news -padx 5 -pady 3
|
||||||
incr col
|
incr col
|
||||||
if {$col > 5} {
|
if {$col > 4} {
|
||||||
set col 0
|
set col 0
|
||||||
incr row
|
incr row
|
||||||
}
|
}
|
||||||
@@ -729,7 +729,7 @@ foreach opt $wa_ext_opts {
|
|||||||
|
|
||||||
# right container of the first tab
|
# right container of the first tab
|
||||||
ttk::frame .tabbar.nopts.right
|
ttk::frame .tabbar.nopts.right
|
||||||
grid .tabbar.nopts.right -column 6 -row 0 -sticky ne
|
grid .tabbar.nopts.right -column 4 -row 0 -sticky nwe
|
||||||
|
|
||||||
# Mines and barrels calc
|
# Mines and barrels calc
|
||||||
set hcalc_mines 0
|
set hcalc_mines 0
|
||||||
@@ -740,11 +740,11 @@ ttk::labelframe $calcpref -text "Mines & Barrels Calculator"
|
|||||||
grid $calcpref -column 0 -row 0 -sticky nw -padx 5 -pady 5
|
grid $calcpref -column 0 -row 0 -sticky nw -padx 5 -pady 5
|
||||||
ttk::label "$calcpref.minelbl" -text Mines
|
ttk::label "$calcpref.minelbl" -text Mines
|
||||||
ttk::entry "$calcpref.minetxt" -width 3 -textvariable hcalc_mines
|
ttk::entry "$calcpref.minetxt" -width 3 -textvariable hcalc_mines
|
||||||
grid $calcpref.minelbl -column 0 -row 0 -sticky nw -padx 5 -pady 5
|
grid $calcpref.minelbl -column 0 -row 0 -sticky nsw -padx 5 -pady 5
|
||||||
grid $calcpref.minetxt -column 1 -row 0 -sticky nw -padx 5 -pady 5
|
grid $calcpref.minetxt -column 1 -row 0 -sticky nw -padx 5 -pady 5
|
||||||
ttk::label "$calcpref.barrlbl" -text Barrels
|
ttk::label "$calcpref.barrlbl" -text Barrels
|
||||||
ttk::entry "$calcpref.barrtxt" -width 3 -textvariable hcalc_barrels
|
ttk::entry "$calcpref.barrtxt" -width 3 -textvariable hcalc_barrels
|
||||||
grid $calcpref.barrlbl -column 0 -row 1 -sticky nw -padx 5 -pady 5
|
grid $calcpref.barrlbl -column 0 -row 1 -sticky nsw -padx 5 -pady 5
|
||||||
grid $calcpref.barrtxt -column 1 -row 1 -sticky nw -padx 5 -pady 5
|
grid $calcpref.barrtxt -column 1 -row 1 -sticky nw -padx 5 -pady 5
|
||||||
ttk::button "$calcpref.reset" -text Reset -command {
|
ttk::button "$calcpref.reset" -text Reset -command {
|
||||||
set hcalc_mines 0
|
set hcalc_mines 0
|
||||||
@@ -840,16 +840,19 @@ ttk::button "$calcpref.docalc" -text Calculate -command {
|
|||||||
}
|
}
|
||||||
grid $calcpref.docalc -column 2 -row 2 -sticky nw -padx 5 -pady 5
|
grid $calcpref.docalc -column 2 -row 2 -sticky nw -padx 5 -pady 5
|
||||||
ttk::label "$calcpref.resultlbl" -text "Result:"
|
ttk::label "$calcpref.resultlbl" -text "Result:"
|
||||||
grid $calcpref.resultlbl -column 0 -row 2 -sticky nw -padx 5 -pady 5
|
grid $calcpref.resultlbl -column 0 -row 2 -sticky nsw -padx 5 -pady 5
|
||||||
ttk::label "$calcpref.result" -textvariable hcalc_result
|
ttk::label "$calcpref.result" -textvariable hcalc_result
|
||||||
grid $calcpref.result -column 1 -row 2 -sticky nw -padx 5 -pady 5
|
grid $calcpref.result -column 1 -row 2 -sticky nsw -padx 5 -pady 5
|
||||||
|
|
||||||
# Version overrider
|
# Version overrider
|
||||||
set verpref ".tabbar.nopts.right.vers"
|
set verpref ".tabbar.nopts.right.vers"
|
||||||
ttk::labelframe $verpref -text "Version converter"
|
ttk::labelframe $verpref -text "Version converter"
|
||||||
ttk::label "$verpref.verlbl" -text "Format version"
|
set irow 0
|
||||||
ttk::entry "$verpref.vertxt" -width 1 -textvariable wsc_data(version)
|
set vnames {{} {Version 1 (45 weapons)} {Version 2 (64 weapons)} {Version 3 (extended)}}
|
||||||
grid $verpref.verlbl -column 0 -row 1 -sticky nws -padx 5 -pady 5
|
foreach v {1 2 3} {
|
||||||
grid $verpref.vertxt -column 1 -row 1 -sticky nw -padx 5 -pady 5
|
set rbid [string cat $verpref ".opt" $v]
|
||||||
grid $verpref -column 0 -row 1 -sticky nw -padx 5 -pady 5
|
ttk::radiobutton $rbid -variable wsc_data(version) -text [lindex $vnames $v] -value $v
|
||||||
|
grid $rbid -column 0 -row $irow -sticky nsw
|
||||||
|
incr irow
|
||||||
|
}
|
||||||
|
grid $verpref -row 1 -column 0 -sticky nswe -padx 5
|
||||||
|
|||||||
Reference in New Issue
Block a user