Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local myButton = Button({
- x = 5000, // X coordinate
- y = 5000, // Y coordinate
- w = 1000, // Width
- y = 1000, // Texture
- texture = "LETTERS.TGA"});
- void myButton.visible(bool);
- bool myButton.isVisible()
- void myButton.setTexture(string) // Set new texture
- void myButton.setPosition(int x, int y)
- void myButton.setSize(int w, int h)
- void myButton.setAlpha(int alpha)
- int myButton.getAlpha()
- table myButton.getParams()
- //
- This function returns table with button params in original format (when you create it). Like
- local p = myButton.getParams();
- p.x - X coordinate
- p.y - Y coordinate
- p.w - width etc.
- //
- void myButton.access(bool) // Allows player click on it
- bool myButton.getAccess()
- void myButton.top() // Sets button to front of the screen
- bool myButton.getActive() // Returns true/false depends on player's cursor position
- void myButton.connect(Window) // Connect button to the window (it will be move with it)
- void myButton.disconnect()
- local myWindow = Window({
- x = 5000, // X coordinate
- y = 5000, // Y coordinate
- w = 1000, // Width
- y = 1000, // Texture
- texture = "MENU_INGAME.TGA"});
- All functions same as for buttons, but there 2 more
- void myWindow.setMoving(bool) // Allows move window with cursor
- bool myWindow.getMoving()
- local myText = Text({
- text = "Hello",
- x = 6000, // X coordinate
- y = 6000, // Y coordinate
- r = 255, // Color
- g = 255,
- b = 255,
- font = "Font_Old_10_White_hi.TGA"});
- // This text splits to multi-string text with "&" symbol. For example
- text = "Hello!& My name is Osmith"
- will be shown
- Hello!
- My name is Osmith
- //
- void myText.visible(bool)
- bool myText.isVisible()
- void myText.setText(string)
- void myText.setLineText(int line, string text) // Lines counting starts from 0
- void myText.setFont(string)
- void myText.setLineFont(int line, string font)
- void myText.setColor(int r, int g, int b)
- void myText.setLineColor(int line, int r, int g, int b)
- void myText.setPosition(int x, int y)
- void myText.setAlpha(int alpha)
- table myText.getParams() // Works same as with buttons/windows
- void myText.setAccess(bool)
- bool myText.getAccess()
- bool myText.getActive() // Returns true/false depending on if cursor on ANY line of the text
- bool myText.getLineActive(int line) // Returns true/false depending on if cursor on THIS line of the text
- int myText.active() // Returns active line (same as getActive() and getLineActive())
- void myText.top()
- void myText.connect(Window)
- void myText.disconnect()
- local myInput = Input({
- input = {x = 3797, y = 3688, r = 255, g = 255, b = 255, text = ""},
- note = {r = 255, g = 255, b = 255, text = ""},
- background = {x = 3737, y = 3602, w = 1486, h = 339, texture = "LOG_PAPER.TGA"},
- pass = false,
- len = 16,
- maxLen = 30});
- //
- Input - main input field
- Note - text shows when input field is empty
- Background - thats clear
- pass - password mode, when text hides with # symbols
- len - VISIBLE length of the text. When its reached, text will be scrolled
- maxLen - MAX length of the text. Whe its reached, you cant input any symbol more
- //
- void myInput.visible(bool)
- bool myInput.isVisible()
- void myInput.open()
- void myInput.close()
- bool myInput.getOpen()
- void myInput.setPass(bool) // Set password mode
- string myInput.get() // Returns text from the field
- void myInput.setText(string)
- void myInput.setColor(int r, int g, int b)
- void myInput.setNoteText(string)
- void myInput.setNoteColor(int r, int g, int b)
- void myInput.setPosition(int x, int y, int bX, int bY)
- //
- x,y - position of the input field
- bX,bY - position of the background
- //
- void myInput.setSize(w,h) // For background
- table myInput.getParams()
- // Works same. So if you want get position, you need
- local p = myInput.getParams();
- local posX = p.input.x;
- local posY = p.input.y;
- etc.
- local passMode = p.pass;
- local noteText = p.inputNote.text;
- //
- void myInput.access(bool)
- bool myInput.getAccess()
- void myInput.connect(Window)
- void myInput.disconnect()
- void myInput.top()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement