scripting:samples:functionbuilding
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:samples:functionbuilding [2020/02/12 22:40] – mit | scripting:samples:functionbuilding [2025/05/28 18:58] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 10: | Line 10: | ||
| $textX = 200 | $textX = 200 | ||
| $subtextWidth = 300 | $subtextWidth = 300 | ||
| + | // Set root path for all the menu images.. | ||
| + | osdadditem(HTTPSET, | ||
| while( $aConstructionList[$index+1] >= 0 ) | while( $aConstructionList[$index+1] >= 0 ) | ||
| Line 22: | Line 24: | ||
| $matReqd = sysGetConstructionMaterialsAmount( $buildingType ) | $matReqd = sysGetConstructionMaterialsAmount( $buildingType ) | ||
| $price = sysGetSecondaryConstructionPrice( $buildingType ) | $price = sysGetSecondaryConstructionPrice( $buildingType ) | ||
| - | osdaddat(IMAGE, $imageX, $lineY, 90, 90, " | + | osdadd(IMAGE, $imageX, $lineY, 90, 90, " |
| $textY = $lineY | $textY = $lineY | ||
| - | osdaddat(BIGTEXT, $textX, $textY, 0, 0, "", | + | osdadd(BIGTEXT, $textX, $textY, 0, 0, "", |
| $textY += 20 | $textY += 20 | ||
| $priceText = sysGetPriceText( $price ) | $priceText = sysGetPriceText( $price ) | ||
| - | osdaddat(SMALLTEXT, $textX, $textY, 0, 0, "", | + | osdadd(SMALLTEXT, $textX, $textY, 0, 0, "", |
| $textY += 15 | $textY += 15 | ||
| - | osdaddat(SMALLTEXT, $textX, $textY, 0, 0, "", | + | osdadd(SMALLTEXT, $textX, $textY, 0, 0, "", |
| $subtextY = $textY + 20 | $subtextY = $textY + 20 | ||
| - | osdaddat(FADEDSMALLTEXT, | + | osdadd(FADEDSMALLTEXT, |
| $lineY += 100 | $lineY += 100 | ||
| Line 55: | Line 57: | ||
| osdcreate(OSDWINDOW," | osdcreate(OSDWINDOW," | ||
| osdadditem(OSDMINHEIGHT, | osdadditem(OSDMINHEIGHT, | ||
| - | osdaddat(BIGTEXT, 0, 0, 600, 0, "", | + | osdadd(BIGTEXT, 0, 0, 600, 0, "", |
| ConstructionListOSD( $maConstructionListBuildHouses, | ConstructionListOSD( $maConstructionListBuildHouses, | ||
| - | osdaddat(EXITBUTTON, | + | osdadd(EXITBUTTON, |
| osdactivate() | osdactivate() | ||
| } | } | ||
scripting/samples/functionbuilding.1581547224.txt.gz · Last modified: (external edit)
