MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / setScrollbarValues

Method setScrollbarValues

game/ui/general/transactioncontrol.cpp:64–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void TransactionControl::setScrollbarValues()
65{
66 if (tradeState.getLeftIndex() == tradeState.getRightIndex())
67 {
68 scrollBar->setMinimum(0);
69 scrollBar->setMaximum(0);
70 scrollBar->setValue(0);
71 }
72 else
73 {
74 scrollBar->setMinimum(0);
75 scrollBar->setMaximum(tradeState.getLeftStock() + tradeState.getRightStock());
76 scrollBar->setValue(tradeState.getBalance());
77 }
78 updateValues();
79}
80
81void TransactionControl::setIndexLeft(int index)
82{

Callers 1

createControlMethod · 0.80

Calls 8

setMinimumMethod · 0.80
setMaximumMethod · 0.80
getLeftStockMethod · 0.80
getRightStockMethod · 0.80
getBalanceMethod · 0.80
getLeftIndexMethod · 0.45
getRightIndexMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected