|
563 | 563 | --- </pre> |
564 | 564 | function setGauge(gaugeName, currentValue, maxValue, gaugeText) |
565 | 565 | assert(gaugesTable[gaugeName], "setGauge: no such gauge exists.") |
566 | | - assert(type(currentValue) == 'number', 'moveGauge: bad argument #2 type (expected number, got '..type(currentValue)..'!)') |
567 | | - assert(type(maxValue) == 'number', 'moveGauge: bad argument #3 type (expected number, got '..type(maxValue)..'!)') |
| 566 | + assert(type(currentValue) == 'number', 'setGauge: bad argument #2 type (expected number, got '..type(currentValue)..'!)') |
| 567 | + assert(type(maxValue) == 'number', 'setGauge: bad argument #3 type (expected number, got '..type(maxValue)..'!)') |
568 | 568 | local value = currentValue / maxValue |
569 | 569 | -- save new values in table |
570 | 570 | gaugesTable[gaugeName].value = value |
|
980 | 980 | --- <b><u>TODO</u></b> resizeGauge(gaugeName, width, height) |
981 | 981 | function resizeGauge(gaugeName, width, height) |
982 | 982 | assert(gaugesTable[gaugeName], "resizeGauge: no such gauge exists.") |
983 | | - assert(type(width) == 'number', 'moveGauge: bad argument #2 type (expected number, got '..type(width)..'!)') |
984 | | - assert(type(height) == 'number', 'moveGauge: bad argument #3 type (expected number, got '..type(height)..')') |
| 983 | + assert(type(width) == 'number', 'resizeGauge: bad argument #2 type (expected number, got '..type(width)..'!)') |
| 984 | + assert(type(height) == 'number', 'resizeGauge: bad argument #3 type (expected number, got '..type(height)..')') |
985 | 985 | resizeWindow(gaugeName .. "_back", width, height) |
986 | 986 | resizeWindow(gaugeName .. "_text", width, height) |
987 | 987 | -- save new values in table |
|
0 commit comments