I'm getting start to learn about miniwindows...than I have a question about this, the code posted below
Why there is no change without turn on the trace function?
is there anything missing? Thanks.
--------------------------------------
<aliases>
<alias
match="win_cre"
enabled="y"
send_to="12"
sequence="100"
>
<send>win = "test_" .. GetPluginID ()
WindowCreate (win, 0, 0, 200, 200, miniwin.pos_center_all, 0, ColourNameToRGB("white")) -- create window
-- Grid
for i = 1, math.max (WindowInfo (win, 3), WindowInfo (win, 4)) / 10 do
WindowLine (win, i * 10, 0, i * 10, WindowInfo (win, 4), 0xC0C0C0, miniwin.pen_solid, 1)
WindowLine (win, 0, i * 10, WindowInfo (win, 3), i * 10, 0xC0C0C0, miniwin.pen_solid, 1)
end -- for
--[button hot spot]
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("green")) -- filled
function mouseover (flags, hotspot_id)
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("red")) -- filled
return 0 -- needed for some languages
end -- mouseover
function cancelmouseover (flags, hotspot_id)
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("green")) -- filled
return 0 -- needed for some languages
end -- cancelmouseover
function mousedown (flags, hotspot_id)
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("black")) -- filled
return 0 -- needed for some languages
end -- mousedown
function cancelmousedown (flags, hotspot_id)
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("green")) -- filled
return 0 -- needed for some languages
end -- cancelmousdown
function mouseup (flags, hotspot_id)
WindowRectOp (win, miniwin.rect_fill, 50, 50, 100, 100,
ColourNameToRGB("red")) -- filled
return 0 -- needed for some languages
end -- mouseup
WindowAddHotspot(win, "hs1",
50, 50, 100, 100, -- rectangle
"mouseover",
"cancelmouseover",
"mousedown",
"cancelmousedown",
"mouseup",
"Click here to be healed", -- tooltip text
miniwin.cursor_hand, 0) -- hand cursor
-- [Display the window]
WindowShow (win , true)</send>
</alias>
</aliases>
|