Jump to content

Slastraf

Developers
  • Posts

    705
  • Joined

  • Last visited

Everything posted by Slastraf

  1. I understand pointers at a fundamental level but the flip did not switch yet in production, I wish the kit would be available in c#
  2. Hmm hatte früher auch oft Probleme mit den Grafiktreibern, versuch die immer aktuell zu halten vielleicht hast du jetzt gerade auch keine aktuelle Version drauf, und die offiziellen von Nvidia. Ich benutze jedoch Windows. Und bitte benutzte ab jetzt deepl.com/translator anstatt google Übersetzer und stelle deine Frage nochmal neu ?
  3. Hello, I am yet challenged by adding nodes, namely a subnode to a selected node. shared_ptr<TreeViewNode> *currentNode; ... case EVENT_WIDGETSELECT: ... if(event.extra->As<TreeViewNode>()) *currentNode = event.extra->As<TreeViewNode>(); ... currentNode->addNode(); // currentNode has no member addNode() I think the code is self explainatory. How do I make this right ? regards
  4. Hello, it would be really cool to have a system that automatically serializes the application state for later use. Say you make some array and a correlating treeNode in runtime then click on save and it will detect all the things the users has put in and just brute force saves all the things that are going on and load them for later use. Regards
  5. Hey there, I have noticed the updates will only apply if steam has downloaded it, and you make a new project (and copy the old code over). There should be a button in the app kit to update old projects. Thanks
  6. Almost could be in an environment where there is a guy slaughtering devils and demons
  7. Hey there, the following code example will make a text field which is rather big and can be applied to the example project if replaced by line 141 and following. auto styleTextArea = CreateTextField(border, border + 40, subpanel2->ClientSize().x - 2 * border, subpanel2->ClientSize().y - 2 * border - 40, subpanel2); styleTextArea->SetAlignment(1, 1, 1, 1); styleTextArea->SetText(" #my_iframe{\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n border:0;\n }\n\n #hide_button, #show_button{\n position: absolute;\n width: 100px;\n height: 30px;\n background-color: DodgerBlue;\n color: white;\n text-align: center;\n line-height: 30px;\n cursor: pointer;\n }\n\n #hide_button{\n left: 10px;\n }\n\n #show_button{\n left: 120px;\n }\n"); In the latter code example i put the whole text thing in one line , but using my original approach made it even buggier : #define MULTI_LINE_STRING(a) #a struct styleTextTemplate{ const char* text = MULTI_LINE_STRING( #my_iframe{\n position: absolute;\n top: 0px;\n left: 0px;\n width: 100%;\n height: 100%;\n border:0;\n }\n\n #hide_button, #show_button{\n position: absolute;\n width: 100px;\n height: 30px;\n background-color: DodgerBlue;\n color: white;\n text-align: center;\n line-height: 30px;\n cursor: pointer;\n }\n\n #hide_button{\n left: 10px;\n }\n\n #show_button{\n left: 120px;\n }\n ); }; // and use setText auto styleTextArea = CreateTextField(border, border + 40, subpanel2->ClientSize().x - 2 * border, subpanel2->ClientSize().y - 2 * border - 40, subpanel2); styleTextArea->SetAlignment(1, 1, 1, 1); styleTextTemplate style; styleTextArea->SetText(style.text); EDIT: Sorry wrong category
  8. Hey there, it would be a cool feature to have.
  9. FindChild implies you would need to know there is a parent. But if you dont know the parent you would need to call it from the root, then it collapses on itself and it becomes a Find() function. Now if you had a find function there needs to be a unique identifier for each widget which the user could set and dont need to worry about all of this.
  10. A findchild method could also be useful for many situations, but in this scenario you would know which exact widget you need to remove. Is there a way to hide a widget by widget text ?
  11. It would be better to access the tree by array or pointer .
  12. Hello, It is rather hard to remove an item from a TreeView if its not on the lowest subnode. auto it = std::find(itemFolder->begin(), itemFolder->end(), itemClass); if (it != itemFolder->end()) itemFolder->erase(it); subnode->ClearNodes(); // rebuild nodes for each (itemClass k in *itemFolder) { subnode->AddNode(k.info); } This for example works okay if you rebuild the tree in the following but you won't be able to remove if it is in a top treenode.
  13. Hello, i don thave much time to make this but here is a bug report about making a new window in U.A.K. Therefore I am posting the whole script I got, and will tell you where the important lines are. #include "pch.h" #include <iostream> #include <fstream> using namespace UltraEngine; string compileAndWrite(fstream& file, string& contentsOfWebsite); string compileAndExport(string& contents); bool RescaleUI(const Event& event, shared_ptr<Object> extra) { auto ui = dynamic_pointer_cast<Interface>(extra); ui->SetScale(float(event.data) / 100.0f); auto window = dynamic_pointer_cast<Window>(event.source); window->SetShape(event.position.x, event.position.y, event.size.x, event.size.y); return true; } int main(int argc, const char* argv[]) { fstream sourceFile; string contentsOfWebsite = ""; cout << "app starting..." << endl; auto displays = ListDisplays(); displays = ListDisplays(); auto win = CreateWindow("Slastraf Tool", 0, 0, 1000 /** displays[0]->scale*/, 600 /** displays[0]->scale*/, displays[0], WINDOW_HIDDEN | WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_DOUBLEBUFFERED); win->SetMinSize(600, 300); auto ui = CreateInterface(win); auto mainpanel = CreatePanel(0, 0, win->ClientSize().x, win->ClientSize().y, ui); mainpanel->SetAlignment(1, 1, 1, 1); auto mainmenu = CreateMenu("", mainpanel); int menuheight = mainmenu->GetSize().y; auto menu_file = CreateMenu("File", mainmenu); auto menu_new = CreateMenu("New", menu_file); auto newFileWindow = CreateWindow("Create New File", 0, 0, 420, 2 * 69, displays[0], WINDOW_HIDDEN | WINDOW_CENTER | WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_DOUBLEBUFFERED); auto newFileUi = CreateInterface(newFileWindow); auto mainNewFilepanel = CreatePanel(0, 0, newFileWindow->ClientSize().x, newFileWindow->ClientSize().y, newFileUi); mainNewFilepanel->SetAlignment(1, 1, 1, 1); auto mainNewMenu = CreateMenu("", mainNewFilepanel); auto textfieldNew = CreateTextField(12, 10, newFileWindow->ClientSize().x*0.5, 32, mainNewMenu); textfieldNew->SetAlignment(1, 1, 1, 0); textfieldNew->SetText("untitled"); auto menu_saveTextNewFile = CreateButton("Save and close (doesnt work yet, just hide the window)", 12+(newFileWindow->ClientSize().x*0.5), 10, newFileWindow->ClientSize().x*0.23, 32, mainNewMenu); auto menu_open = CreateMenu("Open File...", menu_file); auto menu_save = CreateMenu("Save...", menu_file); auto menu_export = CreateMenu("Export", menu_file); ui->SetScale(displays[0]->scale); ListenEvent(EVENT_WINDOWDPICHANGED, win, RescaleUI, ui); win->Show(); win->Activate(); shared_ptr<TreeViewNode> dragnode, destnode; while (true) { auto event = WaitEvent(); switch (event.id) { case EVENT_WIDGETDROP: dragnode = event.source->As<TreeViewNode>(); if (dragnode) { destnode = event.extra->As<TreeViewNode>(); dragnode->Insert(destnode, event.data); } break; case EVENT_WIDGETSELECT: break; case EVENT_WIDGETACTION: if (event.source == menu_open) { wstring file = RequestFile(L"Open File"); sourceFile.open(file, ios::out); if (!sourceFile) { sourceFile.close(); } else { Notify("Opened file. Please export it later as .html to open it in browser."); } break; } if (event.source = menu_new) { newFileUi->SetScale(displays[0]->scale); ListenEvent(EVENT_WINDOWDPICHANGED, newFileWindow, RescaleUI, newFileUi); newFileWindow->Show(); newFileWindow->Activate(); break; } if (event.source == menu_save) { string errors = compileAndWrite(sourceFile, contentsOfWebsite); if (errors != "") { Notify(errors); } sourceFile.close(); break; } if (event.source == menu_saveTextNewFile) { sourceFile.open(textfieldNew->text, ios::out); newFileWindow->Close(); newFileWindow->Hide(); newFileWindow = nullptr; break; } if (event.source == menu_export) { string errors = compileAndExport(contentsOfWebsite); break; } break; case EVENT_WINDOWCLOSE: return 0; break; } } return 0; } //writes all changes to the file, does not export it string compileAndWrite(fstream& file, string& contentsOfWebsite) { /* if (contentsOfWebsite == "") { return "The app is empty, most likely an error."; } */ file << "hello thois isa a test"; return ""; } string compileAndExport(string& contents) { return ""; } I create a button at line 53 which is on a second window. This window is shown in line 107, so far so good but at line 124 it will not hide. I hope you can fix this issue soon. Regards Slastraf
  14. Check your parameters because you are not using them except entity and i dont know if it collides with sometihg so maybe rename that. Check if target is set and if the function is called.
  15. Hey, just wanted to say that game looks really cool. Did you post more about it in showcase ?
  16. Place a pivot in the exact rotation and location of your second camera and then write a small script that puts your current camera wherever the cutscene pos is. You need to think of having only one camera at all times. Store information about text/images/post process in script and disable/enable whenever you need it.
  17. Random quote that I read in a book : >> easy comes, easy goes << . Made in Blender 2.8 Eevee
  18. Slastraf

    Forth demo 1

    Happy to be a part of this. As you said, lack of proper communication contributed pretty badly for the state of the project. Text communication is probably the worst of all forms. Voice would be good but the best would be in-person, though its impossible . Hereby I propose that we could meet on a voice channel maybe discord some time soon. Lets make more discussion about game design and make a better plan about everything (e.g. code documentation, asset list, map design etc.).
  19. A gate fully modeled, textured by me. Took about 2 hours
  20. Hey, I am sorry to hear that and wish you and your daughter all the best.
  21. you would need to put the mouse back, maybe use Math Lerp function for that.
  22. So you are only setting the y rotation of lets say your character controller. Why would you not just rotate it based on direction vector and make it really small ? local rotVec = window:GetMousePosition()x-(window:GetWidth*0.5) local lookSpeedMultiplier = 0.01 self.entity:GetRotation(0, self.entity.rotation.y + (rotVec * lookSpeedMultiplier), 0) I just wrote the code in here so there might be errors but it may work. Also always make *0.5 instead of /2 because the compiler could not detect that /2 is more difficult to calculate than *0.5
  23. Sorry I will not work on this project until there are specifications on what I need to do
  24. Well I already find it a little comedic that my comment criticizing LE game engine got removed so I cannot partake in this discussion. Honestly its kind of sad.
×
×
  • Create New...