コード例 #1
0
ファイル: guicontrol.cpp プロジェクト: Cheeseness/ags
GUIObject *GetGUIControlAtLocation(int xx, int yy) {
    int guinum = GetGUIAt(xx, yy);
    if (guinum == -1)
        return NULL;

    multiply_up_coordinates(&xx, &yy);

    int oldmousex = mousex, oldmousey = mousey;
    mousex = xx - guis[guinum].x;
    mousey = yy - guis[guinum].y;
    int toret = guis[guinum].find_object_under_mouse(0, false);
    mousex = oldmousex;
    mousey = oldmousey;
    if (toret < 0)
        return NULL;

    GlobalReturnValue.SetDynamicObject(guis[guinum].objs[toret], &ccDynamicGUIObject);
    return guis[guinum].objs[toret];
}
コード例 #2
0
/* *** SCRIPT SYMBOL: [GUI] GUI::GetAtScreenXY^2 *** */
ScriptGUI *GetGUIAtLocation(int xx, int yy) {
  int guiid = GetGUIAt(xx, yy);
  if (guiid < 0)
    return NULL;
  return &scrGui[guiid];
}