Skip to content

Instantly share code, notes, and snippets.

View RobQuistNL's full-sized avatar
:shipit:
SHIP IT

Rob Quist RobQuistNL

:shipit:
SHIP IT
View GitHub Profile
@RobQuistNL
RobQuistNL / UnrealEngine5Game.h
Created February 11, 2024 22:49
Some nice extended (UE_LOG and Multiplayer) macro's to use in C++ in Unreal Engine (5.3) for Multiplayer games
/// Since I like to log a bit, and making it clear where a UE_LOG comes from is
/// usually a bit of a pain, I'm now using these logs and macro's in my code.
/// This should help make logs a bit clearer and easier to write;
///
/// Example usage: MY_LOG("Input vector %s", *Value.ToString());
/// Example output:
/// Sun Feb 11 23:20:27 CET 2024 Display MY_GAME [Client] AMyPlayerController::Move: Input vector X=1.000 Y=0.000
///
/// Based off of https://unrealcommunity.wiki/log-macro-with-net-mode-and-color-q3vj8r7c
@RobQuistNL
RobQuistNL / form_iframe.html
Created December 19, 2012 14:31
Code to make an invisible file-upload selector, and post it to an iframe, working in Chrome, FireFox AND Internet Explorer 9 Instead of an submit button and file selector, we now have a simple DIV, that, once clicked, opens the file selection screen, and once you have selected a file, uploads it to an iFrame.
<!-- This is just a snippet, be sure to include jQuery (i used 1.8.3)
The <{TAGS}> are my own template parsers' tags. Replace them as you want.
PROBLEM:
When an file-input is opened via a scripted, forced click() event, IE won't let you submit the form.
If you click the file-input via your own mouse (what we don't want), IE will let you submit the form.
Solution (partly thanks to Rudie @ Stackoverflow, http://stackoverflow.com/users/247372/rudie , http://hotblocks.nl/):
Make a label for the input in IE. If you click it, it will force a click on the input field - and IE will accept that (dumbass IE thinks user clicked the input field, hah)