On one end, it will display the total number of mods, but only a value of 0~9.. and Endo/Credits aren't being displayed once updated to the variable.
I've tried a number of ways to keep the total values updated constantly, but as it is I can't really go forward without figuring out how to properly display these variables in text.
Help appreciated!
Upon edit: It appears to be a text-wrap issue but I cannot discern why. With this positioning edit, I added in a counter for each type of mod added, and it appears to allow more than 9 now.. but once you reach the edges of some unknown barrier it will stop appearing.
Current progress (edited for positioning 4/30/17):
Code: Select all
setvar()
*Home::
MsgBox, 4, Calculations Script, Begin calculating Endo & Credit costs? (This will reset previous values)
IfMsgBox Yes
{
setvar()
pullgui()
} else {
SplashTextOn,60,, Cancelled.
Sleep, 1000
SplashTextOff
}
return
calctotals() {
global
totale := b3endo + b5endo + b10endo + s3endo + s5endo + s10endo + g3endo + g5endo + g10endo + p_endo
totalc := b3cred + b5cred + b10cred + s3cred + s5cred + s10cred + g3cred + g5cred + g10cred + p_cred
totalm := bm + sm + gm + pm + rm
GuiControl,,U1,Endo: %totale%
GuiControl,,U2,Credits: %totalc%
GuiControl,,U3, Bronze Mods: %bm% | Silver Mods: %sm% | Gold Mods: %gm%
GuiControl,,U4, Primed Mods: %pm% | Riven Mods: %rm% | Total Mods: %totalm%
}
return
pullgui() {
Gui, New, , Calculation Table
Gui, Add, Button, gB1 Section, Bronze Rank-3
Gui, Add, Button, gB2 ys, Bronze Rank-5
Gui, Add, Button, gB3 ys, Bronze Rank-10
Gui, Add, Button, gS1 xs Section, Silver Rank-3
Gui, Add, Button, gS2 ys, Silver Rank-5
Gui, Add, Button, gS3 ys, Silver Rank-10
Gui, Add, Button, gG1 xs Section, Gold Rank-3
Gui, Add, Button, gG2 ys, Gold Rank-5
Gui, Add, Button, gG3 ys, Gold Rank-10
Gui, Add, Button, gP1 xs Section, Primed
Gui, Add, Button, gR1 ys, Riven
Gui, Add, Button, gC1 xs Section, Close Calculator
Gui, Add, Text,vU1, Endo: 0
Gui, Add, Text,vU2, Credits: 0
Gui, Add, Text,vU3, Bronze Mods: 0 | Silver Mods: 0 | Gold Mods: 0
Gui, Add, Text,vU4 xs Section, Primed Mods: 0 | Riven Mods: 0 | Total Mods: 0
Gui, Show, w300 h245, Calculation Table
}
return
B1:
b3cred := b3cred + 3381
b3endo := b3endo + 70
bm := bm + 1
calctotals()
return
B2:
b5cred := b5cred + 14973
b5endo := b5endo + 310
bm := bm + 1
calctotals()
return
B3:
b10cred := b10cred + 494109
b10endo := b10endo + 10230
bm := bm + 1
calctotals()
return
S1:
s3cred := s3cred + 6762
s3endo := s3endo + 140
sm := sm + 1
calctotals()
return
S2:
s5cred := s5cred + 29946
s5endo := s5endo + 620
sm := sm + 1
calctotals()
return
S3:
s10cred := s10cred + 988218
s10endo := s10endo + 20460
sm := sm + 1
calctotals()
return
G1:
g3cred := g3cred + 10143
g3endo := g3endo + 210
gm := gm + 1
calctotals()
return
G2:
g5cred := g5cred + 44919
g5endo := g5endo + 930
gm := gm + 1
calctotals()
return
G3:
g10cred := g10cred + 1482327
g10endo := g10endo + 30690
gm := gm + 1
calctotals()
return
P1:
p_cred := p_cred + 1976436
p_endo := p_endo + 40920
pm := pm + 1
calctotals()
return
R1:
r_cred := r_cred + 369495
r_endo := r_endo + 7650
rm := rm + 1
calctotals()
return
C1:
Gui, Destroy
return
setvar() {
global
b3endo := 0
s3endo := 0
g3endo := 0
b5endo := 0
s5endo := 0
g5endo := 0
b10endo := 0
s10endo := 0
g10endo := 0
p_endo := 0
r_endo := 0
b3cred := 0
s3cred := 0
g3cred := 0
b5cred := 0
s5cred := 0
g5cred := 0
b10cred := 0
s10cred := 0
g10cred := 0
p_cred := 0
r_cred := 0
totale := 0
totalc := 0
totalm := 0
bm := 0
sm := 0
gm := 0
pm := 0
rm := 0
U1 := a
U2 := a
U3 := a
U4 := a
}
return