Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TextBox and Font Routines - Beta Release!
#1
Download .rar (7.4kb):

http://fileanchor.com/27340-d

Setup:


Well, I couldn't make a big .a out of this and still keep the customizabilty I wanted ATM. That won't be for a while Big Grin. You just download and compile the text_box_test.bas, and fool around for now.


Q. What is This?


A. "This" is my project thread for a TextBox and Font Routine thing I made. Basically, you can make your own TextBox drawing routine using the variables you are given, or your own Font Drawing Routine using the variables you are given.

It's pretty neat.

Q. Why do I have to make my own!?

A. Stfu n00b. I have two fricken textboxes in there for you to use already, and I have one fricken standard font so quit bitchin'.

Q. Can I have a Code Example?

A. Let's find out:

Code:
'Start the Main Program:
    Screenres 640, 480, 32

'Create the Box and Font as Their SUB's type:
    dim shared DrawTextBox as DrawTextBox_Type
    dim shared DrawFont as DrawFont_Type

    'Choose the textbox style:
    DrawTextBox = @Standard_textbox 'Comment xor = 1 please
    'DrawTextBox = @Dotted_Textbox 'Comment xor = 1 please

    'Choose the Font routine:
    DrawFont = @Draw_Standard_Font
    
    dim MyFont as font
    MyFont = Create_Font(8, 8, 128, "Fonts/Default_Font.bmp")

'Make a TextBox:
    DrawTextBox(160, 120, 260, 100, rgb(35, 35, 135))
    
'Make Font on The Textbox:
    DrawFont(160, 120, 260, 100, "Hello!  What's up?  Not much is happening here.  Just testing my font stuff...", MyFont, 50)
    
'Destroy the Font at the Program's end:
    Destroy_Font myfont

sleep

Q. Why are there errors sometimes?

A. There shouldn't be. If there's an error, it's either: FB's fault, lack of features right now, or your fault. I can be blamed for all of those I guess, because nothing's really documented. Report any errors to me though, if you think there is one.

Q. Me too.

Download .rar (7.4kb):

http://fileanchor.com/27340-d
Reply


Messages In This Thread
TextBox and Font Routines - Beta Release! - by TheAdventMaster - 05-23-2006, 02:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)