This wiki is out of date, use the continuation of this wiki instead

Delete text

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 18:17, 23 July 2007 (edit)
Rincewind (Talk | contribs)
(New Article)
← Previous diff
Current revision (23:35, 19 November 2007) (edit) (undo)
Sandman (Talk | contribs)
m
 
(3 intermediate revisions not shown.)
Line 3: Line 3:
==Definition== ==Definition==
-'''INT''' delete_text( <'''INT''' [[TextID]]> )+'''INT''' delete_text ( <'''INT''' TextID> )
-Deletes text from the screen.+Deletes a certain [[text]] from the screen.
== Parameters == == Parameters ==
{| {|
-| '''INT''' [[TextID]] || - Identifier of the text you want to delete. This identifier should have been appointed to a text earlier on.+| '''INT''' TextID || - [[TextID]] of the [[text]] to be deleted.
|} |}
== Returns == == Returns ==
-''<If someone knows, please edit!>''+'''INT''' : [[true]]
== Notes == == Notes ==
-Delete_text(all_text) or delete_text(0) deletes all text from the screen!+[[Delete_text]]([[ALL_TEXT]]) deletes all text from the screen.
- +
-== Errors ==+
-''<If someone knows, please edit!>''+
== Example == == Example ==
Line 25: Line 22:
Program test; Program test;
Global Global
- My_text;+ my_text;
Begin Begin
- My_text=write(0,320/2,200/2,4,"Press space to delete this.");+ my_text = write(0,320/2,200/2,4,"Press space to delete this.");
- Loop+ Repeat
- If (key(_space))+ if (key(_space))
- Delete_text(My_text);+ if(my_text>0)
- End+ delete_text(my_text);
 + my_text = 0;
 + end
 + end
Frame; Frame;
- End+ Until(key(_esc))
End End
</pre> </pre>
-Used in example: [[write]](), [[key]]()+Used in example: [[write]](), [[key]](), [[textID]]
This will result in something like:<br /> This will result in something like:<br />
[[Image:delete_text.jpg]] [[Image:delete_text.jpg]]

Current revision


Contents

[edit] Definition

INT delete_text ( <INT TextID> )

Deletes a certain text from the screen.

[edit] Parameters

INT TextID - TextID of the text to be deleted.

[edit] Returns

INT : true

[edit] Notes

Delete_text(ALL_TEXT) deletes all text from the screen.

[edit] Example

Program test;
Global
    my_text;
Begin
    my_text = write(0,320/2,200/2,4,"Press space to delete this.");
    Repeat
        if (key(_space))
            if(my_text>0)
                delete_text(my_text);
                my_text = 0;
            end
        end
        Frame;
    Until(key(_esc))
End

Used in example: write(), key(), textID

This will result in something like:
Image:delete_text.jpg

Personal tools