Hi ! @DJBMASTER: it worked for me, even multiple times, but it seems that one can only drag it if one clicks in the lower right part of the panel ! here's the code i used :
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AcknexWrapper;
using System.Collections;
namespace game
{
class Program
{
static IEnumerable mouse()
{
BMAP arrow = EngFun.bmap_create("mouse.bmp");
EngVar.mouse_map = arrow;
EngVar.mouse_mode.IntValue = 2;
while (true)
{
EngVar.mouse_pos.x.FloatValue = EngVar.mouse_cursor.x.FloatValue;
EngVar.mouse_pos.y.FloatValue = EngVar.mouse_cursor.y.FloatValue;
yield return 1;
}
}
public static IEnumerable DragPanel()
{
Console.WriteLine("i was called !");
PANEL sender = EngVar.mouse_panel;
int startx = EngVar.mouse_cursor.x.IntValue - sender.pos_x.IntValue;
int starty = EngVar.mouse_cursor.y.IntValue - sender.pos_y.IntValue;
while (EngVar.mouse_left.IntValue == 1)
{
if (EngVar.mouse_moving.IntValue == 1)
{
sender.pos_x.IntValue = EngVar.mouse_cursor.x.IntValue - startx;
sender.pos_y.IntValue = EngVar.mouse_cursor.y.IntValue - starty;
}
yield return 1;
}
}
static IEnumerable MainMethod()
{
PANEL pnl = EngFun.pan_create("bmap = mouse.bmp;", (Var)1);
pnl.pos_x.IntValue = 0;
pnl.pos_y.IntValue = 0;
pnl.event_ = DragPanel;
pnl.SHOW = true;
yield return 1;
}
static void Main(string[] args)
{
EngFun.engine_open(null);
Scheduler.AddEventVoid(mouse);
Scheduler.StartScheduler(MainMethod);
}
}
}
Didn't knew that the panel event takes a Panel as Parameter, i will add that in the next version of the wrapper thanks !
@pararealist Ah, it seems i have forgotten to add an enum for ent_animate, i will fix that in the next version (which will be released quite soon) !