Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: HIman on August 21, 2005, 04:00:59 PM
-
Greetings!
In an example applied to a cursor wme_demo,
I have created menu1.window and have inserted the program
WINDOW
{
NAME = "WINDOW"
IMAGE = "interface\menu\menu.bmp"
SCRIPT = "interface\menu\menu1.script"
MENU = TRUE
EDIT
{
NAME = "MyEditor"
;TEMPLATE = "templates\MyTemplate.editor"
; position and size (relative to the window position)
X = 100
Y = 100
WIDTH = 200
HEIGHT = 50
; editor state
VISIBLE = TRUE
DISABLED = FALSE
; text
TEXT = "My brand new editor"
; background
BACK = "ui_elements\win_inactive.image"
IMAGE = "interface\menu\menu1.sprite"
; fonts
FONT = "fonts\outline_white.font"
FONT_SELECTED = "fonts\outline_red.font"
; script
;SCRIPT = "path\menu1.script"
; cursor
;CURSOR = "path\beam.sprite"
; extended properties
PARENT_NOTIFY = TRUE
MAX_LENGTH = 100
FRAME_WIDTH = 2
CURSOR_BLINK_RATE
}
}
Preview gives out crach
Run game gives out crach
Example of component EDIT to take from the Documentation
What do I do not so?
HELP ???
-
Either remove the CURSOR_BLINK_RATE line or assign it a value (CURSOR_BLINK_RATE = 100)
-
Thanks, for a prompt reply,
in the documentation turns out not an exact example of the program for EDIT
But the problem was resolved not up to the end.
Game does not crash, but in the appeared menu
It is impossible to enter or insert anything through the buffer of an exchange.
Excuse for my English.
-
If quickly to click with a mousy on a window of the menu
That the text to enter it is possible but it appears hardly
And in heading of a window.
Excuse I communicate through the translator
-
Strange,
I have looked as is made in interface\system\savename.window
Also has repeated on the button in the basic menu of game and it works.
I insert the same piece into the menu which it is caused by the right pressing of a mousy object (there where to look, tell, take) does not work.
Who can tell to me why?
-
I am sorry, but I can't understand at all where is your problem. Maybe try to rephrase or include a small example. Using translator is not the best idea
since many words have completely different meaning and lack of grammar makes it really incomprehensible.
-
Ok,
I have followed an example wme_demo and in interface\menu\menu.window have inserted
EDIT
{
NAME = "desc"
BACK = "ui_elements\editor.image"
FONT = "fonts\outline_green.font"
FONT_SELECTED = "fonts\sserif_sel.font"
X = 0
Y = 140
WIDTH = 250
HEIGHT = 20
FRAME_WIDTH = 2
TEXT = ""
MAX_LENGTH = 100
PARENT_NOTIFY = TRUE
}
After start to insert the text it is not possible.
Why?
-
For the editor to receive keyboard input, the window must be in exclusive mode. To make it so, you'll have to modify game.script. Find the following line:
// and show the right-click menu
WinMenu.Visible = true;
and change it to:
// and show the right-click menu
WinMenu.Visible = true;
WinMenu.Exclusive = true;
-
Thanks Mnemonic
All works :D