Clearify how hex_to_int expects a '0x' prefixed string. Provide a small hex_to_int example

(cherry picked from commit cebb38e0b3)
This commit is contained in:
lmp 2019-07-07 18:53:54 +02:00 committed by Rémi Verschelde
parent 417f223e63
commit f011721a6e
2 changed files with 4 additions and 17 deletions

View File

@ -385,7 +385,10 @@
<return type="int">
</return>
<description>
Converts a string containing a hexadecimal number into an integer.
Converts a string containing a hexadecimal number into an integer. Hexadecimal strings are expected to be prefixed with "[code]0x[/code]" otherwise [code]0[/code] is returned.
[codeblock]
print("0xff".hex_to_int()) # Print "255"
[/codeblock]
</description>
</method>
<method name="insert">

View File

@ -140,13 +140,6 @@
Returns [code]true[/code] if the size override is enabled. See [method set_size_override].
</description>
</method>
<method name="is_size_override_stretch_enabled" qualifiers="const">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if the size stretch override is enabled. See [method set_size_override_stretch].
</description>
</method>
<method name="set_attach_to_screen_rect">
<return type="void">
</return>
@ -174,15 +167,6 @@
Sets the size override of the viewport. If the [code]enable[/code] parameter is [code]true[/code] the override is used, otherwise it uses the default size. If the size parameter is [code](-1, -1)[/code], it won't update the size.
</description>
</method>
<method name="set_size_override_stretch">
<return type="void">
</return>
<argument index="0" name="enabled" type="bool">
</argument>
<description>
If [code]true[/code], the size override affects stretch as well.
</description>
</method>
<method name="unhandled_input">
<return type="void">
</return>