GUI question.....
GUI question.....
Hi how would you load a loading bar control and also the game's main menu I want to display a 3d model but like manymodels to make up a one whole looking.
like 25 3d models when the gamer saves their work ect progress ect the 3d model should show the progress like one big group of models that have 3d models on them like terrain with homes one them.
I want to do somehing like that in the game menu anc make the 3d models clickable like to load the game ect.
like 25 3d models when the gamer saves their work ect progress ect the 3d model should show the progress like one big group of models that have 3d models on them like terrain with homes one them.
I want to do somehing like that in the game menu anc make the 3d models clickable like to load the game ect.
Hi I started making a script, a gui one type, I am trying to display an quit button.
here is my
code:
#include <iostream>
#include <stdlib.h>
#include <irrlicht.h>
#include <IGUIEnvironment.h>
using namespace std;
using namespace irr;
using namespace gui;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
#pragma comment(lib, "Irrlicht.lib")
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
IrrlichtDevice *device = 0;
s32 cnt = 0;
IGUIListBox* listbox = 0;
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
if (id == 101)
{
device->closeDevice();
return true;
}
env->addButton(rect<s32>(10,210,100,240), 0, 101, L"Quit");
Is that right so far???
The c++ compiler is giving me lot's of error's.
I really need help understanding the structure to make a gui menu with buttons ect.
I looked at the tut on the tut page of the site and also looked into the api but don't fully understand what need's to be called before the other's ect, basicly how to structure the script to make the element that I am trying to do meaning the rules ect.
here is my
code:
#include <iostream>
#include <stdlib.h>
#include <irrlicht.h>
#include <IGUIEnvironment.h>
using namespace std;
using namespace irr;
using namespace gui;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
#pragma comment(lib, "Irrlicht.lib")
int main(int argc, char *argv[])
{
system("PAUSE");
return 0;
}
IrrlichtDevice *device = 0;
s32 cnt = 0;
IGUIListBox* listbox = 0;
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.EventType == EET_GUI_EVENT)
{
s32 id = event.GUIEvent.Caller->getID();
IGUIEnvironment* env = device->getGUIEnvironment();
switch(event.GUIEvent.EventType)
{
case EGET_BUTTON_CLICKED:
if (id == 101)
{
device->closeDevice();
return true;
}
env->addButton(rect<s32>(10,210,100,240), 0, 101, L"Quit");
Is that right so far???
The c++ compiler is giving me lot's of error's.
I really need help understanding the structure to make a gui menu with buttons ect.
I looked at the tut on the tut page of the site and also looked into the api but don't fully understand what need's to be called before the other's ect, basicly how to structure the script to make the element that I am trying to do meaning the rules ect.
There are so many things wrong with that code.... you don't know C++ very well?
Try copying all the code from an example, compiling, and recompiling every time you make a change. That way you'll know when you've done something wrong.
You need to make your questions a little clearer. Its hard to understand what you are asking at times... you use the word etcetera far too much...
Try copying all the code from an example, compiling, and recompiling every time you make a change. That way you'll know when you've done something wrong.
You need to make your questions a little clearer. Its hard to understand what you are asking at times... you use the word etcetera far too much...
I am using dev c++ for my scripts, and I copied and pasted example codeing and dosen't work, it gives me alot of erros so I made that script gavve me errors and mokeyed around with it , then got no errors but nothing happenes only a console pop's up asking to press any button and so Idid and then the console closes. I got the compiler setup properly,
In the project I right clicked and clicked project options where their has a tab button for dir ect one for libaries and one for include files and one for source file.
So I put the include dir adress for the include dir in irrlicht engine,
When I run some other exaple codes it say's can't find dir or file does not exist.
I even tried the example code from the tutorial for gui interfaces ect.
In the project I right clicked and clicked project options where their has a tab button for dir ect one for libaries and one for include files and one for source file.
So I put the include dir adress for the include dir in irrlicht engine,
When I run some other exaple codes it say's can't find dir or file does not exist.
I even tried the example code from the tutorial for gui interfaces ect.
If you can't compile any one of the examples you don't have your project set up right. Follow this tutorial: http://irrlicht.sourceforge.net/tut_devcpp.html
Keep in mind that you have to set up EVERY project, its not a do it once and never again action.
Keep in mind that you have to set up EVERY project, its not a do it once and never again action.
Can someone explain to me how I would go about's on making a menu for my game but able to change the sking like the art of the gui with my own art ect??
I have been reading the api, and seen the gui classes ect butI don't know in coding how to setup up the gui, like how to call it, do I first call
the class for the gui element, how would I go abouts structure .
I have been reading the api, and seen the gui classes ect butI don't know in coding how to setup up the gui, like how to call it, do I first call
the class for the gui element, how would I go abouts structure .
Okay.. I don't know why I have such a hard time understanding you -.- I think you're asking about skinning.hockey97 wrote:Can someone explain to me how I would go about's on making a menu for my game but able to change the sking like the art of the gui with my own art ect??
I have been reading the api, and seen the gui classes ect butI don't know in coding how to setup up the gui, like how to call it, do I first call
the class for the gui element, how would I go abouts structure .
This tutorial http://irrlicht.sourceforge.net/tut005.html (tutorial 5) shows you how to grab your skin and change your font. The API has things like setColor for you to change the colors of everything documented http://irrlicht.sourceforge.net/docu/cl ... _skin.html
You can't really change the shape or appearance of anything other than its colors without using images.
I am asking How do I change the art of the game menu, in script????
Like I seen the api for the gui , I seen in their about skinning saying
it is used for changing the looks of the gui, I don't know if that means like
the size of the window or menu?? I don't fully know what that is used for??
What I am trying to do is to take images and display them in the
backround of the menu and also use my images I made for the buttons.
I want to use textures or just my images to be used in the game menu.
Like I seen the api for the gui , I seen in their about skinning saying
it is used for changing the looks of the gui, I don't know if that means like
the size of the window or menu?? I don't fully know what that is used for??
What I am trying to do is to take images and display them in the
backround of the menu and also use my images I made for the buttons.
I want to use textures or just my images to be used in the game menu.
You're lucky, http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=21790
My company: https://kloena.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com
My profile: https://zhieng.com
My co-working space: https://deskspace.info
My game engine: https://kemena3d.com