Doc external functions
Doc functions are used to control the document manager. They allow you to fine tune the display of maps, letters and books.
Doc_Create
Doc_Create
Creates a new instance of the document manager and returns its ID.
Return value
Returns the ID of the document manager instance.
Doc_CreateMap
Doc_CreateMap
Creates a new instance of the document manager with the arrow showing players position on the map and returns its ID.
Return value
Returns the ID of the document manager instance.
Doc_SetLevel
Doc_SetLevel
Set a world level to a map. This maps the texture of the document to the bounding box of the provided level.
Parameters
var int docID
- document manager IDvar string level
- name of the ZEN file
Doc_SetLevelCoords
Doc_SetLevelCoords
Warning
This function is only available in Gothic 2
Sets the map coordinates. This is used to map smaller portions of the world map to the document map to correctly show players position on the map.
Parameters
var int docID
- document manager IDvar int left
- left coordinatevar int top
- top coordinatevar int right
- right coordinatevar int bottom
- bottom coordinate
Example
Doc_SetFont
Doc_SetFont
Sets a font
to be used on a page
in a document with docID
. Can be called multiple times to display different lines with different fonts.
Parameters
var int docID
- document manager IDvar int page
- page index, if set to-1
, fonts will be applied to all pagesvar string font
- font to be used
Example
Doc_SetPages
Doc_SetPages
Sets the number of pages numOfPages
of the document.
Parameters
var int docID
- document manager IDvar int numOfPages
- number of pages
Doc_SetPage
Doc_SetPage
Set page
to have texture
as a background with scale
.
Parameters
var int docID
- document manager IDvar int page
- page index, if set to-1
, settings are applied to all pagesvar string texture
- texture of the backgroundvar int scale
- scale of the texture,TRUE
to scale the page,FALSE
to not scale
Doc_SetMargins
Doc_SetMargins
Sets text margins of the page
Parameters
var int docID
- document manager IDvar int page
- page index, if set to-1
, settings are applied to all pagesvar int left
- left marginvar int top
- top marginvar int right
- right marginvar int bottom
- bottom marginvar int pixels
-TRUE
to use pixels,FALSE
to use virtual coordinates
Warning
After a thorough examination of this external function in the decompiler, it looks like the function works in pixels only regardless of this parameter.
Example
Doc_PrintLine
Doc_PrintLine
Prints a line of text
(font is set using Doc_SetFont) onto the document with docID
, onto the page
. Does not split the text into multiple lines if they do not fit onto the page.
Parameters
var int docID
- document manager IDvar int page
- page indexvar string text
- text to be printed
Doc_PrintLines
Doc_PrintLines
Prints a line of text
(font is set using Doc_SetFont) onto the document with docID
, onto the page
. Splits the text into multiple lines if they do not fit onto the page.
Parameters
var int docID
- document manager IDvar int page
- page indexvar string text
- text to be printed
Example
Doc_Show
Doc_Show
Display the document using the document manager ID
Parameters
var int docID
- document manager ID
Externals with docu comments
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
|