Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enum values in "autocomplete" #111

Open
dragokas opened this issue Aug 2, 2021 · 1 comment
Open

enum values in "autocomplete" #111

dragokas opened this issue Aug 2, 2021 · 1 comment

Comments

@dragokas
Copy link
Contributor

dragokas commented Aug 2, 2021

Named enums are finally work again in SM v.1.11.

Is it possible to add listing of enum values in "Intellisense & Autocomplete" window whenever we're entering "=" ?

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

enum SET_ACTION
{
	SET_ACTION_NONE,
	SET_ACTION_CREATE,
	SET_ACTION_MODIFY
}

public void OnPluginStart()
{
	SET_ACTION act;
	act = 
}

Much thanks.

@Timocop
Copy link
Owner

Timocop commented Jan 3, 2022

You can use SET_ACTION. to show all available enum constants. This was added in BasicPawn since the beginning. When hitting CTRL + ENTER it will be replaced by the constant. Its somewhat C++ like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants