Search found 33 matches

by tBane
Sun Mar 03, 2024 10:11 pm
Forum: Beginners Help
Topic: Editable pathfile in Open Dialog Box
Replies: 6
Views: 2021

Re: Editable pathfile in Open Dialog Box

ok thanks for your help
by tBane
Sat Mar 02, 2024 5:57 pm
Forum: Beginners Help
Topic: Editable pathfile in Open Dialog Box
Replies: 6
Views: 2021

Re: Editable pathfile in Open Dialog Box

ok. now I use this code. Now I have this problem. I would like to save a new file using DialogBox. Now not save as a new file "../testmap.hexmap". if (event.EventType == irr::EET_KEY_INPUT_EVENT) { KeyIsDown[event.KeyInput.Key] = event.KeyInput.PressedDown; } // UPDATE if (openDialog == nu...
by tBane
Sat Mar 02, 2024 1:25 am
Forum: Beginners Help
Topic: Editable pathfile in Open Dialog Box
Replies: 6
Views: 2021

Re: Editable pathfile in Open Dialog Box

This is my eventReceiver. I don't know if I wrote it correctly bool MyEventReceiver::OnEvent(const SEvent& event) { if (event.EventType == EET_GUI_EVENT) { switch (event.GUIEvent.EventType) { case EGET_FILE_CHOOSE_DIALOG_CANCELLED: openDialog = nullptr; openDialogState = openDialogStates::none; ...
by tBane
Fri Mar 01, 2024 10:55 pm
Forum: Beginners Help
Topic: Editable pathfile in Open Dialog Box
Replies: 6
Views: 2021

Editable pathfile in Open Dialog Box

Hi!
I cant edit pathfile in Dialog Box in my program. What could be the cause of this?

Code: Select all

IGUIFileOpenDialog* dialog = (IGUIFileOpenDialog*)event.GUIEvent.Caller;
by tBane
Thu Feb 29, 2024 10:31 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Re: Select toolbar button or mesh from map

how to check in event the GUI has hover ?
by tBane
Thu Feb 29, 2024 5:56 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Re: Select toolbar button or mesh from map

when i use if(GUI->getHovered() == GUI->getRootGUIElement()), then window collisioning with cursor and no cant do anything. I don't understand why the GUIisHover() function works and the GUIisSelected bool doesn't work. if (!GUIisHover()) { highlightHexTiles(); if(mousePress) editHexTiles(); } if( !...
by tBane
Thu Feb 29, 2024 5:26 pm
Forum: Beginners Help
Topic: Handle the Open Dialog to save/load
Replies: 4
Views: 1761

Re: Handle the Open Dialog to save/load

Correctly: case EGET_MENU_ITEM_SELECTED: // main menu events { IGUIContextMenu* menu = (IGUIContextMenu*)event.GUIEvent.Caller; s32 id = menu->getItemCommandId(menu->getSelectedItem()); switch (id) { case GUI_CREATEWORLD: if (hexMap != nullptr) hexMap->destroy(); hexMap->createEmpty(40, 40); std::co...
by tBane
Thu Feb 29, 2024 5:11 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Re: Select toolbar button or mesh from map

Hello. I'm trying to rebuild the GUIisHover() function, which tells whether a GUI element has been selected, into a more substantive form, i.e. each button in the event will set the value of the GUIisSelected variable to inform the program about that the GUI element has been selected. However, despi...
by tBane
Wed Feb 28, 2024 7:37 pm
Forum: Beginners Help
Topic: Handle the Open Dialog to save/load
Replies: 4
Views: 1761

Re: Handle the Open Dialog to save/load

ok, I used this event. Now I cant manually write filename in dialog box. case EGET_FILE_SELECTED: { if (openDialogState == openDialogStates::load) { IGUIFileOpenDialog* dialog = (IGUIFileOpenDialog*)event.GUIEvent.Caller; io::path extension; core::getFileNameExtension(extension, dialog->getFileName(...
by tBane
Wed Feb 28, 2024 4:26 pm
Forum: Beginners Help
Topic: Handle the Open Dialog to save/load
Replies: 4
Views: 1761

Handle the Open Dialog to save/load

Hi. I tried to handle the open dialog to save/load. I wrote this code. Where did I go wrong? switch (event.GUIEvent.EventType) { case EGET_MENU_ITEM_SELECTED: // main menu events { IGUIContextMenu* menu = (IGUIContextMenu*)event.GUIEvent.Caller; s32 id = menu->getItemCommandId(menu->getSelectedItem(...
by tBane
Sat Feb 24, 2024 9:59 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Re: Select toolbar button or mesh from map

Success.
I used

Code: Select all

// ...
highlightingtHexTiles();
if ( !terrainBar->isPointInside(mousePos) && mousePress)
{
	editHexTiles();
}
// ...
by tBane
Sat Feb 24, 2024 9:39 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Re: Select toolbar button or mesh from map

i dont know how use it ..

Code: Select all

highlightingtHexTiles();
if ( IGUIEnvironment::getRootGUIElement()->getElementFromPoint(mousePos) == nullptr && mousePress)
{
	editHexTiles();
}
this not works
by tBane
Sat Feb 24, 2024 8:11 pm
Forum: Beginners Help
Topic: Select toolbar button or mesh from map
Replies: 10
Views: 2046

Select toolbar button or mesh from map

Hi! I created a Toolbar, and map in my program. I would like select button of Toolbar or mesh of map, but select both. How repair it ? https://www.youtube.com/watch?v=zXnCM_n0RzI class MyEventReceiver : public IEventReceiver { public: bool KeyIsDown[KEY_KEY_CODES_COUNT]; MyEventReceiver(); virtual b...
by tBane
Sat Feb 24, 2024 8:03 pm
Forum: Advanced Help
Topic: Ray casting and tiles
Replies: 31
Views: 6232

Re: Ray casting and tiles

Thank you for your help :-)
I used MaterialType::EMT_TRANSPARENT_ADD_COLOR
by tBane
Sat Feb 24, 2024 4:25 pm
Forum: Advanced Help
Topic: Ray casting and tiles
Replies: 31
Views: 6232

Re: Ray casting and tiles

Hi. I have a next problem. I work with this mesh and I would like highlighting hexTiles. I use this but but not work: if (selectedSceneNode != nullptr) { vector2di tilePos = globalToHex(selectedSceneNode->getPosition().X, selectedSceneNode->getPosition().Z); for (auto& t : highlightedHexTiles) t...