Jump to content

Kotov72rus

Members
  • Posts

    25
  • Joined

  • Last visited

Profile Information

  • Location
    Russia

Kotov72rus's Achievements

Newbie

Newbie (1/14)

5

Reputation

  1. Hi, How to replace the standard window, on to any other window or object ?. For rendering engine.
  2. Cursor in the middle because you are using the function: MouseMove(X,Y); Try to do a background check: bool showMenu; //Loop if(showMenu){ ShowMouse(); } else { HideMouse(); MouseMove(X,Y); } Show cursor: ShowMouse();
  3. TSurface surf = GetSurface(TMesh mesh, long index=1); PaintSurface(surf, TMaterial material=NULL) or PaintSurface(GetSurface(TMesh mesh, long index=1), TMaterial material=NULL); http://www.leadwerks...ference/meshes/ http://www.leadwerks...rence/surfaces/
  4. Really very interesting, comfortable and functional. Thank you.
  5. The question is solved Class: void TempFunction(){} void (*TempCallback)(); void onClick(void (*callback)()); void TGuiButton::Create(...) { TempCallback = TempFunction; } void TGuiButton::onClick(void (*callback)()) { TempCallback = callback; //TempCallback(); } User function: void TestClick() { Terminate(); } .onClick(&TestClick);
  6. Please help me with an example, to replace the function of the class - the user function. There is a class: class TGuiButton { private: int x,y,width,height; string title; int MouseIn(TVec2 start, TVec2 dimensions); bool IsClick; bool buf1,buf2; TEntity buf; void * TempFunction; //To call the user function. public: string SoundEnter; string SoundLeave; string SoundClick; string TextureUp; string TextureHover; string TextureDown; bool Sounds; bool Enabled; bool Visible; void Create(int _x, int _y, int _width, int _height, string _title); void onClick(void *callback); //Function for replace. void Update(); void Delete(); }; .... void TGuiButton::onClick(void *callback) { //????? } .... And call a user function with TempFunction;
  7. Why does not work this method? Without checking the name, works with all objects, that are currently in contact with the object. void _stdcall EntityCollisionCallback( TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed ) { if(GetEntityKey(entity1,"name")=="test_box") { HideEntity(entity1); } } //Entity box SetEntityKey(test_box, "name","test_box"); //Controller SetEntityKey(Controller, "name","controller"); SetEntityCallback(Controller,(byte*)EntityCollisionCallback,ENTITYCALLBACK_COLLISION);
  8. Hi, there is a character "name=controller" and the object box "name=box_test". How to determine the collision with box?, and then perform the desired action.
  9. This font ? http://xfont.ru/font/%D1%88%D1%80%D0%B8%D1%84%D1%82_StudioRegular_8644.htm Click to download button СКАЧАТЬ
  10. Do not judge me harshly , this is my first experience with C++
  11. I used this code: //Animation //Jumping jump = 0.0; isJump = false; if(KeyHit(KEY_SPACE)) { if (!ControllerAirborne(Controller)) { jump=8.0; isJump = true; } } if(KeyDown(KEY_W)) { sequence = 2; Angle = -180; } else if(KeyDown(KEY_S)) { sequence = 2; Angle = -0; } else if(KeyDown(KEY_A)) { sequence = 2; Angle = -90; } else if(KeyDown(KEY_D)) { sequence = 2; Angle = -260; } else { sequence = 1; } // if(KeyDown(KEY_W) && KeyDown(KEY_A)) { Angle = -140; } else if(KeyDown(KEY_W) && KeyDown(KEY_D)) { Angle = 140; } else if(KeyDown(KEY_S) && KeyDown(KEY_A)) { Angle = -40; } else if(KeyDown(KEY_S) && KeyDown(KEY_D)) { Angle = 40; } //Run if(KeyDown(KEY_W) && KeyDown(KEY_LSHIFT) || KeyDown(KEY_RSHIFT)) { sequence = 3; speed = 6; } else if(KeyDown(KEY_S) && KeyDown(KEY_LSHIFT) || KeyDown(KEY_RSHIFT)) { sequence = 3; speed = 6; } else if(KeyDown(KEY_A) && KeyDown(KEY_LSHIFT) || KeyDown(KEY_RSHIFT)) { sequence = 3; speed = 6; } else if(KeyDown(KEY_D) && KeyDown(KEY_LSHIFT) || KeyDown(KEY_RSHIFT)) { sequence = 3; speed = 6; } else { speed = 4; }
  12. Test Animation: http://youtu.be/fPZJuwmyNPI
×
×
  • Create New...